mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Nigel Cunningham <nigel@nigel.suspend2.net>
To: LKML <linux-kernel@vger.kernel.org>
Subject: [RFC] [PATCH 3/5] Dynamically allocated pageflags - PageSwapCache conversion.
Date: Mon, 23 Jul 2007 23:15:58 +1000	[thread overview]
Message-ID: <200707232315.58891.nigel@nigel.suspend2.net> (raw)
In-Reply-To: <200707232305.12364.nigel@nigel.suspend2.net>

Switch PageSwapCache flag to use dynamically allocated pageflags.

Signed-off-by: Nigel Cunningham <nigel@nigel.suspend2.net>

 include/linux/page-flags.h |    7 ++++---
 mm/dyn_pageflags.c         |    3 +++
 2 files changed, 7 insertions(+), 3 deletions(-)
diff -ruNp 921-page-swap-cache-pageflag.patch-old/include/linux/page-flags.h 921-page-swap-cache-pageflag.patch-new/include/linux/page-flags.h
--- 921-page-swap-cache-pageflag.patch-old/include/linux/page-flags.h	2007-07-23 22:13:16.000000000 +1000
+++ 921-page-swap-cache-pageflag.patch-new/include/linux/page-flags.h	2007-07-23 22:13:18.000000000 +1000
@@ -260,9 +260,10 @@ static inline void __ClearPageTail(struc
 #define __ClearPageHead(page)	__ClearPageCompound(page)
 
 #ifdef CONFIG_SWAP
-#define PageSwapCache(page)	test_bit(PG_swapcache, &(page)->flags)
-#define SetPageSwapCache(page)	set_bit(PG_swapcache, &(page)->flags)
-#define ClearPageSwapCache(page) clear_bit(PG_swapcache, &(page)->flags)
+extern struct dyn_pageflags dyn_SwapCache_map;
+#define PageSwapCache(page)	test_dynpageflag(&dyn_SwapCache_map, page)
+#define SetPageSwapCache(page)	set_dynpageflag(&dyn_SwapCache_map, page)
+#define ClearPageSwapCache(page)	clear_dynpageflag(&dyn_SwapCache_map, page)
 #else
 #define PageSwapCache(page)	0
 #endif
diff -ruNp 921-page-swap-cache-pageflag.patch-old/mm/dyn_pageflags.c 921-page-swap-cache-pageflag.patch-new/mm/dyn_pageflags.c
--- 921-page-swap-cache-pageflag.patch-old/mm/dyn_pageflags.c	2007-07-23 22:13:16.000000000 +1000
+++ 921-page-swap-cache-pageflag.patch-new/mm/dyn_pageflags.c	2007-07-23 22:13:18.000000000 +1000
@@ -114,6 +114,9 @@ static int dyn_pageflags_debug = 0;
 		for (zone_nr = 0; zone_nr < MAX_NR_ZONES; zone_nr++)
 
 DECLARE_DYN_PAGEFLAGS(dyn_MappedToDisk_map);
+#ifdef CONFIG_SWAP
+DECLARE_DYN_PAGEFLAGS(dyn_SwapCache_map);
+#endif
 
 /**
  * dump_pagemap: Display the contents of a bitmap for debugging purposes.

  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 ` Nigel Cunningham [this message]
2007-07-23 13:16 ` [RFC] [PATCH 4/5] Dynamically allocated pageflags - PageSlab conversion Nigel Cunningham
2007-07-23 13:17 ` [RFC] [PATCH 2/5] Dynamically allocated pageflags - PageMappedToDisk conversion Nigel Cunningham
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=200707232315.58891.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome