Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 83779
b: refs/heads/master
c: 436c654
h: refs/heads/master
i:
  83777: 5bd2101
  83775: 6e5029a
v: v3
  • Loading branch information
Hugh Dickins authored and Linus Torvalds committed Feb 7, 2008
1 parent 3892ba1 commit 73a15d6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 14 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: ff7283fa3a66823933991ad55a558a3a01d5ab27
refs/heads/master: 436c6541b13a73790646eb11429bdc8ee50eec41
17 changes: 4 additions & 13 deletions trunk/mm/memcontrol.c
Original file line number Diff line number Diff line change
Expand Up @@ -260,24 +260,20 @@ unsigned long mem_cgroup_isolate_pages(unsigned long nr_to_scan,
spin_lock(&mem_cont->lru_lock);
scan = 0;
list_for_each_entry_safe_reverse(pc, tmp, src, lru) {
if (scan++ > nr_to_scan)
if (scan >= nr_to_scan)
break;
page = pc->page;
VM_BUG_ON(!pc);

if (unlikely(!PageLRU(page))) {
scan--;
if (unlikely(!PageLRU(page)))
continue;
}

if (PageActive(page) && !active) {
__mem_cgroup_move_lists(pc, true);
scan--;
continue;
}
if (!PageActive(page) && active) {
__mem_cgroup_move_lists(pc, false);
scan--;
continue;
}

Expand All @@ -288,13 +284,8 @@ unsigned long mem_cgroup_isolate_pages(unsigned long nr_to_scan,
if (page_zone(page) != z)
continue;

/*
* Check if the meta page went away from under us
*/
if (!list_empty(&pc->lru))
list_move(&pc->lru, &pc_list);
else
continue;
scan++;
list_move(&pc->lru, &pc_list);

if (__isolate_lru_page(page, mode) == 0) {
list_move(&page->lru, dst);
Expand Down

0 comments on commit 73a15d6

Please sign in to comment.