Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 54268
b: refs/heads/master
c: b1296cc
h: refs/heads/master
v: v3
  • Loading branch information
Rafael J. Wysocki authored and Linus Torvalds committed May 7, 2007
1 parent 081fea4 commit d4a208f
Show file tree
Hide file tree
Showing 2 changed files with 10 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: d1d241cc2c5feec057c370aa71637380b1b945d5
refs/heads/master: b1296cc48b39355241470ef934a5e2270e3f23bd
13 changes: 9 additions & 4 deletions trunk/mm/vmscan.c
Original file line number Diff line number Diff line change
Expand Up @@ -1323,8 +1323,6 @@ static int kswapd(void *p)
for ( ; ; ) {
unsigned long new_order;

try_to_freeze();

prepare_to_wait(&pgdat->kswapd_wait, &wait, TASK_INTERRUPTIBLE);
new_order = pgdat->kswapd_max_order;
pgdat->kswapd_max_order = 0;
Expand All @@ -1335,12 +1333,19 @@ static int kswapd(void *p)
*/
order = new_order;
} else {
schedule();
if (!freezing(current))
schedule();

order = pgdat->kswapd_max_order;
}
finish_wait(&pgdat->kswapd_wait, &wait);

balance_pgdat(pgdat, order);
if (!try_to_freeze()) {
/* We can speed up thawing tasks if we don't call
* balance_pgdat after returning from the refrigerator
*/
balance_pgdat(pgdat, order);
}
}
return 0;
}
Expand Down

0 comments on commit d4a208f

Please sign in to comment.