Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 126261
b: refs/heads/master
c: 73ce02e
h: refs/heads/master
i:
  126259: 9bf9ea0
v: v3
  • Loading branch information
KOSAKI Motohiro authored and Linus Torvalds committed Jan 6, 2009
1 parent 8782d73 commit df3da16
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 594fe1a044325bb0a1a49ca7d086e3df4f1df59a
refs/heads/master: 73ce02e96fe34a983199a9855b2ae738f960a6ee
17 changes: 17 additions & 0 deletions trunk/mm/vmscan.c
Original file line number Diff line number Diff line change
Expand Up @@ -1867,6 +1867,23 @@ static unsigned long balance_pgdat(pg_data_t *pgdat, int order)

try_to_freeze();

/*
* Fragmentation may mean that the system cannot be
* rebalanced for high-order allocations in all zones.
* At this point, if nr_reclaimed < SWAP_CLUSTER_MAX,
* it means the zones have been fully scanned and are still
* not balanced. For high-order allocations, there is
* little point trying all over again as kswapd may
* infinite loop.
*
* Instead, recheck all watermarks at order-0 as they
* are the most important. If watermarks are ok, kswapd will go
* back to sleep. High-order users can still perform direct
* reclaim if they wish.
*/
if (sc.nr_reclaimed < SWAP_CLUSTER_MAX)
order = sc.order = 0;

goto loop_again;
}

Expand Down

0 comments on commit df3da16

Please sign in to comment.