Author: bwidawsk Date: Wed Nov 21 04:34:18 2018 New Revision: 340720 URL: https://svnweb.freebsd.org/changeset/base/340720
Log: linuxkpi: Use pageproc instead of vmproc According to markj@: pageproc contains the page daemon and laundry threads, which are responsible for managing the LRU page queues and writing back dirty pages. vmproc's main task is to swap out kernel stacks when the system is under memory pressure, and swap them back in when necessary. It's a somewhat legacy component of the system and isn't required. You can build a kernel without it by specifying "options NO_SWAPPING" (which is a somewhat misleading name), in which vm_swapout_dummy.c is compiled instead of vm_swapout.c. Based on this, we want pageproc to emulate kswapd, not vmproc. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D18061 Modified: head/sys/compat/linuxkpi/common/include/linux/swap.h head/sys/vm/vm_pageout.h head/sys/vm/vm_swapout.c Modified: head/sys/compat/linuxkpi/common/include/linux/swap.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/swap.h Wed Nov 21 03:22:37 2018 (r340719) +++ head/sys/compat/linuxkpi/common/include/linux/swap.h Wed Nov 21 04:34:18 2018 (r340720) @@ -45,7 +45,8 @@ get_nr_swap_pages(void) static inline int current_is_kswapd(void) { - return vm_curproc_is_vmproc(); + + return (curproc == pageproc); } #endif Modified: head/sys/vm/vm_pageout.h ============================================================================== --- head/sys/vm/vm_pageout.h Wed Nov 21 03:22:37 2018 (r340719) +++ head/sys/vm/vm_pageout.h Wed Nov 21 04:34:18 2018 (r340720) @@ -107,7 +107,5 @@ void vm_pageout_oom(int shortage); void vm_swapout_run(void); void vm_swapout_run_idle(void); -bool vm_curproc_is_vmproc(void); - #endif /* _KERNEL */ #endif /* _VM_VM_PAGEOUT_H_ */ Modified: head/sys/vm/vm_swapout.c ============================================================================== --- head/sys/vm/vm_swapout.c Wed Nov 21 03:22:37 2018 (r340719) +++ head/sys/vm/vm_swapout.c Wed Nov 21 04:34:18 2018 (r340720) @@ -961,10 +961,3 @@ swapout(struct proc *p) p->p_swtick = ticks; return (0); } - -/* Used to determine if the current process is itself the reaper. */ -bool -vm_curproc_is_vmproc(void) -{ - return curproc == vmproc; -} _______________________________________________ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"