Add a another page flag that can be used to figure out if a compound
page is virtually mapped. The mark is necessary since we have to know
when freeing pages if we have to destroy a virtual mapping.
No additional flag is needed. We use PG_swapcache together with PG_compound
(similar to PageHead() and PageTail()) to signal that a compound
page is virtually mapped. PG_swapcache is not used at this point since
compound pages cannot be put onto the LRU (yet).
Signed-off-by: Christoph Lameter <clameter@sgi.com>
---
include/linux/page-flags.h | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
Index: linux-2.6.25-rc5-mm1/include/linux/page-flags.h
===================================================================
--- linux-2.6.25-rc5-mm1.orig/include/linux/page-flags.h 2008-03-20 17:40:16.141487362 -0700
+++ linux-2.6.25-rc5-mm1/include/linux/page-flags.h 2008-03-20 17:41:58.768233703 -0700
@@ -196,6 +196,24 @@ static inline int PageHighMem(struct pag
}
#endif
+/*
+ * PG_swapcache is used in combination with PG_compound to indicate
+ * that a compound page was allocated via vmalloc.
+ */
+#define PG_vcompound_mask ((1L << PG_compound) | (1L << PG_swapcache))
+#define PageVcompound(page) ((page->flags & PG_vcompound_mask) \
+ == PG_vcompound_mask)
+
+static inline void __SetPageVcompound(struct page *page)
+{
+ page->flags |= PG_vcompound_mask;
+}
+
+static inline void __ClearPageVcompound(struct page *page)
+{
+ page->flags &= ~PG_vcompound_mask;
+}
+
#ifdef CONFIG_SWAP
PAGEFLAG(SwapCache, swapcache)
#else
--
--
| Linus Torvalds | Linux 2.6.27 |
| Bart Van Assche | Integration of SCST in the mainstream Linux kernel |
| Greg KH | [GIT PATCH] driver core patches against 2.6.24 |
| Alan Cox | [PATCH 00/80] TTY updates for 2.6.28 |
git: | |
| Linus Torvalds | People unaware of the importance of "git gc"? |
| Linus Torvalds | [PATCH 1/6] diff-lib: use ce_mode_from_stat() rather than messing with modes manua... |
| Joakim Tjernlund | git-svn set-tree bug |
| Robert Collins | Re: VCS comparison table |
| Marcos Laufer | dmesg IBM x3650 OpenBSD 4.3 |
| Richard Stallman | Real men don't attack straw men |
| GVG GVG | ssh_exchange_identification: Connection closed by remote host |
| Samuel Moñux | Cyrus IMAP performance problems [Long] |
| Pekka Enberg | Re: [rfc][patch 3/3] use SLAB_ALIGN_SMP |
| Frithjof Hammer | Re: [LARTC] ifb and ppp |
| Evgeniy Polyakov | [2/3] POHMELFS: Documentation. |
| Maxim Levitsky | How I can reset TCP sockets after long suspend/resume cyscle |
| How to make my PCIE ATA storage device running in Linux | 5 hours ago | Linux general |
| sata/ide timeout errors on asus server-mb | 9 hours ago | Linux kernel |
| Shared swap partition | 9 hours ago | Linux general |
| usb mic not detected | 14 hours ago | Applications and Utilities |
| Problem in Inserting a module | 14 hours ago | Linux kernel |
| Treason Uncloaked | 20 hours ago | Linux kernel |
| high memory | 3 days ago | Linux kernel |
| semaphore access speed | 3 days ago | Applications and Utilities |
| the kernel how to power off the machine | 3 days ago | Linux kernel |
| Easter Eggs in windows XP | 3 days ago | Windows |
