News for hackers. Stuff that matters.
Re:A 40ms Go garbage collector pause caused by swap by serbuvlad on Monday October 05, 2026 @02:48AM (#49961445)
One can just add APIs to the Linux kernel, and this would be a pretty straightforward one. (though it might be a little more difficult to avoid a syscall here)

I'm sure an agent can work on this and get some numbers with a day's worth of tokens.

Re:A 40ms Go garbage collector pause caused by swap by loeg on Monday October 05, 2026 @03:07AM (#49961606)
The API already exists: mlock.
Re:A 40ms Go garbage collector pause caused by swap by keybored on Monday October 05, 2026 @03:31AM (#49961752)
I think we are not realizing the paradigm shift here. A coding agent can implement this with a modest little day’s worth of tokens. This means that no one needs to read or know the APIs any more. We can just add them to the kernel as we need them. Then when we forget that we needed them we can just rediscover the API idea later and spend a day’s worth of tokens. (But let’s be real here. By then it will probably be just 1/3 worth of tokens with all the model improvements as well as the ample training material.)
Re:A 40ms Go garbage collector pause caused by swap by Mawr on Monday October 05, 2026 @04:18AM (#49962078)
We don't even need a kernel anymore. An agent can write the relevant parts of the OS on the fly, as we need them.
Re:A 40ms Go garbage collector pause caused by swap by serbuvlad on Monday October 05, 2026 @07:33AM (#49963514)
Sure, but I meant more in the sense of asking about the current status of the page.
Re:A 40ms Go garbage collector pause caused by swap by masklinn on Monday October 05, 2026 @08:54AM (#49964220)
It’s the mincore which debugnik mentioned. And there’s madvise(MADV_WILLNEED) which triggers an asynchronous prefetch.
Re:A 40ms Go garbage collector pause caused by swap by delamon on Monday October 05, 2026 @11:59AM (#49966607)
I was biten by not understanding madvise(MADV_WILLNEED) semantics fully. It will prefetch, but it will not pre-fault. You still gonna pay minor page fault on every new page access. There is MADV_POPULATE_READ, but it is synchronous.
Re:A 40ms Go garbage collector pause caused by swap by loeg on Monday October 05, 2026 @12:05PM (#49966701)
You can ask about the status (mincore), but it's an inherently racy operation.
Re:A 40ms Go garbage collector pause caused by swap by jstarks on Monday October 05, 2026 @02:55AM (#49961502)
You don’t need an api. Just touch the page.