Re: removing support for kernel stack swapping

From: Poul-Henning Kamp <phk_at_phk.freebsd.dk>
Date: Tue, 04 Jun 2024 20:43:02 UTC
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
	2 - please help

would enable most of the caches in the kernel pull the right direction
before things get too critical.

-- 
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk@FreeBSD.ORG         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.