* [PATCH v2 -mmotm-2010-01-06-14-34] check high watermark after shrink zone
@ 2010-01-10 23:48 Minchan Kim
2010-01-11 3:46 ` Rik van Riel
0 siblings, 1 reply; 2+ messages in thread
From: Minchan Kim @ 2010-01-10 23:48 UTC (permalink / raw)
To: Andrew Morton
Cc: KOSAKI Motohiro, Mel Gorman, Rik van Riel, linux-mm, lkml,
Wu Fengguang
* V2
* Add reviewed-by singed-off (Thanks Kosaki, Wu)
* Fix typo of changelog
== CUT HERE ==
Kswapd check that zone have enough free by zone_water_mark.
If any zone doesn't have enough page, it set all_zones_ok to zero.
!all_zone_ok makes kswapd retry not sleeping.
I think the watermark check before shrink zone is pointless.
Kswapd try to shrink zone then the check is meaninful.
This patch move the check after shrink zone.
Signed-off-by: Minchan Kim <minchan.kim@gmail.com>
Reviewed-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Reviewed-by: Wu Fengguang <fengguang.wu@intel.com>
CC: Mel Gorman <mel@csn.ul.ie>
CC: Rik van Riel <riel@redhat.com>
---
mm/vmscan.c | 21 +++++++++++----------
1 files changed, 11 insertions(+), 10 deletions(-)
diff --git a/mm/vmscan.c b/mm/vmscan.c
index 885207a..b81adf8 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -2057,9 +2057,6 @@ loop_again:
priority != DEF_PRIORITY)
continue;
- if (!zone_watermark_ok(zone, order,
- high_wmark_pages(zone), end_zone, 0))
- all_zones_ok = 0;
temp_priority[i] = priority;
sc.nr_scanned = 0;
note_zone_scanning_priority(zone, priority);
@@ -2099,13 +2096,17 @@ loop_again:
total_scanned > sc.nr_reclaimed + sc.nr_reclaimed / 2)
sc.may_writepage = 1;
- /*
- * We are still under min water mark. it mean we have
- * GFP_ATOMIC allocation failure risk. Hurry up!
- */
- if (!zone_watermark_ok(zone, order, min_wmark_pages(zone),
- end_zone, 0))
- has_under_min_watermark_zone = 1;
+ if (!zone_watermark_ok(zone, order,
+ high_wmark_pages(zone), end_zone, 0)) {
+ all_zones_ok = 0;
+ /*
+ * We are still under min water mark. it mean we have
+ * GFP_ATOMIC allocation failure risk. Hurry up!
+ */
+ if (!zone_watermark_ok(zone, order, min_wmark_pages(zone),
+ end_zone, 0))
+ has_under_min_watermark_zone = 1;
+ }
}
if (all_zones_ok)
--
1.5.6.3
--
Kind regards,
Minchan Kim
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2 -mmotm-2010-01-06-14-34] check high watermark after shrink zone
2010-01-10 23:48 [PATCH v2 -mmotm-2010-01-06-14-34] check high watermark after shrink zone Minchan Kim
@ 2010-01-11 3:46 ` Rik van Riel
0 siblings, 0 replies; 2+ messages in thread
From: Rik van Riel @ 2010-01-11 3:46 UTC (permalink / raw)
To: Minchan Kim
Cc: Andrew Morton, KOSAKI Motohiro, Mel Gorman, linux-mm, lkml,
Wu Fengguang
On 01/10/2010 06:48 PM, Minchan Kim wrote:
>
>
> * V2
> * Add reviewed-by singed-off (Thanks Kosaki, Wu)
> * Fix typo of changelog
>
> == CUT HERE ==
>
> Kswapd check that zone have enough free by zone_water_mark.
> If any zone doesn't have enough page, it set all_zones_ok to zero.
> !all_zone_ok makes kswapd retry not sleeping.
>
> I think the watermark check before shrink zone is pointless.
> Kswapd try to shrink zone then the check is meaninful.
>
> This patch move the check after shrink zone.
>
> Signed-off-by: Minchan Kim<minchan.kim@gmail.com>
> Reviewed-by: KOSAKI Motohiro<kosaki.motohiro@jp.fujitsu.com>
> Reviewed-by: Wu Fengguang<fengguang.wu@intel.com>
> CC: Mel Gorman<mel@csn.ul.ie>
> CC: Rik van Riel<riel@redhat.com>
Acked-by: Rik van Riel <riel@redhat.com>
--
All rights reversed.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-01-11 3:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-10 23:48 [PATCH v2 -mmotm-2010-01-06-14-34] check high watermark after shrink zone Minchan Kim
2010-01-11 3:46 ` Rik van Riel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).