Date: Sun, 23 Feb 2020 17:59:51 +0000 (UTC) From: Mark Johnston <markj@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358261 - head/sys/vm Message-ID: <202002231759.01NHxps1005334@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: markj Date: Sun Feb 23 17:59:51 2020 New Revision: 358261 URL: https://svnweb.freebsd.org/changeset/base/358261 Log: Allow swap_pager_putpages() to allocate one block at a time. The minimum allocation size of 4 blocks is an old policy that came with the "new" swap pager in r42957. Since then the blist allocator has gotten better at reducing fragmentation; for example, with r349777 it can return a range that spans multiple leaves. When swap space is close to being exhaused, the minimum of 4 blocks most likely exacerbates memory pressure, so reduce it to 1. Reported by: alc Tested by: pho Reviewed by: alc, dougm, kib Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D23763 Modified: head/sys/vm/swap_pager.c Modified: head/sys/vm/swap_pager.c ============================================================================== --- head/sys/vm/swap_pager.c Sun Feb 23 15:21:15 2020 (r358260) +++ head/sys/vm/swap_pager.c Sun Feb 23 17:59:51 2020 (r358261) @@ -1464,7 +1464,7 @@ swap_pager_putpages(vm_object_t object, vm_page_t *ma, /* Get a block of swap of size up to size n. */ VM_OBJECT_WLOCK(object); - blk = swp_pager_getswapspace(&n, 4); + blk = swp_pager_getswapspace(&n, 1); if (blk == SWAPBLK_NONE) { VM_OBJECT_WUNLOCK(object); mtx_lock(&swbuf_mtx);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202002231759.01NHxps1005334>