linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: "Shi, Alex" <alex.shi@intel.com>
To: Minchan Kim <minchan.kim@gmail.com>
Cc: "linux-mm@kvack.org" <linux-mm@kvack.org>,
	"P@draigBrady.com" <P@draigBrady.com>,
	"mgorman@suse.de" <mgorman@suse.de>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"andrea@cpushare.com" <andrea@cpushare.com>,
	"Chen, Tim C" <tim.c.chen@intel.com>,
	"Li, Shaohua" <shaohua.li@intel.com>,
	"akpm@linux-foundation.org" <akpm@linux-foundation.org>,
	"riel@redhat.com" <riel@redhat.com>,
	"luto@mit.edu" <luto@mit.edu>
Subject: RE: [PATCH] kswapd: assign new_order and new_classzone_idx after wakeup in sleeping
Date: Fri, 29 Jul 2011 23:33:26 +0800	[thread overview]
Message-ID: <6E3BC7F7C9A4BF4286DD4C043110F30B5B69FE1A4F@shsmsx502.ccr.corp.intel.com> (raw)
In-Reply-To: <20110729085717.GC1843@barrios-desktop>

> -----Original Message-----
> From: Minchan Kim [mailto:minchan.kim@gmail.com]
> Sent: Friday, July 29, 2011 4:57 PM
> To: Shi, Alex
> Cc: majordomo@kvack.org; P@draigBrady.com; mgorman@suse.de;
> linux-kernel@vger.kernel.org; andrea@cpushare.com; Chen, Tim C; Li,
> Shaohua; akpm@linux-foundation.org; riel@redhat.com; luto@mit.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@intel.com>
> > Acked-by: Mel Gorman <mgorman@suse.de>
> Reviewed-by: Minchan Kim <minchan.kim@gmail.com>

Thanks for review. 
BTW, I remove the incorrect email address of linux-mm. sorry for this! 

--
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/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

       reply	other threads:[~2011-07-29 15:33 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1311903282-8539-1-git-send-email-alex.shi@intel.com>
     [not found] ` <20110729085717.GC1843@barrios-desktop>
2011-07-29 15:33   ` Shi, Alex [this message]
2011-07-29  1:45 Alex Shi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6E3BC7F7C9A4BF4286DD4C043110F30B5B69FE1A4F@shsmsx502.ccr.corp.intel.com \
    --to=alex.shi@intel.com \
    --cc=P@draigBrady.com \
    --cc=akpm@linux-foundation.org \
    --cc=andrea@cpushare.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=luto@mit.edu \
    --cc=mgorman@suse.de \
    --cc=minchan.kim@gmail.com \
    --cc=riel@redhat.com \
    --cc=shaohua.li@intel.com \
    --cc=tim.c.chen@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox