[PATCH 06/14] page-replace-move-macros.patch
- From: Peter Zijlstra <a.p.zijlstra@xxxxxxxxx>
- Date: Fri, 30 Dec 2005 23:41:14 +0100
From: Peter Zijlstra <a.p.zijlstra@xxxxxxxxx>
Move some utility marco's to the new common header to they can be used
by the code moved over to page_replace.c
Signed-off-by: Peter Zijlstra <a.p.zijlstra@xxxxxxxxx>
--- linux-2.6-git.orig/include/linux/mm_page_replace.h 2005-12-10 20:50:44.000000000 +0100
+++ linux-2.6-git/include/linux/mm_page_replace.h 2005-12-10 20:53:12.000000000 +0100
@@ -6,6 +6,36 @@
#include <linux/mmzone.h>
#include <linux/mm.h>
+#define lru_to_page(_head) (list_entry((_head)->prev, struct page, lru))
+
+#ifdef ARCH_HAS_PREFETCH
+#define prefetch_prev_lru_page(_page, _base, _field) \
+ do { \
+ if ((_page)->lru.prev != _base) { \
+ struct page *prev; \
+ \
+ prev = lru_to_page(&(_page->lru)); \
+ prefetch(&prev->_field); \
+ } \
+ } while (0)
+#else
+#define prefetch_prev_lru_page(_page, _base, _field) do { } while (0)
+#endif
+
+#ifdef ARCH_HAS_PREFETCHW
+#define prefetchw_prev_lru_page(_page, _base, _field) \
+ do { \
+ if ((_page)->lru.prev != _base) { \
+ struct page *prev; \
+ \
+ prev = lru_to_page(&(_page->lru)); \
+ prefetchw(&prev->_field); \
+ } \
+ } while (0)
+#else
+#define prefetchw_prev_lru_page(_page, _base, _field) do { } while (0)
+#endif
+
void __page_replace_insert(struct zone *, struct page *);
static inline void page_replace_activate(struct page *page)
{
--- linux-2.6-git.orig/mm/vmscan.c 2005-12-10 20:50:44.000000000 +0100
+++ linux-2.6-git/mm/vmscan.c 2005-12-10 20:53:12.000000000 +0100
@@ -104,36 +104,6 @@
long nr; /* objs pending delete */
};
-#define lru_to_page(_head) (list_entry((_head)->prev, struct page, lru))
-
-#ifdef ARCH_HAS_PREFETCH
-#define prefetch_prev_lru_page(_page, _base, _field) \
- do { \
- if ((_page)->lru.prev != _base) { \
- struct page *prev; \
- \
- prev = lru_to_page(&(_page->lru)); \
- prefetch(&prev->_field); \
- } \
- } while (0)
-#else
-#define prefetch_prev_lru_page(_page, _base, _field) do { } while (0)
-#endif
-
-#ifdef ARCH_HAS_PREFETCHW
-#define prefetchw_prev_lru_page(_page, _base, _field) \
- do { \
- if ((_page)->lru.prev != _base) { \
- struct page *prev; \
- \
- prev = lru_to_page(&(_page->lru)); \
- prefetchw(&prev->_field); \
- } \
- } while (0)
-#else
-#define prefetchw_prev_lru_page(_page, _base, _field) do { } while (0)
-#endif
-
/*
* From 0 .. 100. Higher means more swappy.
*/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
- References:
- [PATCH] vm: page-replace and clockpro
- From: Peter Zijlstra
- [PATCH] vm: page-replace and clockpro
- Prev by Date: [PATCH 04/14] page-replace-activate_page.patch
- Next by Date: [PATCH 5/9] clockpro-ignore_token.patch
- Previous by thread: [PATCH 04/14] page-replace-activate_page.patch
- Next by thread: [PATCH 5/9] clockpro-ignore_token.patch
- Index(es):
Relevant Pages
- [PATCH 3/5] Call security hooks conditionally if the security_op is filled out.
... static inline int security_ptrace (struct task_struct * parent, ... #ifdef
CONFIG_SECURITY ... (Linux-Kernel) - [PATCH 17/17] BLOCK: Make it possible to disable the block layer [try #2]
... +config BLOCK ... +#ifdef CONFIG_BLOCK ... tristate "ROM file
system support" ... (Linux-Kernel) - [PATCH 18/18] [PATCH] BLOCK: Make it possible to disable the block layer [try #3]
... +config BLOCK ... +#ifdef CONFIG_BLOCK ... tristate "ROM file
system support" ... (Linux-Kernel) - [PATCH 18/18] [PATCH] BLOCK: Make it possible to disable the block layer [try #4]
... +config BLOCK ... +#ifdef CONFIG_BLOCK ... tristate "ROM file
system support" ... (Linux-Kernel) - [PATCH 10/12] FS-Cache: Make kAFS use FS-Cache
... -/* cache.h: ... +#ifdef CONFIG_AFS_FSCACHE ... if (ret
< 0) ... (Linux-Kernel)