vm_lowmem event handler for dirhash

David Malone dwmalone at maths.tcd.ie
Wed May 27 19:05:16 UTC 2009

On Wed, May 27, 2009 at 04:45:53AM -0700, David G Lawrence wrote:
>    I'm wondering if you have a low limit on how far you will reduce
> the dirhash. In a system that is thrashing a bit (due to a large process,
> for example), I can imagine multiple (10+) calls to the lowmem handler in
> rapid succession that would completely deplete the dirhash. Seems like
> this would result in even worse thrashing as more disk I/O occurs due
> to lack of dirhash.

The idea of resisting recycling recently used hashes is supposed
to give us some protection against thrashing. We talked about the
problem with Alan for a bit, and reached the conclusion that it was
probably best to return some memory each time the lowmem handler
was called. If this turns out to be a problem, I guess we could add
a low water mark, where if dirhash holds less than that memory then
it won't return the memory on a low memory event.

(Note that under normal circumstances, there is some protection
against thrashing because of the recycling schemem used.)


More information about the freebsd-current mailing list