[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <6E3BC7F7C9A4BF4286DD4C043110F30B5B69FE1A4F@shsmsx502.ccr.corp.intel.com>
Date: Fri, 29 Jul 2011 23:33:26 +0800
From: "Shi, Alex" <alex.shi@...el.com>
To: Minchan Kim <minchan.kim@...il.com>
CC: "linux-mm@...ck.org" <linux-mm@...ck.org>,
"P@...igBrady.com" <P@...igBrady.com>,
"mgorman@...e.de" <mgorman@...e.de>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"andrea@...share.com" <andrea@...share.com>,
"Chen, Tim C" <tim.c.chen@...el.com>,
"Li, Shaohua" <shaohua.li@...el.com>,
"akpm@...ux-foundation.org" <akpm@...ux-foundation.org>,
"riel@...hat.com" <riel@...hat.com>, "luto@....edu" <luto@....edu>
Subject: RE: [PATCH] kswapd: assign new_order and new_classzone_idx after
wakeup in sleeping
> -----Original Message-----
> From: Minchan Kim [mailto:minchan.kim@...il.com]
> Sent: Friday, July 29, 2011 4:57 PM
> To: Shi, Alex
> Cc: majordomo@...ck.org; P@...igBrady.com; mgorman@...e.de;
> linux-kernel@...r.kernel.org; andrea@...share.com; Chen, Tim C; Li,
> Shaohua; akpm@...ux-foundation.org; riel@...hat.com; luto@....edu
> Subject: Re: [PATCH] kswapd: assign new_order and new_classzone_idx after
> wakeup in sleeping
>
> On Fri, Jul 29, 2011 at 09:34:42AM +0800, Alex Shi wrote:
> > There 2 place to read pgdat in kswapd. One is return from a successful
> > balance, another is waked up from sleeping. But the new_order and
> > new_classzone_idx are not assigned after kswapd_try_to_sleep(), that
> > will cause a bug in the following scenario.
> >
> > After the last time successful balance, kswapd goes to sleep. So the
> > new_order and new_classzone_idx were assigned to 0 and MAX-1 since there
> > is no new wakeup during last time balancing. Now, a new wakeup came and
> > finish balancing successful with order > 0. But since new_order is still
> > 0, this time successful balancing were judged as a failed balance. so,
> > if there is another new wakeup coming during balancing, kswapd cann't
> > read this and still want to try to sleep. And if the new wakeup is a
> > tighter request, kswapd may goes to sleep, not to do balancing. That is
> > incorrect.
> >
> > So, to avoid above problem, the new_order and new_classzone_idx need to
> > be assigned for later successful comparison.
> >
> > Paidrag Brady, Could like do a retry for your problem on this patch?
> >
> > Signed-off-by: Alex Shi <alex.shi@...el.com>
> > Acked-by: Mel Gorman <mgorman@...e.de>
> Reviewed-by: Minchan Kim <minchan.kim@...il.com>
Thanks for review.
BTW, I remove the incorrect email address of linux-mm. sorry for this!
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists