linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] explicitly document overloaded page flags
@ 2008-05-15 17:19 Andy Whitcroft
  2008-05-15 17:19 ` [PATCH 1/3] page-flags: record page flag overlays explicitly Andy Whitcroft
                   ` (3 more replies)
  0 siblings, 4 replies; 14+ messages in thread
From: Andy Whitcroft @ 2008-05-15 17:19 UTC (permalink / raw)
  To: linux-mm
  Cc: Andrew Morton, Christoph Lameter, KAMEZAWA Hiroyuki,
	KOSAKI Motohiro, Rik van Riel, Jeremy Fitzhardinge, linux-kernel

With the recent page flag reorganisation we have a single enum which
defines the valid page flags and their values, nice and clear.  However
there are a number of bits which are overloaded by different subsystems.
Firstly there is PG_owner_priv_1 which is used by filesystems and by XEN.
Secondly both SLOB and SLUB use a couple of extra page bits to manage
internal state for pages they own; both overlay other bits.  All of these
"aliases" are scattered about the source making it very hard for a reader
to know if the bits are safe to rely on in all contexts; confusion here
is bad.

As we now have a single place where the bits are clearly assigned it makes
sense to clarify the reuse of bits by making the aliases explicit and
visible with the original bit assignments.  This patch creates explicit
aliases within the enum itself for the overloaded bits and uses those
aliases throughout.

Andrew please consider for -mm.

-apw

--
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>

^ permalink raw reply	[flat|nested] 14+ messages in thread
* [PATCH 0/3] explicitly document overloaded page flags V2
@ 2008-05-23 16:33 Andy Whitcroft
  2008-05-23 16:33 ` [PATCH 2/3] slub: record page flag overlays explicitly Andy Whitcroft
  0 siblings, 1 reply; 14+ messages in thread
From: Andy Whitcroft @ 2008-05-23 16:33 UTC (permalink / raw)
  To: linux-mm
  Cc: Andrew Morton, Christoph Lameter, KAMEZAWA Hiroyuki,
	KOSAKI Motohiro, Rik van Riel, Jeremy Fitzhardinge, linux-kernel

With the recent page flag reorganisation we have a single enum which
defines the valid page flags and their values, nice and clear.  However
there are a number of bits which are overloaded by different subsystems.
Firstly there is PG_owner_priv_1 which is used by filesystems and by XEN.
Secondly both SLOB and SLUB use a couple of extra page bits to manage
internal state for pages they own; both overlay other bits.  All of these
"aliases" are scattered about the source making it very hard for a reader
to know if the bits are safe to rely on in all contexts; confusion here
is bad.

As we now have a single place where the bits are clearly assigned it makes
sense to clarify the reuse of bits by making the aliases explicit and
visible with the original bit assignments.  This patch creates explicit
aliases within the enum itself for the overloaded bits, creates standard
bit accessors PageFoo etc. and uses those throughout.

This version pulls the bit manipulation out to standard named page bit
accessors as suggested by Christoph, it retains the explicit mapping to
the overlayed bits.  A fusion of both ideas.  This has been SLUB and
SLOB have been compile tested on x86_64 only, and SLUB boot tested.
If people feel this is worth doing then I can run a fuller set of testing.

-apw

--
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>

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2008-05-27 16:06 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-15 17:19 [PATCH 0/3] explicitly document overloaded page flags Andy Whitcroft
2008-05-15 17:19 ` [PATCH 1/3] page-flags: record page flag overlays explicitly Andy Whitcroft
2008-05-15 17:28   ` 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 2/3] slub: record page flag overlays explicitly Andy Whitcroft
2008-05-26  4:40   ` KOSAKI Motohiro
2008-05-27 14:53     ` apw
2008-05-27 16:06       ` KOSAKI Motohiro

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).