Re: [PATCH 2.6.17-rc1-mm2] pg_uncached-is-ia64-only-fix

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Lee Schermerhorn <Lee.Schermerhorn@xxxxxx> wrote:
>
> This patch restores the 64-bit system FLAGS_RESERVED to 32 and
>  moves the PG_uncached bit back down into the high order byte of
>  the low order flags word.

Yes, that's what the persent version of that patch does (I made it bit 31,
so 64-bit-only flags can work their way downwards).

It's a bit sad that we're using all 32 of the high-order bits.  We might
need to revisit that later, if flags get tighter.



From: Andrew Morton <akpm@xxxxxxxx>

As Nick points out, only ia64 uses PG_uncached.  So we can push it up into the
higher bits of the lower half of page->flags and make room for another flag on
32-bit machines.

Cc: "Luck, Tony" <tony.luck@xxxxxxxxx>
Cc: Jesse Barnes <jbarnes@xxxxxxx>
Cc: Jes Sorensen <jes@xxxxxxxxxxxxxxxxxx>
Cc: Nick Piggin <nickpiggin@xxxxxxxxxxxx>
Cc: Andy Whitcroft <apw@xxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

diff -puN include/linux/page-flags.h~pg_uncached-is-ia64-only include/linux/page-flags.h
--- devel/include/linux/page-flags.h~pg_uncached-is-ia64-only	2006-04-09 23:08:43.000000000 -0700
+++ devel-akpm/include/linux/page-flags.h	2006-04-09 23:09:13.000000000 -0700
@@ -7,6 +7,8 @@
 
 #include <linux/percpu.h>
 #include <linux/cache.h>
+#include <linux/types.h>
+
 #include <asm/pgtable.h>
 
 /*
@@ -88,7 +90,17 @@
 #define PG_nosave_free		18	/* Free, should not be written */
 #define PG_buddy		19	/* Page is free, on buddy lists */
 
-#define PG_uncached		20	/* Page has been mapped as uncached */
+
+#if (BITS_PER_LONG > 32)
+/*
+ * 64-bit-only flags build down from bit 31
+ *
+ * 32 bit  -------------------------------| FIELDS |       FLAGS         |
+ * 64 bit  |           FIELDS             | ??????         FLAGS         |
+ *         63                            32                              0
+ */
+#define PG_uncached		31	/* Page has been mapped as uncached */
+#endif
 
 /*
  * Global page accounting.  One instance per CPU.  Only unsigned longs are

-
: send the line "unsubscribe linux-ia64" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel]     [Sparc Linux]     [DCCP]     [Linux ARM]     [Yosemite News]     [Linux SCSI]     [Linux x86_64]     [Linux for Ham Radio]

  Powered by Linux