Re: swapoff_all at shutdown time

From: John Baldwin <jhb_at_FreeBSD.org>
Date: Mon, 31 Mar 2025 14:04:19 UTC
On 3/26/25 10:11, Andriy Gapon wrote:
> 
> This is more of a question than suggestion.
> 
> I noticed that swapoff_all() at shutdown time seems to swap in all pages (for
> non-dead objects).
> 
> Does that really have to be done?
> Can't we just "discard" those pages at that late stage of shutdown?
> Especially now that we don't swap kernel stacks.

That does seem odd, yes.  I can understand why we might have needed the pages
for a kstack, but I'm not sure if there are any other anon pages we might need
during shutdown.  Presumably not?

-- 
John Baldwin