From owner-freebsd-current@FreeBSD.ORG Thu Oct 6 11:52:57 2011 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D2740106564A for ; Thu, 6 Oct 2011 11:52:57 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id 2E8218FC14 for ; Thu, 6 Oct 2011 11:52:56 +0000 (UTC) Received: from alf.home (alf.kiev.zoral.com.ua [10.1.1.177]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id p96Bqqc1091871 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 6 Oct 2011 14:52:52 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from alf.home (kostik@localhost [127.0.0.1]) by alf.home (8.14.5/8.14.5) with ESMTP id p96Bqq0T097374; Thu, 6 Oct 2011 14:52:52 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by alf.home (8.14.5/8.14.5/Submit) id p96Bqqmg097373; Thu, 6 Oct 2011 14:52:52 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: alf.home: kostik set sender to kostikbel@gmail.com using -f Date: Thu, 6 Oct 2011 14:52:52 +0300 From: Kostik Belousov To: Svatopluk Kraus Message-ID: <20111006115252.GH1511@deviant.kiev.zoral.com.ua> References: <20111005145333.GD1511@deviant.kiev.zoral.com.ua> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="NNfoz4xml+ZWKQbH" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-3.3 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, DNS_FROM_OPENWHOIS autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: freebsd-current@freebsd.org Subject: Re: pmap_qenter() - the page *must* be wired - is violated X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Oct 2011 11:52:57 -0000 --NNfoz4xml+ZWKQbH Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Oct 06, 2011 at 01:45:16PM +0200, Svatopluk Kraus wrote: > On Wed, Oct 5, 2011 at 4:53 PM, Kostik Belousov wro= te: > > On Wed, Oct 05, 2011 at 02:28:01PM +0200, Svatopluk Kraus wrote: > >> Hi, > >> > >> =9A I found out that on a few places pmap_qenter() is called on pages > >> which are not wired. For example, in the following functions, when > >> vm_pager_get_pages() is called, the pages are not wired: > >> > >> =9A exec_map_first_page() in sys/kern/kern_exec.c > >> =9A vm_fault_hold() in sys/vm/vm_fault.c > >> =9A vm_imgact_hold_page() in sys/vm/vm_glue.c > >> =9A vm_object_populate() in sys/vm/vm_object.c > >> =9A mdstart_swap() in sys/dev/md/md.c > >> > >> =9A Is the rule violated or the rule should be changed? > > > > Lets first discuss where did you found the calls to pmap_qenter(). > > Can you point out exact line numbers of the calls to pmap_qenter() > > that you consider problematic ? > > > > In fact, the requirement probably shall be 'no swapout allowed'. E.g., > > the busy page is fully qualified to be used together with pmap_qenter(). >=20 > Well, I just follow description above pmap_qenter() blindly and test for > page wire_count inside the function. All function calls, I mentioned befo= re, > are OK as pages are VPO_BUSY'd. Thanks for your explanation. Still, I am not aware of any (direct) calls to pmap_qenter in the mentioned functions. --NNfoz4xml+ZWKQbH Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (FreeBSD) iEYEARECAAYFAk6NlpQACgkQC3+MBN1Mb4jptgCgjEmcxJ7sLazDNmcf7oIy4RdK C8sAoOG79o6j5a1Fqe2JO2x0YIVZRHf4 =/dG1 -----END PGP SIGNATURE----- --NNfoz4xml+ZWKQbH--