Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 332456
b: refs/heads/master
c: a0c5e81
h: refs/heads/master
v: v3
  • Loading branch information
Hugh Dickins authored and Linus Torvalds committed Oct 9, 2012
1 parent f61831d commit d09e5eb
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 20 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e6c509f85455041d3d7c4b863bf80bc294288cc1
refs/heads/master: a0c5e813f087dffc0d9b173d2e7d3328b1482fd5
2 changes: 1 addition & 1 deletion trunk/include/linux/vm_event_item.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ enum vm_event_item { PGPGIN, PGPGOUT, PSWPIN, PSWPOUT,
UNEVICTABLE_PGMUNLOCKED,
UNEVICTABLE_PGCLEARED, /* on COW, page truncate */
UNEVICTABLE_PGSTRANDED, /* unable to isolate on unlock */
UNEVICTABLE_MLOCKFREED,
UNEVICTABLE_MLOCKFREED, /* no longer useful: always zero */
#ifdef CONFIG_TRANSPARENT_HUGEPAGE
THP_FAULT_ALLOC,
THP_FAULT_FALLBACK,
Expand Down
17 changes: 0 additions & 17 deletions trunk/mm/page_alloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -598,17 +598,6 @@ static inline void __free_one_page(struct page *page,
zone->free_area[order].nr_free++;
}

/*
* free_page_mlock() -- clean up attempts to free and mlocked() page.
* Page should not be on lru, so no need to fix that up.
* free_pages_check() will verify...
*/
static inline void free_page_mlock(struct page *page)
{
__dec_zone_page_state(page, NR_MLOCK);
__count_vm_event(UNEVICTABLE_MLOCKFREED);
}

static inline int free_pages_check(struct page *page)
{
if (unlikely(page_mapcount(page) |
Expand Down Expand Up @@ -728,15 +717,12 @@ static bool free_pages_prepare(struct page *page, unsigned int order)
static void __free_pages_ok(struct page *page, unsigned int order)
{
unsigned long flags;
int wasMlocked = __TestClearPageMlocked(page);
int migratetype;

if (!free_pages_prepare(page, order))
return;

local_irq_save(flags);
if (unlikely(wasMlocked))
free_page_mlock(page);
__count_vm_events(PGFREE, 1 << order);
migratetype = get_pageblock_migratetype(page);
set_freepage_migratetype(page, migratetype);
Expand Down Expand Up @@ -1310,16 +1296,13 @@ void free_hot_cold_page(struct page *page, int cold)
struct per_cpu_pages *pcp;
unsigned long flags;
int migratetype;
int wasMlocked = __TestClearPageMlocked(page);

if (!free_pages_prepare(page, 0))
return;

migratetype = get_pageblock_migratetype(page);
set_freepage_migratetype(page, migratetype);
local_irq_save(flags);
if (unlikely(wasMlocked))
free_page_mlock(page);
__count_vm_event(PGFREE);

/*
Expand Down
2 changes: 1 addition & 1 deletion trunk/mm/vmstat.c
Original file line number Diff line number Diff line change
Expand Up @@ -782,7 +782,7 @@ const char * const vmstat_text[] = {
"unevictable_pgs_munlocked",
"unevictable_pgs_cleared",
"unevictable_pgs_stranded",
"unevictable_pgs_mlockfreed",
"unevictable_pgs_mlockfreed", /* no longer useful: always zero */

#ifdef CONFIG_TRANSPARENT_HUGEPAGE
"thp_fault_alloc",
Expand Down

0 comments on commit d09e5eb

Please sign in to comment.