Re: [PATCH] mm: vmscan: fix setting reclaim mode

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jan 10, 2012 at 5:44 PM, Mel Gorman <mgorman@xxxxxxx> wrote:
> On Sun, Jan 08, 2012 at 03:05:03PM +0800, Hillf Danton wrote:
>> The check for under memory pressure is corrected, then lumpy reclaim or
>> reclaim/compaction could be avoided either when for order-O reclaim or
>> when free pages are already low enough.
>>
>
> No explanation of problem, how this patch fixes it or what the impact
> is.
>
> At a glance, this will have the impact of using sync reclaim at low
> reclaim priorities. This is unexpected so needs much better explanation.
>

Hi Mel

It is reprepared, please review again.

Thanks
Hillf

===cut please===
From: Hillf Danton <dhillf@xxxxxxxxx>
[PATCH] mm: vmscan: fix setting reclaim mode

The comment says, initially assume we are entering either lumpy reclaim or
reclaim/compaction, and depending on the reclaim order, we will either set the
sync mode or just reclaim order-0 pages later.

On other hand, order-0 reclaim, instead of sync reclaim, is expected when
under memory pressure, but the check for memory pressure is incorrect,
leading to sync reclaim at low reclaim priorities.

And the result is sync reclaim is set for high priorities.


Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@xxxxxxxxxxxxxx>
Cc: David Rientjes <rientjes@xxxxxxxxxx>
Cc: Mel Gorman <mgorman@xxxxxxx>
Cc: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
Signed-off-by: Hillf Danton <dhillf@xxxxxxxxx>
---

--- a/mm/vmscan.c	Thu Dec 29 20:20:16 2011
+++ b/mm/vmscan.c	Tue Jan 10 23:03:48 2012
@@ -387,7 +387,7 @@ static void set_reclaim_mode(int priorit
 	 */
 	if (sc->order > PAGE_ALLOC_COSTLY_ORDER)
 		sc->reclaim_mode |= syncmode;
-	else if (sc->order && priority < DEF_PRIORITY - 2)
+	else if (sc->order && priority >= DEF_PRIORITY - 2)
 		sc->reclaim_mode |= syncmode;
 	else
 		sc->reclaim_mode = RECLAIM_MODE_SINGLE | RECLAIM_MODE_ASYNC;

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]