Skip to content

Commit

Permalink
Revert "mm: implement WasActive page flag (for improving cleancache)[…
Browse files Browse the repository at this point in the history
…faux123] (Feedback welcome if there is a different/better way to do this without using a page flag!)"

This reverts commit 18ccba1.
  • Loading branch information
garwedgess committed Jun 18, 2013
1 parent e0e8a96 commit 7af6fd9
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 20 deletions.
10 changes: 0 additions & 10 deletions include/linux/page-flags.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,6 @@
* PG_hwpoison indicates that a page got corrupted in hardware and contains
* data with incorrect ECC bits that triggered a machine check. Accessing is
* not safe since it may cause another machine check. Don't touch!
*
* PG_wasactive reflects that a page previously was promoted to active status.
* Such pages should be considered higher priority for cleancache backends.
*/

/*
Expand Down Expand Up @@ -110,9 +107,6 @@ enum pageflags {
#endif
#ifdef CONFIG_MEMORY_FAILURE
PG_hwpoison, /* hardware poisoned page. Don't touch */
#endif
#ifdef CONFIG_CLEANCACHE
PG_was_active,
#endif
__NR_PAGEFLAGS,

Expand Down Expand Up @@ -223,10 +217,6 @@ __PAGEFLAG(SlobFree, slob_free)
__PAGEFLAG(SlubFrozen, slub_frozen)
__PAGEFLAG(SlubDebug, slub_debug)

#ifdef CONFIG_CLEANCACHE
PAGEFLAG(WasActive, was_active)
#endif

/*
* Private page markings that may be used by the filesystem that owns the page
* for its own purposes.
Expand Down
11 changes: 1 addition & 10 deletions mm/vmscan.c
Original file line number Diff line number Diff line change
Expand Up @@ -524,10 +524,7 @@ void putback_lru_page(struct page *page)
int was_unevictable = PageUnevictable(page);

VM_BUG_ON(PageLRU(page));
#ifdef CONFIG_CLEANCACHE
if (active)
SetPageWasActive(page);
#endif

redo:
ClearPageUnevictable(page);

Expand Down Expand Up @@ -1047,9 +1044,6 @@ static unsigned long clear_active_flags(struct list_head *page_list,
if (PageActive(page)) {
lru += LRU_ACTIVE;
ClearPageActive(page);
#ifdef CONFIG_CLEANCACHE
SetPageWasActive(page);
#endif
nr_active++;
}
count[lru]++;
Expand Down Expand Up @@ -1386,9 +1380,6 @@ static void shrink_active_list(unsigned long nr_pages, struct zone *zone,
}

ClearPageActive(page); /* we are de-activating */
#ifdef CONFIG_CLEANCACHE
SetPageWasActive(page);
#endif
list_add(&page->lru, &l_inactive);
}

Expand Down

0 comments on commit 7af6fd9

Please sign in to comment.