lkml.org 
[lkml]   [2011]   [Jul]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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@intel.com>
> Acked-by: Mel Gorman <mgorman@suse.de>
Reviewed-by: Minchan Kim <minchan.kim@gmail.com>

--
Kind regards,
Minchan Kim


\
 
 \ /
  Last update: 2011-07-29 10:59    [W:0.135 / U:0.196 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site