Can multiple vm_pages refer to a same swap device page?

Yoshihiro Ota ota at j.email.ne.jp
Thu Oct 3 03:31:00 UTC 2019


Hi forks,

Given a process can allocate lot of memory even cosuming swap space, then fork a child process, and both parent and child processes stay live while doing differen things, I expect a system needs to track how many processes are refering to same swap pages.

How does FreeBSD keep track of multiple processes refering to same swap pages?
Is it by multiple vm_page objects pointing to same swap device pages with daddr_t?

I've been looking around swap_pager.h, vm_page, vm_object, struct swblk, and struct swdevt but I don't find reference count for swap device pages.

Am I missing something?

Regards,
Hiro


More information about the freebsd-hackers mailing list