From: Nigel Cunningham <nigel@nigel.suspend2.net>
To: LKML <linux-kernel@vger.kernel.org>
Subject: [RFC] [PATCH 2/5] Dynamically allocated pageflags - PageMappedToDisk conversion.
Date: Mon, 23 Jul 2007 23:17:11 +1000 [thread overview]
Message-ID: <200707232317.11905.nigel@nigel.suspend2.net> (raw)
In-Reply-To: <200707232305.12364.nigel@nigel.suspend2.net>
Switch the "MappedToDisk" pageflag to using dynpageflags.
Signed-off-by: Nigel Cunningham <nigel@nigel.suspend2.net>
include/linux/page-flags.h | 9 +++++----
mm/dyn_pageflags.c | 2 ++
mm/page_alloc.c | 3 ++-
3 files changed, 9 insertions(+), 5 deletions(-)
diff -ruNp 920-mapped-to-disk-pageflag.patch-old/include/linux/page-flags.h 920-mapped-to-disk-pageflag.patch-new/include/linux/page-flags.h
--- 920-mapped-to-disk-pageflag.patch-old/include/linux/page-flags.h 2007-07-11 22:19:39.000000000 +1000
+++ 920-mapped-to-disk-pageflag.patch-new/include/linux/page-flags.h 2007-07-23 22:13:01.000000000 +1000
@@ -7,6 +7,7 @@
#include <linux/types.h>
#include <linux/mm_types.h>
+#include <linux/dyn_pageflags.h>
/*
* Various page->flags bits:
@@ -86,7 +87,6 @@
#define PG_compound 14 /* Part of a compound page */
#define PG_swapcache 15 /* Swap page: swp_entry_t in private */
-#define PG_mappedtodisk 16 /* Has blocks allocated on-disk */
#define PG_reclaim 17 /* To be reclaimed asap */
#define PG_buddy 19 /* Page is free, on buddy lists */
@@ -217,9 +217,10 @@ static inline void SetPageUptodate(struc
#define __SetPageBuddy(page) __set_bit(PG_buddy, &(page)->flags)
#define __ClearPageBuddy(page) __clear_bit(PG_buddy, &(page)->flags)
-#define PageMappedToDisk(page) test_bit(PG_mappedtodisk, &(page)->flags)
-#define SetPageMappedToDisk(page) set_bit(PG_mappedtodisk, &(page)->flags)
-#define ClearPageMappedToDisk(page) clear_bit(PG_mappedtodisk, &(page)->flags)
+extern struct dyn_pageflags dyn_MappedToDisk_map;
+#define PageMappedToDisk(page) test_dynpageflag(&dyn_MappedToDisk_map, page)
+#define SetPageMappedToDisk(page) set_dynpageflag(&dyn_MappedToDisk_map, page)
+#define ClearPageMappedToDisk(page) clear_dynpageflag(&dyn_MappedToDisk_map, page)
#define PageReclaim(page) test_bit(PG_reclaim, &(page)->flags)
#define SetPageReclaim(page) set_bit(PG_reclaim, &(page)->flags)
diff -ruNp 920-mapped-to-disk-pageflag.patch-old/mm/dyn_pageflags.c 920-mapped-to-disk-pageflag.patch-new/mm/dyn_pageflags.c
--- 920-mapped-to-disk-pageflag.patch-old/mm/dyn_pageflags.c 2007-07-23 22:12:58.000000000 +1000
+++ 920-mapped-to-disk-pageflag.patch-new/mm/dyn_pageflags.c 2007-07-23 22:13:01.000000000 +1000
@@ -113,6 +113,8 @@ static int dyn_pageflags_debug = 0;
for_each_online_pgdat(pgdat) \
for (zone_nr = 0; zone_nr < MAX_NR_ZONES; zone_nr++)
+DECLARE_DYN_PAGEFLAGS(dyn_MappedToDisk_map);
+
/**
* dump_pagemap: Display the contents of a bitmap for debugging purposes.
*
diff -ruNp 920-mapped-to-disk-pageflag.patch-old/mm/page_alloc.c 920-mapped-to-disk-pageflag.patch-new/mm/page_alloc.c
--- 920-mapped-to-disk-pageflag.patch-old/mm/page_alloc.c 2007-07-11 22:19:42.000000000 +1000
+++ 920-mapped-to-disk-pageflag.patch-new/mm/page_alloc.c 2007-07-23 22:13:01.000000000 +1000
@@ -610,7 +610,8 @@ static int prep_new_page(struct page *pa
page->flags &= ~(1 << PG_uptodate | 1 << PG_error |
1 << PG_referenced | 1 << PG_arch_1 |
- 1 << PG_owner_priv_1 | 1 << PG_mappedtodisk);
+ 1 << PG_owner_priv_1);
+ ClearPageMappedToDisk(page);
set_page_private(page, 0);
set_page_refcounted(page);
next prev parent reply other threads:[~2007-07-23 13:19 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-23 13:05 [RFC] [PATCH 0/5] Dynamically allocated pageflags Nigel Cunningham
2007-07-23 13:15 ` [RFC] [PATCH 3/5] Dynamically allocated pageflags - PageSwapCache conversion Nigel Cunningham
2007-07-23 13:16 ` [RFC] [PATCH 4/5] Dynamically allocated pageflags - PageSlab conversion Nigel Cunningham
2007-07-23 13:17 ` Nigel Cunningham [this message]
2007-07-23 13:17 ` [RFC] [PATCH 5/5] Dynamically allocated pageflags - PageBuddy conversion Nigel Cunningham
2007-07-23 13:25 ` [RFC] [PATCH 0/5] Dynamically allocated pageflags Nigel Cunningham
2007-07-23 14:29 ` Arjan van de Ven
2007-07-23 21:52 ` Nigel Cunningham
2007-07-23 22:05 ` Rafael J. Wysocki
2007-07-23 22:27 ` Nigel Cunningham
2007-07-24 9:47 ` Rafael J. Wysocki
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=200707232317.11905.nigel@nigel.suspend2.net \
--to=nigel@nigel.suspend2.net \
--cc=linux-kernel@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.