Date: Thu, 5 Jul 2018 16:40:20 +0000 (UTC) From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336000 - head/sys/i386/i386 Message-ID: <201807051640.w65GeKP3044763@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kib Date: Thu Jul 5 16:40:20 2018 New Revision: 336000 URL: https://svnweb.freebsd.org/changeset/base/336000 Log: Use vm_page_unhold_pages() instead of manually rolling unoptimized version of it. Noted by: alc Sponsored by: The FreeBSD Foundation Modified: head/sys/i386/i386/copyout.c Modified: head/sys/i386/i386/copyout.c ============================================================================== --- head/sys/i386/i386/copyout.c Thu Jul 5 16:38:54 2018 (r335999) +++ head/sys/i386/i386/copyout.c Thu Jul 5 16:40:20 2018 (r336000) @@ -140,11 +140,7 @@ cp_slow0(vm_offset_t uva, size_t len, bool write, sx_xunlock(&pc->pc_copyout_slock); else mtx_unlock(&pc->pc_copyout_mlock); - for (i = 0; i < plen; i++) { - vm_page_lock(m[i]); - vm_page_unhold(m[i]); - vm_page_unlock(m[i]); - } + vm_page_unhold_pages(m, plen); return (error); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201807051640.w65GeKP3044763>