[PATCH 3/9] clockpro-PG_test.patch
- From: Peter Zijlstra <a.p.zijlstra@xxxxxxxxx>
- Date: Fri, 30 Dec 2005 23:43:04 +0100
From: Peter Zijlstra <a.p.zijlstra@xxxxxxxxx>
Introduce a new PG_flag, needed for the clockpro work.
Signed-off-by: Peter Zijlstra <a.p.zijlstra@xxxxxxxxx>
include/linux/page-flags.h | 8 ++++++++
mm/page_alloc.c | 3 ++-
2 files changed, 10 insertions(+), 1 deletion(-)
Index: linux-2.6-git/include/linux/page-flags.h
===================================================================
--- linux-2.6-git.orig/include/linux/page-flags.h
+++ linux-2.6-git/include/linux/page-flags.h
@@ -76,6 +76,8 @@
#define PG_nosave_free 18 /* Free, should not be written */
#define PG_uncached 19 /* Page has been mapped as uncached */
+#define PG_test 20 /* Page is in its test period */
+
/*
* Global page accounting. One instance per CPU. Only unsigned longs are
* allowed.
@@ -303,6 +305,12 @@ extern void __mod_page_state(unsigned lo
#define SetPageUncached(page) set_bit(PG_uncached, &(page)->flags)
#define ClearPageUncached(page) clear_bit(PG_uncached, &(page)->flags)
+#define PageTest(page) test_bit(PG_test, &(page)->flags)
+#define SetPageTest(page) set_bit(PG_test, &(page)->flags)
+#define TestSetPageTest(page) test_and_set_bit(PG_test, &(page)->flags)
+#define ClearPageTest(page) clear_bit(PG_test, &(page)->flags)
+#define TestClearPageTest(page) test_and_clear_bit(PG_test, &(page)->flags)
+
struct page; /* forward declaration */
int test_clear_page_dirty(struct page *page);
Index: linux-2.6-git/mm/page_alloc.c
===================================================================
--- linux-2.6-git.orig/mm/page_alloc.c
+++ linux-2.6-git/mm/page_alloc.c
@@ -499,7 +499,8 @@ static int prep_new_page(struct page *pa
page->flags &= ~(1 << PG_uptodate | 1 << PG_error |
1 << PG_referenced | 1 << PG_arch_1 |
- 1 << PG_checked | 1 << PG_mappedtodisk);
+ 1 << PG_checked | 1 << PG_mappedtodisk |
+ 1 << PG_test);
set_page_private(page, 0);
set_page_refs(page, order);
kernel_map_pages(page, 1 << order, 1);
-
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 14/14] page-replace-kswapd-incmin.patch
- Next by Date: Re: [PATCH 8 of 20] ipath - core driver, part 1 of 4
- Previous by thread: Re: [PATCH 14/14] page-replace-kswapd-incmin.patch
- Next by thread: [PATCH 08/14] page-replace-candidates.patch
- Index(es):
Relevant Pages
- [PATCH 31/34] mm: cart-PG_reclaim3.patch
... Add a third PG_flag to the page reclaim framework. ... Global page accounting.
... One instance per CPU. ... Only unsigned longs are ... (Linux-Kernel) - Re: [patch] sched: accurate user accounting
... Currently we only do cpu accounting to userspace based on what is ... actually
happening precisely on each tick. ... Both ad-hoc and `/proc/stat' (idle) ...
(Linux-Kernel) - Re: [accounting regression since rc1] scheduler updates
... accounting-in-virtual-time break user expectations too? ... gave this task as
much CPU time as it could. ... As far as accounting is concerned the user doesn't
care one bit what ... without mixing external scheduling information into it. ...
(Linux-Kernel) - Re: [patch] sched: accurate user accounting
... scheduler first and check the results. ... to before RSDL and have tested it
- find the patch below. ... Currently we only do cpu accounting to userspace based
on what is ... (Linux-Kernel) - Re: [patch] sched: accurate user accounting
... we want to do this - and we should do this to the vanilla scheduler ... I've
back-merged the patch to before RSDL ... Currently we only do cpu accounting to
userspace based on what is ... (Linux-Kernel)