linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Peter Zijlstra <a.p.zijlstra@chello.nl>
To: linux-mm@kvack.org, linux-kernel@vger.kernel.org
Cc: Andrew Morton <akpm@osdl.org>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Christoph Lameter <christoph@lameter.com>,
	Wu Fengguang <wfg@mail.ustc.edu.cn>,
	Nick Piggin <npiggin@suse.de>, Marijn Meijles <marijn@bitpit.net>,
	Rik van Riel <riel@redhat.com>,
	Marcelo Tosatti <marcelo.tosatti@cyclades.com>
Subject: [PATCH 8/9] clockpro-rename_PG_active.patch
Date: Fri, 30 Dec 2005 23:43:54 +0100	[thread overview]
Message-ID: <20051230224332.765.97486.sendpatchset@twins.localnet> (raw)
In-Reply-To: <20051230223952.765.21096.sendpatchset@twins.localnet>

From: Peter Zijlstra <a.p.zijlstra@chello.nl>

New sematics, new name. Since the semantics of PG_activate changed
drastically with the clockpro code, change its name.

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>

 fs/exec.c                       |    2 +-
 include/linux/mm_page_replace.h |    4 ++--
 include/linux/page-flags.h      |   12 ++++++------
 mm/clockpro.c                   |   22 +++++++++++-----------
 mm/hugetlb.c                    |    2 +-
 mm/memory.c                     |    6 +++---
 mm/page_alloc.c                 |    6 +++---
 mm/swap.c                       |    2 +-
 mm/swap_state.c                 |    2 +-
 mm/vmscan.c                     |    2 +-
 10 files changed, 30 insertions(+), 30 deletions(-)

Index: linux-2.6-git/fs/exec.c
===================================================================
--- linux-2.6-git.orig/fs/exec.c
+++ linux-2.6-git/fs/exec.c
@@ -321,7 +321,7 @@ void install_arg_page(struct vm_area_str
 		goto out;
 	}
 	inc_mm_counter(mm, anon_rss);
-	SetPageActive(page);
+	SetPageHot(page);
 	lru_cache_add(page);
 	set_pte_at(mm, address, pte, pte_mkdirty(pte_mkwrite(mk_pte(
 					page, vma->vm_page_prot))));
