diff options
| author | Mel Gorman <[email protected]> | 2011-01-13 15:46:26 -0800 |
|---|---|---|
| committer | Linus Torvalds <[email protected]> | 2011-01-13 17:32:37 -0800 |
| commit | dc83edd941f412e938841b4989be24aa288a1aa6 (patch) | |
| tree | 07dbc04d544f3200b3b13be1af6c57f44ffa63c8 /tools/perf/scripts/python | |
| parent | 355b09c47a0cbb73b3e65a57c03f157f2e7ddb0b (diff) | |
mm: kswapd: use the classzone idx that kswapd was using for sleeping_prematurely()
When kswapd is woken up for a high-order allocation, it takes account of
the highest usable zone by the caller (the classzone idx). During
allocation, this index is used to select the lowmem_reserve[] that should
be applied to the watermark calculation in zone_watermark_ok().
When balancing a node, kswapd considers the highest unbalanced zone to be
the classzone index. This will always be at least be the callers
classzone_idx and can be higher. However, sleeping_prematurely() always
considers the lowest zone (e.g. ZONE_DMA) to be the classzone index.
This means that sleeping_prematurely() can consider a zone to be balanced
that is unusable by the allocation request that originally woke kswapd.
This patch changes sleeping_prematurely() to use a classzone_idx matching
the value it used in balance_pgdat().
Signed-off-by: Mel Gorman <[email protected]>
Reviewed-by: Minchan Kim <[email protected]>
Reviewed-by: Eric B Munson <[email protected]>
Cc: KAMEZAWA Hiroyuki <[email protected]>
Cc: Simon Kirby <[email protected]>
Cc: KOSAKI Motohiro <[email protected]>
Cc: Shaohua Li <[email protected]>
Cc: Dave Hansen <[email protected]>
Cc: Johannes Weiner <[email protected]>
Cc: Rik van Riel <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions