summaryrefslogtreecommitdiff
path: root/include/linux/rmap-locking.h
diff options
context:
space:
mode:
authorAndrew Morton <akpm@osdl.org>2004-03-15 15:15:17 -0800
committerLinus Torvalds <torvalds@ppc970.osdl.org>2004-03-15 15:15:17 -0800
commit5bfec9f6eadf728647754ef156aac340de1cc214 (patch)
treec5e3ec54060842363715ec580359645312556a56 /include/linux/rmap-locking.h
parent952a0ae394f450c878aa2e408c23236896a2efac (diff)
[PATCH] Save some memory in mem_map on x86-64
From: Andi Kleen <ak@suse.de> This patch saves 2MB of memory on a 1GB x86-64 machine, 20MB on a 10GB machine. It does this by eliminating 8 bytes of useless padding in struct page. This resurrects an older patch in a hopefully cleaner form.
Diffstat (limited to 'include/linux/rmap-locking.h')
-rw-r--r--include/linux/rmap-locking.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/rmap-locking.h b/include/linux/rmap-locking.h
index d4dd60e34e25..cb30ed470cf6 100644
--- a/include/linux/rmap-locking.h
+++ b/include/linux/rmap-locking.h
@@ -10,8 +10,8 @@
struct pte_chain;
extern kmem_cache_t *pte_chain_cache;
-#define pte_chain_lock(page) bit_spin_lock(PG_chainlock, &page->flags)
-#define pte_chain_unlock(page) bit_spin_unlock(PG_chainlock, &page->flags)
+#define pte_chain_lock(page) bit_spin_lock(PG_chainlock, (unsigned long *)&page->flags)
+#define pte_chain_unlock(page) bit_spin_unlock(PG_chainlock, (unsigned long *)&page->flags)
struct pte_chain *pte_chain_alloc(int gfp_flags);
void __pte_chain_free(struct pte_chain *pte_chain);