Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 22466
b: refs/heads/master
c: fb8d14e
h: refs/heads/master
v: v3
  • Loading branch information
Wu Fengguang authored and Linus Torvalds committed Mar 22, 2006
1 parent aceee1e commit 43f21a1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 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: c9b02d970c385a253edb36c87643b0df706b50b4
refs/heads/master: fb8d14e172a29ba5ac69a73b61196be86fdfc3e1
9 changes: 5 additions & 4 deletions trunk/mm/vmscan.c
Original file line number Diff line number Diff line change
Expand Up @@ -1132,9 +1132,6 @@ static unsigned long shrink_inactive_list(unsigned long max_scan,
zone->pages_scanned += nr_scan;
spin_unlock_irq(&zone->lru_lock);

if (nr_taken == 0)
goto done;

nr_scanned += nr_scan;
nr_freed = shrink_page_list(&page_list, sc);
nr_reclaimed += nr_freed;
Expand All @@ -1146,6 +1143,9 @@ static unsigned long shrink_inactive_list(unsigned long max_scan,
__mod_page_state_zone(zone, pgscan_direct, nr_scan);
__mod_page_state_zone(zone, pgsteal, nr_freed);

if (nr_taken == 0)
goto done;

spin_lock(&zone->lru_lock);
/*
* Put back any unfreeable pages.
Expand All @@ -1166,8 +1166,9 @@ static unsigned long shrink_inactive_list(unsigned long max_scan,
}
}
} while (nr_scanned < max_scan);
spin_unlock_irq(&zone->lru_lock);
spin_unlock(&zone->lru_lock);
done:
local_irq_enable();
pagevec_release(&pvec);
return nr_reclaimed;
}
Expand Down

0 comments on commit 43f21a1

Please sign in to comment.