From: Andy Whitcroft <apw@shadowen.org>
To: linux-mm@kvack.org
Cc: Andrew Morton <akpm@osdl.org>,
Christoph Lameter <clameter@sgi.com>,
KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>,
Rik van Riel <riel@redhat.com>,
Jeremy Fitzhardinge <jeremy@goop.org>,
linux-kernel@vger.kernel.org
Subject: [PATCH 1/3] page-flags: record page flag overlays explicitly
Date: Thu, 15 May 2008 18:19:49 +0100 [thread overview]
Message-ID: <1210871989.0@pinky> (raw)
In-Reply-To: exportbomb.1210871946@pinky
Some page flags are used for more than one purpose, for example
PG_owner_priv_1. Currently there are individual accessors for each user,
each built using the common flag name far away from the bit definitions.
This makes it hard to see all possible uses of these bits.
Now that we have a single enum to generate the bit orders it makes sense
to express overlays in the same place. So create per use aliases for
this bit in the main page-flags enum and use those in the accessors.
Signed-off-by: Andy Whitcroft <apw@shadowen.org>
---
include/linux/page-flags.h | 12 +++++++++---
1 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h
index 590cff3..2cc1fb1 100644
--- a/include/linux/page-flags.h
+++ b/include/linux/page-flags.h
@@ -96,7 +96,13 @@ enum pageflags {
#ifdef CONFIG_IA64_UNCACHED_ALLOCATOR
PG_uncached, /* Page has been mapped as uncached */
#endif
- __NR_PAGEFLAGS
+ __NR_PAGEFLAGS,
+
+ /* Filesystems */
+ PG_checked = PG_owner_priv_1,
+
+ /* XEN */
+ PG_pinned = PG_owner_priv_1,
};
#ifndef __GENERATING_BOUNDS_H
@@ -155,8 +161,8 @@ PAGEFLAG(Dirty, dirty) TESTSCFLAG(Dirty, dirty) __CLEARPAGEFLAG(Dirty, dirty)
PAGEFLAG(LRU, lru) __CLEARPAGEFLAG(LRU, lru)
PAGEFLAG(Active, active) __CLEARPAGEFLAG(Active, active)
__PAGEFLAG(Slab, slab)
-PAGEFLAG(Checked, owner_priv_1) /* Used by some filesystems */
-PAGEFLAG(Pinned, owner_priv_1) TESTSCFLAG(Pinned, owner_priv_1) /* Xen */
+PAGEFLAG(Checked, checked) /* Used by some filesystems */
+PAGEFLAG(Pinned, pinned) TESTSCFLAG(Pinned, pinned) /* Xen */
PAGEFLAG(Reserved, reserved) __CLEARPAGEFLAG(Reserved, reserved)
PAGEFLAG(Private, private) __CLEARPAGEFLAG(Private, private)
__SETPAGEFLAG(Private, private)
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2008-05-15 17:19 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-15 17:19 [PATCH 0/3] explicitly document overloaded page flags Andy Whitcroft
2008-05-15 17:19 ` Andy Whitcroft [this message]
2008-05-15 17:28 ` [PATCH 1/3] page-flags: record page flag overlays explicitly Christoph Lameter
2008-05-15 17:19 ` [PATCH 2/3] slub: " Andy Whitcroft
2008-05-15 17:29 ` Christoph Lameter
2008-05-16 0:21 ` KOSAKI Motohiro
2008-05-15 17:20 ` [PATCH 3/3] slob: " Andy Whitcroft
2008-05-15 17:37 ` Andy Whitcroft
2008-05-15 17:42 ` [PATCH] slob: record page flag overlays explicitly v2 Andy Whitcroft
2008-05-15 17:26 ` [PATCH 0/3] explicitly document overloaded page flags Christoph Lameter
-- strict thread matches above, loose matches on Subject: below --
2008-05-23 16:33 [PATCH 0/3] explicitly document overloaded page flags V2 Andy Whitcroft
2008-05-23 16:33 ` [PATCH 1/3] page-flags: record page flag overlays explicitly Andy Whitcroft
2008-05-26 4:37 ` KOSAKI Motohiro
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1210871989.0@pinky \
--to=apw@shadowen.org \
--cc=akpm@osdl.org \
--cc=clameter@sgi.com \
--cc=jeremy@goop.org \
--cc=kamezawa.hiroyu@jp.fujitsu.com \
--cc=kosaki.motohiro@jp.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=riel@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).