Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 22481
b: refs/heads/master
c: 6e5ef1a
h: refs/heads/master
i:
  22479: 52afa3e
v: v3
  • Loading branch information
Christoph Lameter authored and Linus Torvalds committed Mar 22, 2006
1 parent daaab62 commit d7d4fe8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 12 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: a7290ee08e434399660ace34427c17696e47c562
refs/heads/master: 6e5ef1a96e6e3b123da56292bc35017c8c401491
13 changes: 2 additions & 11 deletions trunk/mm/vmscan.c
Original file line number Diff line number Diff line change
Expand Up @@ -460,12 +460,9 @@ static unsigned long shrink_page_list(struct list_head *page_list,
* Anonymous process memory has backing store?
* Try to allocate it some swap space here.
*/
if (PageAnon(page) && !PageSwapCache(page)) {
if (!sc->may_swap)
goto keep_locked;
if (PageAnon(page) && !PageSwapCache(page))
if (!add_to_swap(page, GFP_ATOMIC))
goto activate_locked;
}
#endif /* CONFIG_SWAP */

mapping = page_mapping(page);
Expand All @@ -477,12 +474,6 @@ static unsigned long shrink_page_list(struct list_head *page_list,
* processes. Try to unmap it here.
*/
if (page_mapped(page) && mapping) {
/*
* No unmapping if we do not swap
*/
if (!sc->may_swap)
goto keep_locked;

switch (try_to_unmap(page, 0)) {
case SWAP_FAIL:
goto activate_locked;
Expand Down Expand Up @@ -1205,7 +1196,7 @@ static void shrink_active_list(unsigned long nr_pages, struct zone *zone,
struct pagevec pvec;
int reclaim_mapped = 0;

if (unlikely(sc->may_swap)) {
if (sc->may_swap) {
long mapped_ratio;
long distress;
long swap_tendency;
Expand Down

0 comments on commit d7d4fe8

Please sign in to comment.