summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorKamezawa Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>2005-01-07 22:01:18 -0800
committerLinus Torvalds <torvalds@evo.osdl.org>2005-01-07 22:01:18 -0800
commit6951e82fe339eb35a7a0b8042eba9d015d79be55 (patch)
treec7f80ff16e56988553b916f4d4370df73fd1641b /include/linux
parentce1d9c8aadcaf399793405fb5a090f2abe3ec581 (diff)
[PATCH] no buddy bitmap patch revist: intro and includes
Followings are patches for removing bitmaps from the buddy allocator. This is benefical to memory-hot-plug stuffs, because this removes a data structure which must meet to a host's physical memory layout. This is one step to manage physical memory in nonlinear / discontiguous way and will reduce some amounts of codes to implement memory-hot-plug. This patch removes bitmaps from zone->free_area[] in include/linux/mmzone.h, and adds some comments on page->private field in include/linux/mm.h. non-atomic ops for changing PG_private bit is added in include/page-flags.h. zone->lock is always acquired when PG_private of "a free page" is changed. Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/mm.h2
-rw-r--r--include/linux/mmzone.h1
-rw-r--r--include/linux/page-flags.h2
3 files changed, 4 insertions, 1 deletions
diff --git a/include/linux/mm.h b/include/linux/mm.h
index a52b121c639e..ee9817135376 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -232,6 +232,8 @@ struct page {
* usually used for buffer_heads
* if PagePrivate set; used for
* swp_entry_t if PageSwapCache
+ * When page is free, this indicates
+ * order in the buddy system.
*/
struct address_space *mapping; /* If low bit clear, points to
* inode address_space, or NULL.
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h
index be10c51967db..1d46bd35ab78 100644
--- a/include/linux/mmzone.h
+++ b/include/linux/mmzone.h
@@ -22,7 +22,6 @@
struct free_area {
struct list_head free_list;
- unsigned long *map;
unsigned long nr_free;
};
diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h
index af926cfe07b7..f11387a4cc50 100644
--- a/include/linux/page-flags.h
+++ b/include/linux/page-flags.h
@@ -239,6 +239,8 @@ extern unsigned long __read_page_state(unsigned offset);
#define SetPagePrivate(page) set_bit(PG_private, &(page)->flags)
#define ClearPagePrivate(page) clear_bit(PG_private, &(page)->flags)
#define PagePrivate(page) test_bit(PG_private, &(page)->flags)
+#define __SetPagePrivate(page) __set_bit(PG_private, &(page)->flags)
+#define __ClearPagePrivate(page) __clear_bit(PG_private, &(page)->flags)
#define PageWriteback(page) test_bit(PG_writeback, &(page)->flags)
#define SetPageWriteback(page) \