linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Minchan Kim <minchan.kim@gmail.com>
To: Mel Gorman <mel@csn.ul.ie>
Cc: Will Newton <will.newton@gmail.com>,
	linux-mm@kvack.org, Rik van Riel <riel@redhat.com>,
	KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>,
	Andrew Morton <akpm@linux-foundation.org>
Subject: Re: Commit f50de2d38 seems to be breaking my oom killer
Date: Fri, 8 Jan 2010 10:58:41 +0900	[thread overview]
Message-ID: <20100108105841.b9a030c4.minchan.kim@barrios-desktop> (raw)
In-Reply-To: <20100107135831.GA29564@csn.ul.ie>

Hi, Mel 

On Thu, 7 Jan 2010 13:58:31 +0000
Mel Gorman <mel@csn.ul.ie> wrote:

> vmscan: kswapd should notice that all zones are not ok if they are unreclaimble
> 
> In the event all zones are unreclaimble, it is possible for kswapd to
> never go to sleep because "all zones are ok even though watermarks are
> not reached". It gets into a situation where cond_reched() is not
> called.
> 
> This patch notes that if all zones are unreclaimable then the zones are
> not ok and cond_resched() should be called.
> 
> Signed-off-by: Mel Gorman <mel@csn.ul.ie>
> --- 
>  mm/vmscan.c |    4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/mm/vmscan.c b/mm/vmscan.c
> index 2ad8603..d3c0848 100644
> --- a/mm/vmscan.c
> +++ b/mm/vmscan.c
> @@ -2022,8 +2022,10 @@ loop_again:
>  				break;
>  			}
>  		}
> -		if (i < 0)
> +		if (i < 0) {
> +			all_zones_ok = 0;
>  			goto out;
> +		}
>  
>  		for (i = 0; i <= end_zone; i++) {
>  			struct zone *zone = pgdat->node_zones + i;
> 
> --

Nice catch!
Don't we care following as although it is rare case?

---
                for (i = 0; i <= end_zone; i++) {
                        struct zone *zone = pgdat->node_zones + i; 
                        int nr_slab;
                        int nid, zid; 

                        if (!populated_zone(zone))
                                continue;

                        if (zone_is_all_unreclaimable(zone) &&
                                        priority != DEF_PRIORITY)
                                continue;  <==== here

---

And while I review all_zones_ok'usage in balance_pgdat, 
I feel it's not consistent and rather confused. 
How about this?

== CUT_HERE ==

  parent reply	other threads:[~2010-01-08  1:59 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-07 12:34 Will Newton
2010-01-07 13:58 ` Mel Gorman
2010-01-07 14:15   ` Will Newton
2010-01-07 14:49     ` Mel Gorman
2010-01-08  1:58   ` Minchan Kim [this message]
2010-01-08  2:56     ` KOSAKI Motohiro
2010-01-08  4:08       ` KOSAKI Motohiro
2010-01-08  4:53         ` Minchan Kim
2010-01-08  5:10         ` Rik van Riel
2010-01-08  9:25         ` Mel Gorman
2010-01-08  9:32           ` KOSAKI Motohiro
2010-01-08 11:18         ` Will Newton
2010-01-10 14:37         ` Wu Fengguang

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=20100108105841.b9a030c4.minchan.kim@barrios-desktop \
    --to=minchan.kim@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=kosaki.motohiro@jp.fujitsu.com \
    --cc=linux-mm@kvack.org \
    --cc=mel@csn.ul.ie \
    --cc=riel@redhat.com \
    --cc=will.newton@gmail.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