From owner-svn-src-user@FreeBSD.ORG Wed Jun 4 18:16:47 2014 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5A27BB36; Wed, 4 Jun 2014 18:16:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2F7922047; Wed, 4 Jun 2014 18:16:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s54IGkX9038741; Wed, 4 Jun 2014 18:16:46 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s54IGk8d038740; Wed, 4 Jun 2014 18:16:46 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201406041816.s54IGk8d038740@svn.freebsd.org> From: Attilio Rao Date: Wed, 4 Jun 2014 18:16:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r267072 - user/attilio/rm_vmobj_cache/sys/vm X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jun 2014 18:16:47 -0000 Author: attilio Date: Wed Jun 4 18:16:46 2014 New Revision: 267072 URL: http://svnweb.freebsd.org/changeset/base/267072 Log: Force VM_ALLOC_WIRED on pagefaults for unamanged objects. Modified: user/attilio/rm_vmobj_cache/sys/vm/vm_fault.c Modified: user/attilio/rm_vmobj_cache/sys/vm/vm_fault.c ============================================================================== --- user/attilio/rm_vmobj_cache/sys/vm/vm_fault.c Wed Jun 4 18:08:08 2014 (r267071) +++ user/attilio/rm_vmobj_cache/sys/vm/vm_fault.c Wed Jun 4 18:16:46 2014 (r267072) @@ -426,6 +426,8 @@ RetryFault:; if (fs.object->type != OBJT_VNODE && fs.object->backing_object == NULL) alloc_req |= VM_ALLOC_ZERO; + if ((fs.object->flags & OBJ_UNMANAGED) != 0) + alloc_req |= VM_ALLOC_WIRED; fs.m = vm_page_alloc(fs.object, fs.pindex, alloc_req); } @@ -1440,7 +1442,7 @@ vm_fault_additional_pages(m, rbehind, ra vm_object_t object; vm_pindex_t pindex, startpindex, endpindex, tpindex; vm_page_t rtm; - int cbehind, cahead; + int alloc_req, cbehind, cahead; VM_OBJECT_ASSERT_WLOCKED(m->object); @@ -1469,6 +1471,10 @@ vm_fault_additional_pages(m, rbehind, ra rbehind = cbehind; } + alloc_req = VM_ALLOC_NORMAL | VM_ALLOC_IFNOTCACHED; + if ((object->flags & OBJ_UNMANAGED) != 0) + alloc_req |= VM_ALLOC_WIRED; + /* * scan backward for the read behind pages -- in memory */ @@ -1488,8 +1494,7 @@ vm_fault_additional_pages(m, rbehind, ra for (i = 0, tpindex = pindex - 1; tpindex >= startpindex && tpindex < pindex; i++, tpindex--) { - rtm = vm_page_alloc(object, tpindex, VM_ALLOC_NORMAL | - VM_ALLOC_IFNOTCACHED); + rtm = vm_page_alloc(object, tpindex, alloc_req); if (rtm == NULL) { /* * Shift the allocated pages to the @@ -1527,8 +1532,7 @@ vm_fault_additional_pages(m, rbehind, ra for (; tpindex < endpindex; i++, tpindex++) { - rtm = vm_page_alloc(object, tpindex, VM_ALLOC_NORMAL | - VM_ALLOC_IFNOTCACHED); + rtm = vm_page_alloc(object, tpindex, alloc_req); if (rtm == NULL) { break; }