Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 347345
b: refs/heads/master
c: cda73a1
h: refs/heads/master
i:
  347343: 4dec3a8
v: v3
  • Loading branch information
Zlatko Calusic authored and Linus Torvalds committed Dec 20, 2012
1 parent 9832c41 commit 64b103b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 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: f01af9f85855e38fbd601e033a8eac204cc4cc1c
refs/heads/master: cda73a10eb3f493871ed39f468db50a65ebeddce
12 changes: 6 additions & 6 deletions trunk/mm/vmscan.c
Original file line number Diff line number Diff line change
Expand Up @@ -2570,7 +2570,7 @@ static bool prepare_kswapd_sleep(pg_data_t *pgdat, int order, long remaining,
static unsigned long balance_pgdat(pg_data_t *pgdat, int order,
int *classzone_idx)
{
int all_zones_ok;
struct zone *unbalanced_zone;
unsigned long balanced;
int i;
int end_zone = 0; /* Inclusive. 0 = ZONE_DMA */
Expand Down Expand Up @@ -2604,7 +2604,7 @@ static unsigned long balance_pgdat(pg_data_t *pgdat, int order,
unsigned long lru_pages = 0;
int has_under_min_watermark_zone = 0;

all_zones_ok = 1;
unbalanced_zone = NULL;
balanced = 0;

/*
Expand Down Expand Up @@ -2743,7 +2743,7 @@ static unsigned long balance_pgdat(pg_data_t *pgdat, int order,
}

if (!zone_balanced(zone, testorder, 0, end_zone)) {
all_zones_ok = 0;
unbalanced_zone = zone;
/*
* We are still under min water mark. This
* means that we have a GFP_ATOMIC allocation
Expand Down Expand Up @@ -2776,7 +2776,7 @@ static unsigned long balance_pgdat(pg_data_t *pgdat, int order,
pfmemalloc_watermark_ok(pgdat))
wake_up(&pgdat->pfmemalloc_wait);

if (all_zones_ok || (order && pgdat_balanced(pgdat, balanced, *classzone_idx)))
if (!unbalanced_zone || (order && pgdat_balanced(pgdat, balanced, *classzone_idx)))
break; /* kswapd: all done */
/*
* OK, kswapd is getting into trouble. Take a nap, then take
Expand All @@ -2786,7 +2786,7 @@ static unsigned long balance_pgdat(pg_data_t *pgdat, int order,
if (has_under_min_watermark_zone)
count_vm_event(KSWAPD_SKIP_CONGESTION_WAIT);
else
congestion_wait(BLK_RW_ASYNC, HZ/10);
wait_iff_congested(unbalanced_zone, BLK_RW_ASYNC, HZ/10);
}

/*
Expand All @@ -2805,7 +2805,7 @@ static unsigned long balance_pgdat(pg_data_t *pgdat, int order,
* high-order: Balanced zones must make up at least 25% of the node
* for the node to be balanced
*/
if (!(all_zones_ok || (order && pgdat_balanced(pgdat, balanced, *classzone_idx)))) {
if (unbalanced_zone && (!order || !pgdat_balanced(pgdat, balanced, *classzone_idx))) {
cond_resched();

try_to_freeze();
Expand Down

0 comments on commit 64b103b

Please sign in to comment.