Date: Mon, 31 Jul 2017 18:48:59 +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: r321805 - head/sys/kern Message-ID: <201707311848.v6VImxpY081721@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: markj Date: Mon Jul 31 18:48:58 2017 New Revision: 321805 URL: https://svnweb.freebsd.org/changeset/base/321805 Log: Batch v_wire_count decrements in vm_hold_free_pages(). Atomic updates to v_wire_count are a significant source of contention, so combine multiple updates into one in this easy case. Also remove an old printf that gets executed if the page is shared-busied, which is a case that will lead to a panic anyway. Reviewed by: alc, kib MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D11791 Modified: head/sys/kern/vfs_bio.c Modified: head/sys/kern/vfs_bio.c ============================================================================== --- head/sys/kern/vfs_bio.c Mon Jul 31 18:10:10 2017 (r321804) +++ head/sys/kern/vfs_bio.c Mon Jul 31 18:48:58 2017 (r321805) @@ -4532,13 +4532,10 @@ vm_hold_free_pages(struct buf *bp, int newbsize) for (index = newnpages; index < bp->b_npages; index++) { p = bp->b_pages[index]; bp->b_pages[index] = NULL; - if (vm_page_sbusied(p)) - printf("vm_hold_free_pages: blkno: %jd, lblkno: %jd\n", - (intmax_t)bp->b_blkno, (intmax_t)bp->b_lblkno); p->wire_count--; vm_page_free(p); - atomic_subtract_int(&vm_cnt.v_wire_count, 1); } + atomic_subtract_int(&vm_cnt.v_wire_count, bp->b_npages - newnpages); bp->b_npages = newnpages; }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201707311848.v6VImxpY081721>