#
✕ nick:chadmed
#asahi-dev · 2023-04-22 04:52
chadmedwhy the hell does CFS give it full reign over my pcores?
#asahi-dev · 2023-04-22 04:52
chadmedthe classic example is balloo
#asahi-dev · 2023-04-22 04:51
chadmeddevelopers need to build this in to code so that it happens automatically, and we cant do that easily or even *well* with the current kernel infrastructure
#asahi-dev · 2023-04-22 04:51
chadmedbut theyre not going to work on another system with a different perf profile
#asahi-dev · 2023-04-22 04:50
chadmedyeah you could package up a bunch of scripts that does all this for YOUR system and YOUR software
#asahi-dev · 2023-04-22 04:50
chadmedwell yeah thats what i meant by the solutions being designed for server admins
#asahi-dev · 2023-04-22 04:49
chadmedwho the heck has time for that
#asahi-dev · 2023-04-22 04:49
chadmedyeah see thats exactly my point
#asahi-dev · 2023-04-22 04:48
chadmedany time a normal user has to think about any of this shit is an absolute L for UX
#asahi-dev · 2023-04-22 04:48
chadmeddesktop users want to press the power button and not think about firmware or the kernel again beyond that
#asahi-dev · 2023-04-22 04:48
chadmedyeah again, a "solution" designed with the assumption that people want to spend 6 weeks collecting perf data and then 15 minutes on every cold boot manually optimising all this stuff
#asahi-dev · 2023-04-22 04:46
chadmedintel's thread director is a damning indictment on this state of affairs
#asahi-dev · 2023-04-22 04:46
chadmedtheyre not fit for purpose for modern desktop systems
#asahi-dev · 2023-04-22 04:45
chadmedthey all seem designed for highly integrated server environments where the developer and sysadmin are either the same person or at least in the same room
#asahi-dev · 2023-04-22 04:45
chadmedyeah its all just a mess of hacks and tricks and kludges that no one really understands and doesnt really have any benefit for anyone in the desktop
#asahi-dev · 2023-04-22 04:43
chadmedsomething as finnicky and not-user-facing as "please tell the scheduler your capacity requirements" is waaaay down the priority list of most developers
#asahi-dev · 2023-04-22 04:42
chadmedits bad enough that we cant convince a nontrivial minority of folks that x11 is a ghoulish awful steaming pile and needs to die
#asahi-dev · 2023-04-22 04:41
chadmedthey rely on android apis and alternative schedulers
#asahi-dev · 2023-04-22 04:41
chadmedso all the aggressive optimisations for software scheduling are in android, and guess what
#asahi-dev · 2023-04-22 04:41
chadmedand no ones really bothered with a heterogeneous arm64 chip for the desktop except apple
#asahi-dev · 2023-04-22 04:40
chadmedintels heterogeneous socs have hardware scheduling so devs dont have to care about it
#asahi-dev · 2023-04-22 04:40
chadmedso even if we had a simplified userspace-friendly qos system separate to nice/uclamp/whatever 50% of people wouldnt use it because its soy bloated cucked etc and the other 50% wouldnt use it because who the hell cares about the 5 people using heterogeneous workstations
#asahi-dev · 2023-04-22 04:39
chadmedwe dont have an army of devs who will hang on every word the kernel team say
#asahi-dev · 2023-04-22 04:39
chadmedyeah see, the issue is on linux that we cant _rely_ on devs doing that
#asahi-dev · 2023-04-22 04:38
chadmedthe problem is that its really optimised for throughput and not interactivity, so bursty tasks will cause its perf counters to decay and youre back to it not having any idea what to do with the thread
#asahi-dev · 2023-04-22 04:37
chadmedthe QoS buckets for CFS are all based on UCLAMP values, and if you dont provide those then it just uses its own feedback mechanism to predict what kind of capacity the process needs
#asahi-dev · 2023-04-22 04:37
chadmednothing that simple, youd have to hint to CFS with a mix of UCLAMP, priority tweaking and capacity-dmips-mhz values in the DT
#asahi-dev · 2023-04-22 04:35
chadmedtheyre super tiny and faster than they have any right to be
#asahi-dev · 2023-04-22 04:34
chadmedaccording to my readings they use barely 500 mW at full tilt at 2.064 GHz
#asahi-dev · 2023-04-22 04:33
chadmedtheyre _very_ efficient
#asahi-dev · 2023-04-22 04:33
chadmedyeah it would, even at full capacity the icestorm cores barely tick up enough power to get a reading over background noise from PHPC
#asahi-dev · 2023-04-22 04:32
chadmedCFS is just not a very good scheduler for HMP systems tbh
#asahi-dev · 2023-04-22 04:31
chadmedthe soc is just too lopsided for the scheduler to know how to use it properly without userspace helping it
#asahi-dev · 2023-04-22 04:30
chadmedhell with the gpu doing compositing and post processing, i can peg firefox to the ecores at 600mhz and it will play 1080p vp9 at 30fps no worries
#asahi-dev · 2023-04-22 04:30
chadmedbecause sitting around at the dekstop icestorm is more than fast enough for a snappy experience, its just on t600x theres only two of them and they end up overloaded
#asahi-dev · 2023-04-22 04:29
chadmedthe reason i bought the t6020 machine is to test a hypothesis that having more than two ecores would give CFS/EAS a better opportunity to keep the pcores asleep
#asahi-dev · 2023-04-22 04:28
chadmedtheyd help with interactivity but not necessarily power use
#asahi-dev · 2023-04-22 04:26
chadmedbut linux userspace is just gonna have to get with the times
#asahi-dev · 2023-04-22 04:26
chadmedone way we could work around this, for graphics tasks at least, is have asahi take in perf metrics from the gpu and feed that back into UCLAMP values to force whatever its linked to onto pcores at high pstates
#asahi-dev · 2023-04-22 04:22
chadmedpush interactive stuff there too*
#asahi-dev · 2023-04-22 04:22
chadmedthen the util overflows so it shoves stuff over to a firestorm cluster
#asahi-dev · 2023-04-22 04:22
chadmedour problem is instead that EAS without hints tries to push stuff there too
#asahi-dev · 2023-04-22 04:21
chadmedwith EAS we already get most background stuff being shunted over to icestorm
#asahi-dev · 2023-04-22 04:21
chadmedEAS helps with this too as threads which tell CFS that they dont need much utilisation can all be dispatched onto an icestorm core
#asahi-dev · 2023-04-22 04:20
chadmedCFS will then put them in buckets with similar processes and dispatch cpu time to them accordingly
#asahi-dev · 2023-04-22 04:20
chadmeduserspace processes can hint to the scheduler how much core utilisation they will need ahead of time by clamping their util values
#asahi-dev · 2023-04-22 04:19
chadmedyeah, UCLAMP is a rough facsimile of that
#asahi-dev · 2023-04-22 04:19
chadmedwe have UCLAMP_MIN and UCLAMP_MAX for userspace to tell CFS how much performance it _actually_ needs
#asahi-dev · 2023-04-22 04:18
chadmedPHPC stays at idle levels
#asahi-dev · 2023-04-22 04:18
chadmedfor example sometimes PSTR will just jump to 8-12 W with seemingly nothing else going on

plus ›