Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 186219
b: refs/heads/master
c: 31c0569
h: refs/heads/master
i:
  186217: f60705d
  186215: 070807d
v: v3
  • Loading branch information
Johannes Weiner authored and Linus Torvalds committed Mar 6, 2010
1 parent 956f1ab commit 18bbb59
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 24 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: dfc8d636cdb95f7b792d5ba8c9f3b295809c125d
refs/heads/master: 31c0569c3b0b6cc8a867ac6665ca081553f7984c
25 changes: 2 additions & 23 deletions trunk/mm/vmscan.c
Original file line number Diff line number Diff line change
Expand Up @@ -262,27 +262,6 @@ unsigned long shrink_slab(unsigned long scanned, gfp_t gfp_mask,
return ret;
}

/* Called without lock on whether page is mapped, so answer is unstable */
static inline int page_mapping_inuse(struct page *page)
{
struct address_space *mapping;

/* Page is in somebody's page tables. */
if (page_mapped(page))
return 1;

/* Be more reluctant to reclaim swapcache than pagecache */
if (PageSwapCache(page))
return 1;

mapping = page_mapping(page);
if (!mapping)
return 0;

/* File is mmap'd by somebody? */
return mapping_mapped(mapping);
}

static inline int is_page_cache_freeable(struct page *page)
{
/*
Expand Down Expand Up @@ -606,7 +585,7 @@ static enum page_references page_check_references(struct page *page,
if (vm_flags & VM_LOCKED)
return PAGEREF_RECLAIM;

if (page_mapping_inuse(page))
if (page_mapped(page))
return PAGEREF_ACTIVATE;

/* Reclaim if clean, defer dirty pages to writeback */
Expand Down Expand Up @@ -1381,7 +1360,7 @@ static void shrink_active_list(unsigned long nr_pages, struct zone *zone,
}

/* page_referenced clears PageReferenced */
if (page_mapping_inuse(page) &&
if (page_mapped(page) &&
page_referenced(page, 0, sc->mem_cgroup, &vm_flags)) {
nr_rotated++;
/*
Expand Down

0 comments on commit 18bbb59

Please sign in to comment.