Re: removing support for kernel stack swapping
- In reply to: Poul-Henning Kamp: "Re: removing support for kernel stack swapping"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 04 Jun 2024 21:28:49 UTC
On Tue, Jun 04, 2024 at 08:43:02PM +0000, Poul-Henning Kamp wrote: > Konstantin Belousov writes: > > > Similarly, it is not easy to shrink the vnode cache in case of memory > > shortage, due to need to free the owned pages, and most likely before > > that, free the owned buffers which otherwise wire the pages. > > Also we need to flush namecache before a vnode can be freed, which is > > somewhat unfortunate. > > Many years ago I asked the then VM-wizards if we could have a global > kernel integer variable with a "VM-state-of-the-system" so caches > could modulate their behavior. > > Having something as simple as: > > 0 - free pizza > 1 - dont make it worse I believe this is same as vm_page_count_severe() > 2 - please help and this one is vm_page_count_min() > > would enable most of the caches in the kernel pull the right direction > before things get too critical. Filesystems, at least the kind that uses the buffer cache, tend to avoid creating delayed writes if we are in the state "1". This does not help with shrinking the existing cached dormant objects. Also note that state "2" is not too useful to report to userspace, because most syscalls and page faults requiring a page allocation going to block at that moment.