Posted Nov 25, 2011 6:30 UTC (Fri) by jzbiciak
(✭ supporter ✭
Parent article: POSIX_FADV_VOLATILE
But, as noted above, nobody has mentioned this idea, and your editor would certainly not be so daring.
Except, of course, in the context of an LWN article. ;-)
The idea also reminds me a bit of the "swapping in userspace" ideas that GNU Hurd has explored, at least on L4. IIRC, the Hurd L4 microkernel only deals in physical pages, and can hand physical pages to tasks or ask for physical pages back. All actual "swapping" decisions get made by the individual user-space tasks themselves.
This does have a certain conceptual nicety to it: When memory pressure increases, you can run garbage collectors more frequently and drop caches more aggressively. And each application can choose the strategy that makes the most sense for itself.
The downside, of course, is that it requires perfect cooperation between all processes. There is no way for the OS to override the decisions of an ill-behaved userspace application, other than to terminate it.
(Note: I don't know what the current state of the art is in GNU Hurd land. The article I linked was from 2005. Then again, Wikipedia suggests that not much has happened since then other than changing microkernels a few times after L4. I think that adds another twist to the microkernel-vs-monolithic kernel debate, but I don't really feel like going there right now. ;-) )
to post comments)