NetBSD Problem Report #49335
From www@NetBSD.org Wed Oct 29 22:11:44 2014
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (verified OK))
by mollari.NetBSD.org (Postfix) with ESMTPS id 99B6EA654D
for <gnats-bugs@gnats.NetBSD.org>; Wed, 29 Oct 2014 22:11:44 +0000 (UTC)
Message-Id: <20141029221142.83038A66AD@mollari.NetBSD.org>
Date: Wed, 29 Oct 2014 22:11:42 +0000 (UTC)
From: n54@gmx.com
Reply-To: n54@gmx.com
To: gnats-bugs@NetBSD.org
Subject: uvn_findpages(9) is out of sync with the code
X-Send-Pr-Version: www-1.0
>Number: 49335
>Category: kern
>Synopsis: uvn_findpages(9) is out of sync with the code
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: kern-bug-people
>State: closed
>Class: doc-bug
>Submitter-Id: net
>Arrival-Date: Wed Oct 29 22:15:00 +0000 2014
>Closed-Date: Mon Mar 23 08:17:32 +0000 2015
>Last-Modified: Mon Mar 23 08:17:32 +0000 2015
>Originator: Kamil Rytarowski
>Release: current
>Organization:
>Environment:
NetBSD current
>Description:
Code and documentation are out of sync:
src/sys/uvm/uvm_extern.h
1.67 chs 195: #define UFP_ALL 0x00
196: #define UFP_NOWAIT 0x01
197: #define UFP_NOALLOC 0x02
198: #define UFP_NOCACHE 0x04
199: #define UFP_NORDONLY 0x08
200: #define UFP_DIRTYONLY 0x10
201: #define UFP_BACKWARD 0x20
http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/uvm/uvm_extern.h?annotate=1.184.2.1
uvn_findpages() looks up or creates pages in uobj at offset offset, marks
them busy and returns them in the pps array. Currently uobj must be a
vnode object. The number of pages requested is pointed to by npagesp,
and this value is updated with the actual number of pages returned. The
flags can be
#define UFP_ALL 0x00 /* return all pages requested */
#define UFP_NOWAIT 0x01 /* don't sleep */
#define UFP_NOALLOC 0x02 /* don't allocate new pages */
#define UFP_NOCACHE 0x04 /* don't return pages which already exist */
#define UFP_NORDONLY 0x08 /* don't return PG_READONLY pages */
UFP_ALL is a pseudo-flag meaning all requested pages should be returned.
UFP_NOWAIT means that we must not sleep. UFP_NOALLOC causes any pages
which do not already exist to be skipped. UFP_NOCACHE causes any pages
which do already exist to be skipped. UFP_NORDONLY causes any pages
which are marked PG_READONLY to be skipped.
-- man find_pages
>How-To-Repeat:
man uvn_findpages
>Fix:
commit 5b6813f6ddda8bc87460d87df81ccc5de441e2df
Author: Kamil Rytarowski <n54@gmx.com>
Date: Wed Oct 29 23:01:00 2014 +0100
Describe UFP_DIRTYONLY and UFP_BACKWARD as valid flag values of uvn_findpages(9)
diff --git a/man/man9/uvm.9 b/man/man9/uvm.9
index 40bd60f..12682bf 100644
--- a/man/man9/uvm.9
+++ b/man/man9/uvm.9
@@ -466,6 +466,8 @@ The flags can be
#define UFP_NOALLOC 0x02 /* don't allocate new pages */
#define UFP_NOCACHE 0x04 /* don't return pages which already exist */
#define UFP_NORDONLY 0x08 /* don't return PG_READONLY pages */
+#define UFP_DIRTYONLY 0x10
+#define UFP_BACKWARD 0x20
.Ed
.Pp
.Dv UFP_ALL
@@ -478,6 +480,10 @@ causes any pages which do not already exist to be skipped.
causes any pages which do already exist to be skipped.
.Dv UFP_NORDONLY
causes any pages which are marked PG_READONLY to be skipped.
+.Dv UFP_DIRTYONLY
+causes any clean pags to be skipped
+.Dv UFP_BACKWARD
+causes to scan pages in the backward order
.Pp
.Fn uvm_vnp_setsize
sets the size of vnode
>Release-Note:
>Audit-Trail:
From: "Taylor R Campbell" <riastradh@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/49335 CVS commit: src/share/man/man9
Date: Mon, 23 Mar 2015 08:00:33 +0000
Module Name: src
Committed By: riastradh
Date: Mon Mar 23 08:00:33 UTC 2015
Modified Files:
src/share/man/man9: uvm.9
Log Message:
Describe UFP_DIRTYONLY and UFP_BACKWARD flags to uvn_findpages.
PR kern/49335
To generate a diff of this commit:
cvs rdiff -u -r1.107 -r1.108 src/share/man/man9/uvm.9
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: open->closed
State-Changed-By: riastradh@NetBSD.org
State-Changed-When: Mon, 23 Mar 2015 08:17:32 +0000
State-Changed-Why:
fixed
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.