Index: linux-2.6-git/include/linux/mm_page_replace.h
===================================================================
--- linux-2.6-git.orig/include/linux/mm_page_replace.h
+++ linux-2.6-git/include/linux/mm_page_replace.h
@@ -61,7 +61,7 @@ void page_replace_remember(struct zone *
 static inline
 void __page_replace_rotate_reclaimable(struct zone *zone, struct page *page)
 {
-	if (PageLRU(page) && !PageActive(page)) {
+	if (PageLRU(page) && !PageHot(page)) {
 		list_move_tail(&page->lru, &zone->list_hand[hand_cold]);
 		inc_page_state(pgrotated);
 	}
@@ -72,7 +72,7 @@ del_page_from_lru(struct zone *zone, str
 {
 	list_del(&page->lru);
 	--zone->nr_resident;
-	if (!TestClearPageActive(page))
+	if (!TestClearPageHot(page))
 		--zone->nr_cold;
 }
 
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
@@ -58,7 +58,7 @@
 
 #define PG_dirty	 	 4
 #define PG_lru			 5
-#define PG_active		 6
+#define PG_hot			 6
 #define PG_slab			 7	/* slab debug (Suparna wants this) */
 
 #define PG_checked		 8	/* kill me in 2.5.<early>. */
@@ -205,11 +205,11 @@ extern void __mod_page_state(unsigned lo
 #define TestSetPageLRU(page)	test_and_set_bit(PG_lru, &(page)->flags)
 #define TestClearPageLRU(page)	test_and_clear_bit(PG_lru, &(page)->flags)
 
-#define PageActive(page)	test_bit(PG_active, &(page)->flags)
-#define SetPageActive(page)	set_bit(PG_active, &(page)->flags)
-#define ClearPageActive(page)	clear_bit(PG_active, &(page)->flags)
-#define TestClearPageActive(page) test_and_clear_bit(PG_active, &(page)->flags)
-#define TestSetPageActive(page) test_and_set_bit(PG_active, &(page)->flags)
+#define PageHot(page)		test_bit(PG_hot, &(page)->flags)
+#define SetPageHot(page)	set_bit(PG_hot, &(page)->flags)
+#define ClearPageHot(page)	clear_bit(PG_hot, &(page)->flags)
+#define TestClearPageHot(page)	test_and_clear_bit(PG_hot, &(page)->flags)
+#define TestSetPageHot(page)	test_and_set_bit(PG_hot, &(page)->flags)
 
 #define PageSlab(page)		test_bit(PG_slab, &(page)->flags)
 #define SetPageSlab(page)	set_bit(PG_slab, &(page)->flags)
Index: linux-2.6-git/mm/clockpro.c
===================================================================
--- linux-2.6-git.orig/mm/clockpro.c
+++ linux-2.6-git/mm/clockpro.c
@@ -127,7 +127,7 @@ void __select_list_hand(struct zone *zon
  * Insert page into @zones clock and update adaptive parameters.
  *
  * Several page flags are used for insertion hints:
- *  PG_active - insert as an active page
+ *  PG_hot - insert as an active page
  *  PG_test - use the use-once logic
  *
  * For now we will ignore the active hint; the use once logic is
@@ -142,8 +142,8 @@ void __page_replace_insert(struct zone *
 
 	rflags = nonresident_get(page_mapping(page), page_index(page));
 
-	/* ignore the PG_active hint */
-	ClearPageActive(page);
+	/* ignore the PG_hot hint */
+	ClearPageHot(page);
 
 	/* abuse the PG_test flag for pagecache use-once */
 	if (!TestClearPageTest(page)) {
@@ -153,7 +153,7 @@ void __page_replace_insert(struct zone *
 		 * ie. right behind Hcold.
 		 */
 		if (rflags & NR_found) {
-			SetPageActive(page);
+			SetPageHot(page);
 			__cold_target_inc(zone, 1);
 		} else {
 			SetPageTest(page);
@@ -233,7 +233,7 @@ static int isolate_lru_pages(struct zone
 		} else {
 			list_add(&page->lru, dst);
 			nr_taken++;
-			if (!PageActive(page))
+			if (!PageHot(page))
 				--zone->nr_cold;
 		}
 	}
@@ -258,7 +258,7 @@ static void __page_release(struct zone *
 {
 	if (TestSetPageLRU(page))
 		BUG();
-	if (!PageActive(page))
+	if (!PageHot(page))
 		++zone->nr_cold;
 	++zone->nr_resident;
 
@@ -311,14 +311,14 @@ void page_replace_activate(struct page *
 {
 	int hot, test;
 
-	hot = PageActive(page);
+	hot = PageHot(page);
 	test = PageTest(page);
 
 	if (hot) {
 		BUG_ON(test);
 	} else {
 		if (test) {
-			SetPageActive(page);
+			SetPageHot(page);
 			/*
 			 * Leave PG_test set for new hot pages in order to
 			 * recognise then in reinsert() and do accounting.
@@ -358,7 +358,7 @@ void page_replace_reinsert(struct zone *
 		struct page *page = lru_to_page(page_list);
 		prefetchw_prev_lru_page(page, page_list, flags);
 
-		if (PageActive(page) && PageTest(page)) {
+		if (PageHot(page) && PageTest(page)) {
 			ClearPageTest(page);
 			++dct;
 		}
@@ -515,7 +515,7 @@ static void rotate_hot(struct zone *zone
 		struct page *page = lru_to_page(&l_hold);
 		prefetchw_prev_lru_page(page, &l_hold, flags);
 
-		if (PageActive(page)) {
+		if (PageHot(page)) {
 			BUG_ON(PageTest(page));
 
 			/*
@@ -528,7 +528,7 @@ static void rotate_hot(struct zone *zone
 			if (/*(((reclaim_mapped && mapped) || !mapped) ||
 			     (total_swap_pages == 0 && PageAnon(page))) && */
 			    !page_referenced(page, 0, 1)) {
-				ClearPageActive(page);
+				ClearPageHot(page);
 				++pgdeactivate;
 			}
 
Index: linux-2.6-git/mm/hugetlb.c
===================================================================
--- linux-2.6-git.orig/mm/hugetlb.c
+++ linux-2.6-git/mm/hugetlb.c
@@ -145,7 +145,7 @@ static void update_and_free_page(struct 
 	nr_huge_pages_node[page_zone(page)->zone_pgdat->node_id]--;
 	for (i = 0; i < (HPAGE_SIZE / PAGE_SIZE); i++) {
 		page[i].flags &= ~(1 << PG_locked | 1 << PG_error | 1 << PG_referenced |
-				1 << PG_dirty | 1 << PG_active | 1 << PG_reserved |
+				1 << PG_dirty | 1 << PG_hot | 1 << PG_reserved |
 				1 << PG_private | 1<< PG_writeback);
 		set_page_count(&page[i], 0);
 	}
Index: linux-2.6-git/mm/memory.c
===================================================================
--- linux-2.6-git.orig/mm/memory.c
+++ linux-2.6-git/mm/memory.c
@@ -1521,7 +1521,7 @@ gotten:
 		ptep_establish(vma, address, page_table, entry);
 		update_mmu_cache(vma, address, entry);
 		lazy_mmu_prot_update(entry);
-		SetPageActive(new_page);
+		SetPageHot(new_page);
 		lru_cache_add(new_page);
 		page_add_anon_rmap(new_page, vma, address);
 
@@ -1978,7 +1978,7 @@ static int do_anonymous_page(struct mm_s
 		if (!pte_none(*page_table))
 			goto release;
 		inc_mm_counter(mm, anon_rss);
-		SetPageActive(page);
+		SetPageHot(page);
 		lru_cache_add(page);
 		SetPageReferenced(page);
 		page_add_anon_rmap(page, vma, address);
@@ -2111,7 +2111,7 @@ retry:
 		set_pte_at(mm, address, page_table, entry);
 		if (anon) {
 			inc_mm_counter(mm, anon_rss);
-			SetPageActive(new_page);
+			SetPageHot(new_page);
 			lru_cache_add(new_page);
 			page_add_anon_rmap(new_page, vma, address);
 		} else {
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
@@ -136,7 +136,7 @@ static void bad_page(const char *functio
 	page->flags &= ~(1 << PG_lru	|
 			1 << PG_private |
 			1 << PG_locked	|
-			1 << PG_active	|
+			1 << PG_hot	|
 			1 << PG_dirty	|
 			1 << PG_reclaim |
 			1 << PG_slab    |
@@ -344,7 +344,7 @@ static inline int free_pages_check(const
 			1 << PG_lru	|
 			1 << PG_private |
 			1 << PG_locked	|
-			1 << PG_active	|
+			1 << PG_hot	|
 			1 << PG_reclaim	|
 			1 << PG_slab	|
 			1 << PG_swapcache |
@@ -481,7 +481,7 @@ static int prep_new_page(struct page *pa
 			1 << PG_lru	|
 			1 << PG_private	|
 			1 << PG_locked	|
-			1 << PG_active	|
+			1 << PG_hot	|
 			1 << PG_dirty	|
 			1 << PG_reclaim	|
 			1 << PG_slab    |
Index: linux-2.6-git/mm/swap.c
===================================================================
--- linux-2.6-git.orig/mm/swap.c
+++ linux-2.6-git/mm/swap.c
@@ -75,7 +75,7 @@ int rotate_reclaimable_page(struct page 
 		return 1;
 	if (PageDirty(page))
 		return 1;
-	if (PageActive(page))
+	if (PageHot(page))
 		return 1;
 	if (!PageLRU(page))
 		return 1;
Index: linux-2.6-git/mm/swap_state.c
===================================================================
--- linux-2.6-git.orig/mm/swap_state.c
+++ linux-2.6-git/mm/swap_state.c
@@ -353,7 +353,7 @@ struct page *read_swap_cache_async(swp_e
 			/*
 			 * Initiate read into locked page and return.
 			 */
-			SetPageActive(new_page);
+			SetPageHot(new_page);
 			lru_cache_add(new_page);
 			swap_readpage(NULL, new_page);
 			return new_page;
Index: linux-2.6-git/mm/vmscan.c
===================================================================
--- linux-2.6-git.orig/mm/vmscan.c
+++ linux-2.6-git/mm/vmscan.c
@@ -339,7 +339,7 @@ static try_pageout_t try_pageout(struct 
 	int may_enter_fs;
 	int referenced;
 
-	if (PageActive(page))
+	if (PageHot(page))
 		goto keep;
 
 	if (TestSetPageLocked(page))

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  parent reply	other threads:[~2005-12-30 22:43 UTC|newest]

Thread overview: 66+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-12-30 22:40 [PATCH] vm: page-replace and clockpro Peter Zijlstra
2005-12-30 22:40 ` [PATCH 01/14] page-replace-single-batch-insert.patch Peter Zijlstra
2005-12-31  7:03   ` Marcelo Tosatti
2005-12-31  9:43     ` Peter Zijlstra
2005-12-31 14:44     ` Rik van Riel
2005-12-31 22:19       ` Marcelo Tosatti
2005-12-30 22:40 ` [PATCH 02/14] page-replace-try_pageout.patch Peter Zijlstra
2005-12-30 22:40 ` [PATCH 03/14] page-replace-remove-sc-from-refill.patch Peter Zijlstra
2005-12-30 22:40 ` [PATCH 04/14] page-replace-activate_page.patch Peter Zijlstra
2005-12-30 22:41 ` [PATCH 05/14] page-replace-remove-loop.patch Peter Zijlstra
2005-12-30 22:41 ` [PATCH 06/14] page-replace-move-macros.patch Peter Zijlstra
2005-12-30 22:41 ` [PATCH 07/14] page-replace-move-isolate_lru_pages.patch Peter Zijlstra
2005-12-30 22:41 ` [PATCH 08/14] page-replace-candidates.patch Peter Zijlstra
2005-12-30 22:41 ` [PATCH 09/14] page-replace-reinsert.patch Peter Zijlstra
2005-12-30 22:41 ` [PATCH 10/14] page-replace-remove-mm_inline.patch Peter Zijlstra
2005-12-30 22:42 ` [PATCH 11/14] page-replace-move-refill.patch Peter Zijlstra
2005-12-30 22:42 ` [PATCH 12/14] page-replace-rotate.patch Peter Zijlstra
2005-12-30 22:42 ` [PATCH 13/14] page-replace-init.patch Peter Zijlstra
2005-12-30 22:42 ` [PATCH 14/14] page-replace-kswapd-incmin.patch Peter Zijlstra
2005-12-31  1:15   ` Marcelo Tosatti
2005-12-31  9:40     ` Peter Zijlstra
2005-12-30 22:42 ` [PATCH 1/9] clockpro-nonresident.patch Peter Zijlstra
2005-12-31  1:13   ` Marcelo Tosatti
2005-12-31  9:54     ` Peter Zijlstra
2005-12-31 14:53       ` Rik van Riel
2005-12-31 22:20         ` Marcelo Tosatti
2005-12-30 22:42 ` [PATCH 2/9] clockpro-nonresident-del.patch Peter Zijlstra
2005-12-30 22:43 ` [PATCH 3/9] clockpro-PG_test.patch Peter Zijlstra
2005-12-30 22:43 ` [PATCH 4/9] clockpro-use-once.patch Peter Zijlstra
2005-12-30 22:43 ` [PATCH 5/9] clockpro-ignore_token.patch Peter Zijlstra
2005-12-30 22:43 ` [PATCH 6/9] clockpro-clockpro.patch Peter Zijlstra
2005-12-31  0:24   ` Marcelo Tosatti
2005-12-31  1:22     ` Rik van Riel
2005-12-31  3:27       ` Marcelo Tosatti
2005-12-31  5:24         ` Rik van Riel
2005-12-31 10:57           ` Peter Zijlstra
2005-12-31 10:48     ` Peter Zijlstra
2005-12-31 22:12       ` Marcelo Tosatti
2006-01-03 19:30         ` Christoph Lameter
2005-12-31 11:29     ` Peter Zijlstra
2006-01-05  9:47       ` IWAMOTO Toshihiro
2006-01-05 13:32         ` Rik van Riel
2006-01-06  9:01           ` IWAMOTO Toshihiro
2006-01-24  6:30             ` IWAMOTO Toshihiro
2006-01-24  7:25               ` IWAMOTO Toshihiro
2006-01-25  8:00                 ` Peter Zijlstra
2006-02-03  9:25                 ` Peter Zijlstra
2006-02-06  9:30                   ` IWAMOTO Toshihiro
2006-02-06 10:07                     ` Peter Zijlstra
2006-02-08 10:05                   ` IWAMOTO Toshihiro
2006-02-08 20:00                     ` Peter Zijlstra
2006-02-09  6:57                       ` Peter Zijlstra
2006-02-09  7:22                       ` IWAMOTO Toshihiro
2006-02-09 10:07                         ` IWAMOTO Toshihiro
2006-02-09 15:23                       ` Rik van Riel
2006-02-08  9:53                 ` IWAMOTO Toshihiro
2005-12-31 22:40   ` Marcelo Tosatti
2006-01-01 10:37     ` Peter Zijlstra
2006-01-03 12:21       ` Marcelo Tosatti
2006-02-14  7:29   ` IWAMOTO Toshihiro
2006-02-15  6:35     ` Peter Zijlstra
2006-02-16  6:25       ` IWAMOTO Toshihiro
2005-12-30 22:43 ` [PATCH 7/9] clockpro-remove-old.patch Peter Zijlstra
2005-12-30 22:43 ` Peter Zijlstra [this message]
2005-12-30 22:44 ` [PATCH 9/9] clockpro-clockpro-stats.patch Peter Zijlstra
2005-12-31 18:59 ` [PATCH 10/9] clockpro-document.patch Peter Zijlstra

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20051230224332.765.97486.sendpatchset@twins.localnet \
    --to=a.p.zijlstra@chello.nl \
    --cc=akpm@osdl.org \
    --cc=christoph@lameter.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=marcelo.tosatti@cyclades.com \
    --cc=marijn@bitpit.net \
    --cc=npiggin@suse.de \
    --cc=riel@redhat.com \
    --cc=wfg@mail.ustc.edu.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox