[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: vmem(9) (was Re: netbsd-6: pagedaemon freeze when low on memory)
On 2013-03-18 20:08, Greg Troxel wrote:
> [discussion of pagedaemon having a tight loop when kmem is low but
> trying to free some isn't successful]
> Lars has adjusted the default maxvnodes, which should help most people
> From avoiding the pagedaemon tight loop. But I think it still makes
> sense to apply Richard's patch, which should make the
> truly-out-of-memory situation behave a bit better, with many processes
> stuck waiting for memory, rather than the system locked up.
> It will remain to have more (and more effective) drain routines, and
> perhasp an out-of-memory killer.
We might consider to install a pool cache drain hook for releasing vnodes.
> So if there are no objections, I'll commit Richard's patch (in the
> message linked above).
One problem I see with the patch is, if applied the pagedaemon gives up
pool_draining after the first call to pool_drain that doesn't free
anything. pool_drain drains one and only one pool per call, so chance
are good that we stop to early.
So we might want to install a callbak here that get's called under
uvm_km_va_starved_p which drains all pools until one returns memory or
there are no more pools to drain. If this doesn't free anything we might
Die mystischen Erklärungen gelten für tief;
die Wahrheit ist, dass sie noch nicht einmal oberflächlich sind.
-- Friedrich Nietzsche
[ Die Fröhliche Wissenschaft Buch 3, 126 ]
Main Index |
Thread Index |