From owner-freebsd-current@FreeBSD.ORG Thu Oct 6 11:45:17 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 CC0D1106566C for ; Thu, 6 Oct 2011 11:45:17 +0000 (UTC) (envelope-from onwahe@gmail.com) Received: from mail-yx0-f182.google.com (mail-yx0-f182.google.com [209.85.213.182]) by mx1.freebsd.org (Postfix) with ESMTP id 8BA708FC0C for ; Thu, 6 Oct 2011 11:45:17 +0000 (UTC) Received: by yxk36 with SMTP id 36so3142499yxk.13 for ; Thu, 06 Oct 2011 04:45:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=TYa0x/VVzT5QdHXNdIImzAHv6kqJ5o/MUGnM76rureY=; b=W24shTQN7hcas/wWtqCx0o8Vm4U1y2cZ8dmmUSLKuEFiHQ5H1OGtVACii5jO+2tQV1 c3l+M9RbmQtNWFAFFHxYwDVOfNsZripUhBJurV8iPLe6zsW/fQdBxVV/coHnIejAwvYd 2pVSrEi7USBx+DtZwfOWUtG+I9RbSQkpGRAMU= MIME-Version: 1.0 Received: by 10.68.12.162 with SMTP id z2mr5045835pbb.122.1317901516543; Thu, 06 Oct 2011 04:45:16 -0700 (PDT) Received: by 10.142.131.21 with HTTP; Thu, 6 Oct 2011 04:45:16 -0700 (PDT) In-Reply-To: <20111005145333.GD1511@deviant.kiev.zoral.com.ua> References: <20111005145333.GD1511@deviant.kiev.zoral.com.ua> Date: Thu, 6 Oct 2011 13:45:16 +0200 Message-ID: From: Svatopluk Kraus To: Kostik Belousov Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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:45:17 -0000 On Wed, Oct 5, 2011 at 4:53 PM, Kostik Belousov wrote= : > On Wed, Oct 05, 2011 at 02:28:01PM +0200, Svatopluk Kraus wrote: >> Hi, >> >> =A0 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: >> >> =A0 exec_map_first_page() in sys/kern/kern_exec.c >> =A0 vm_fault_hold() in sys/vm/vm_fault.c >> =A0 vm_imgact_hold_page() in sys/vm/vm_glue.c >> =A0 vm_object_populate() in sys/vm/vm_object.c >> =A0 mdstart_swap() in sys/dev/md/md.c >> >> =A0 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(). Well, I just follow description above pmap_qenter() blindly and test for page wire_count inside the function. All function calls, I mentioned before= , are OK as pages are VPO_BUSY'd. Thanks for your explanation. Svata