Date: Sat, 27 Sep 2014 07:54:28 +0000 (UTC) From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r272202 - stable/10/sys/vm Message-ID: <201409270754.s8R7sSrL097564@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kib Date: Sat Sep 27 07:54:27 2014 New Revision: 272202 URL: http://svnweb.freebsd.org/changeset/base/272202 Log: MFC r272036: Avoid calling vm_map_pmap_enter() for the MADV_WILLNEED on the wired entry, the pages must be already mapped. Approved by: re (gjb) Modified: stable/10/sys/vm/vm_map.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/vm/vm_map.c ============================================================================== --- stable/10/sys/vm/vm_map.c Sat Sep 27 07:04:12 2014 (r272201) +++ stable/10/sys/vm/vm_map.c Sat Sep 27 07:54:27 2014 (r272202) @@ -2209,7 +2209,14 @@ vm_map_madvise( vm_object_madvise(current->object.vm_object, pstart, pend, behav); - if (behav == MADV_WILLNEED) { + + /* + * Pre-populate paging structures in the + * WILLNEED case. For wired entries, the + * paging structures are already populated. + */ + if (behav == MADV_WILLNEED && + current->wired_count == 0) { vm_map_pmap_enter(map, useStart, current->protection,
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201409270754.s8R7sSrL097564>