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:14:41 UTC
On 6/4/24 13:43, Poul-Henning Kamp wrote: > 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. That might work, but it's important to have sufficient hysteresis to avoid the scenario where Cache A sees that VM is in state 2, shrinks its usage, VM enters state 0, Cache B sees this and grows its usage, VM enters state 2, repeat. I could imagine something similar being useful to userland as well, so that e.g. databases know whether they should keep more deserialized pages in RAM or free them and hand back memory (at the expense of doing more CPU work the next time those pages are needed). -- Colin Percival FreeBSD Release Engineering Lead & EC2 platform maintainer Founder, Tarsnap | www.tarsnap.com | Online backups for the truly paranoid