|
|
Log in / Subscribe / Register

Shouldn't this be in userspace?

Shouldn't this be in userspace?

Posted Feb 7, 2026 18:38 UTC (Sat) by ATLief (subscriber, #166135)
In reply to: Shouldn't this be in userspace? by RazeLighter777
Parent article: An in-kernel machine-learning library

I think a good candidate for this would be the kernel’s performance scaling subsystems. The default performance governor (“schedutil”) uses tons of manually configured heuristics to predict what hardware parameters would be “best” for power efficiency and performance, but there are so many possible combinations of sensor readings, workloads, and interpretations of “best”.

The only way you’d be able to effectively address all of those scenarios would be with something ML-based. Both AMD and Intel CPUs support setting their own “best” hardware parameters and the kernel enables that by default; our hardware is already using ML to decide on hardware parameters, it’s just that the kernel has very little influence on it.

I don’t think eBPF is well-suited for ML, so any such solution would probably require manual heuristics anyway. I’m not aware of any ML-based solutions in userspace, either. That’s probably because any userspace application would have to fetch so many parameters from the kernel that such an application would only make sense being within the kernel itself.


to post comments

Shouldn't this be in userspace?

Posted Feb 8, 2026 1:27 UTC (Sun) by quotemstr (subscriber, #45331) [Link] (3 responses)

There are tons and tons of great places to apply AI in Linux. Every magic number (my favorite being the "I determined this by opening LibreOffice a bunch of times" one) is a candidate for some kind of auto tuning.

BUT --- can't almost all of this tuning happen via a combination of eBPF and userspace supervision? AI inference isn't exactly known to be a lightweight or low-latency operation. In every scenario I can imagine, punting a kernel tuning decision to userspace would not impose meaningful cost overhead relative to any ML stuff userspace might want to do.

So, while I'm generally pretty gung-ho about applying AI to systems engineering problems, this particular patch seems like the wrong way to go about it.

Shouldn't this be in userspace?

Posted Feb 8, 2026 16:19 UTC (Sun) by RazeLighter777 (subscriber, #130021) [Link]

Agreed. There is nothing preventing anyone from making an program that reads from existing kernel hooks in eBPF, feeds it to and feeds it to ML model that controls eBPF program(s) for IO and CPU scheduling.

So this whole thing seems redundant and doable with current kernel APIs.

Shouldn't this be in userspace?

Posted Feb 13, 2026 2:39 UTC (Fri) by cypherpunks2 (guest, #152408) [Link] (1 responses)

> AI inference isn't exactly known to be a lightweight or low-latency operation.

That really depends. The Opus encoder, for example, has a speech/music detection gated recurrent unit (GRU) with less than 5k weights and can detect, in real time with hysteresis and while using less than 0.02% of the CPU, whether or not any given 20 ms audio frame has transitioned from speech to music (and vice versa): https://jmvalin.ca/opus/opus-1.3/. Any time you call someone over WebRTC (and pretty much every common VoIP protocol), you'll be doing inference with this model 50 times per second without even realizing it.

And a GRU isn't just a trivial feedforward neural network; It has memory that allows it to keep some information for a long time while discarding other information more quickly. When your problem space is very small, you can make a model that is exceptionally lightweight for both training and inference.

Not all "AI" models are massive, bloated large language models with billions of weights.

Shouldn't this be in userspace?

Posted Feb 13, 2026 2:56 UTC (Fri) by mathstuf (subscriber, #69389) [Link]

> Not all "AI" models are massive, bloated large language models with billions of weights.

Yeah, but if they are, then we can fuel an exorbitant amount of capital expenditure and generally just make lots of motion in the stock market. What else are these poor, bored VCs with billions burning holes in their pockets to do with it? Feed the hungry? End malaria?


Copyright © 2026, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds