linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Jiri Slaby <jslaby@suse.cz>
To: Johannes Weiner <hannes@cmpxchg.org>
Cc: Zdenek Kabelac <zkabelac@redhat.com>,
	Mel Gorman <mgorman@suse.de>,
	Andrew Morton <akpm@linux-foundation.org>,
	Rik van Riel <riel@redhat.com>,
	George Spelvin <linux@horizon.com>,
	Johannes Hirte <johannes.hirte@fem.tu-ilmenau.de>,
	Thorsten Leemhuis <fedora@leemhuis.info>,
	Tomas Racek <tracek@redhat.com>, Jan Kara <jack@suse.cz>,
	Dave Hansen <dave@linux.vnet.ibm.com>,
	Josh Boyer <jwboyer@gmail.com>,
	Valdis.Kletnieks@vt.edu, Bruno Wolff III <bruno@wolff.to>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: kswapd craziness in 3.7
Date: Sat, 08 Dec 2012 11:35:46 +0100	[thread overview]
Message-ID: <50C31802.7030506@suse.cz> (raw)
In-Reply-To: <20121204161131.GB24381@cmpxchg.org>

On 12/04/2012 05:11 PM, Johannes Weiner wrote:
> On Tue, Dec 04, 2012 at 10:15:09AM +0100, Jiri Slaby wrote:
>> It does not apply to -next :/. Should I try anything else?
> 
> The COMPACTION_BUILD changed to IS_ENABLED(CONFIG_COMPACTION), below
> is a -next patch.  I hope you don't run into other problems that come
> out of -next craziness, because Linus is kinda waiting for this to be
> resolved to release 3.8.  If you've always tested against -next so far
> and it worked otherwise, don't change the environment now, please.  If
> you just started, it would make more sense to test based on 3.7-rc8.
> 
> Thanks!
> 
> ---
> From: Johannes Weiner <hannes@cmpxchg.org>
> Subject: [patch] mm: vmscan: do not keep kswapd looping forever due
>  to individual uncompactable zones
> 
> When a zone meets its high watermark and is compactable in case of
> higher order allocations, it contributes to the percentage of the
> node's memory that is considered balanced.
> 
> This requirement, that a node be only partially balanced, came about
> when kswapd was desparately trying to balance tiny zones when all
> bigger zones in the node had plenty of free memory.  Arguably, the
> same should apply to compaction: if a significant part of the node is
> balanced enough to run compaction, do not get hung up on that tiny
> zone that might never get in shape.
> 
> When the compaction logic in kswapd is reached, we know that at least
> 25% of the node's memory is balanced properly for compaction (see
> zone_balanced and pgdat_balanced).  Remove the individual zone checks
> that restart the kswapd cycle.
> 
> Otherwise, we may observe more endless looping in kswapd where the
> compaction code loops back to reclaim because of a single zone and
> reclaim does nothing because the node is considered balanced overall.
> 
> Reported-by: Thorsten Leemhuis <fedora@leemhuis.info>
> Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>

Looks like it's gone with this patch now. Hopefully the send button
won't trigger the issue the same as the last time :).

> ---
>  mm/vmscan.c | 16 ----------------
>  1 file changed, 16 deletions(-)
> 
> diff --git a/mm/vmscan.c b/mm/vmscan.c
> index 3b0aef4..486100f 100644
> --- a/mm/vmscan.c
> +++ b/mm/vmscan.c
> @@ -2806,22 +2806,6 @@ static unsigned long balance_pgdat(pg_data_t *pgdat, int order,
>  			if (!populated_zone(zone))
>  				continue;
>  
> -			if (zone->all_unreclaimable &&
> -			    sc.priority != DEF_PRIORITY)
> -				continue;
> -
> -			/* Would compaction fail due to lack of free memory? */
> -			if (IS_ENABLED(CONFIG_COMPACTION) &&
> -			    compaction_suitable(zone, order) == COMPACT_SKIPPED)
> -				goto loop_again;
> -
> -			/* Confirm the zone is balanced for order-0 */
> -			if (!zone_watermark_ok(zone, 0,
> -					high_wmark_pages(zone), 0, 0)) {
> -				order = sc.order = 0;
> -				goto loop_again;
> -			}
> -
>  			/* Check if the memory needs to be defragmented. */
>  			if (zone_watermark_ok(zone, order,
>  				    low_wmark_pages(zone), *classzone_idx, 0))
> 


-- 
js
suse labs

--
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/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  parent reply	other threads:[~2012-12-08 10:35 UTC|newest]

Thread overview: 65+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-27 20:48 kswapd craziness in 3.7 Johannes Weiner
2012-11-27 20:48 ` [patch] mm: vmscan: fix kswapd endless loop on higher order allocation Johannes Weiner
2012-11-27 20:58 ` kswapd craziness in 3.7 Linus Torvalds
2012-11-27 21:16   ` Rik van Riel
2012-11-27 21:49     ` Johannes Weiner
2012-11-27 22:02       ` Rik van Riel
2012-11-27 22:26         ` Johannes Weiner
2012-11-27 23:19           ` Linus Torvalds
2012-11-28 10:13             ` Mel Gorman
2012-11-28 10:51               ` Thorsten Leemhuis
2012-11-28 16:42               ` Mel Gorman
2012-11-28 22:52               ` Andrew Morton
2012-11-28 23:54                 ` Mel Gorman
2012-11-29  0:14                   ` Andrew Morton
2012-11-29 15:30                   ` Thorsten Leemhuis
2012-11-29 17:05                     ` Johannes Weiner
2012-11-30 12:39                       ` Thorsten Leemhuis
2012-12-01  0:45                         ` Johannes Weiner
2012-12-03  8:30                           ` Thorsten Leemhuis
2012-12-03 13:08                             ` Fedora repo (was: Re: kswapd craziness in 3.7) Borislav Petkov
2012-12-03 19:42                             ` kswapd craziness in 3.7 Johannes Weiner
2012-12-04 21:42                               ` Johannes Weiner
2012-12-05  3:01                                 ` Bruno Wolff III
2012-12-06 17:37                                   ` Bruno Wolff III
2012-12-06 19:31                                     ` Linus Torvalds
2012-12-06 19:43                                       ` Rik van Riel
2012-12-06 20:23                                       ` Johannes Weiner
2012-12-06 20:32                                         ` Rik van Riel
2012-12-08 12:06                                       ` Zlatko Calusic
2012-12-08 21:22                                         ` Zlatko Calusic
2012-12-09  1:01                                           ` Linus Torvalds
2012-12-09 21:59                                             ` Zdenek Kabelac
2012-12-10 11:03                                             ` Mel Gorman
2012-12-10 16:39                                               ` Johannes Weiner
2012-12-10 18:01                                                 ` Mel Gorman
2012-12-10 18:33                                                   ` Zlatko Calusic
2012-12-10 19:13                                                     ` Linus Torvalds
2012-12-10 20:35                                                       ` Zlatko Calusic
2012-12-10 21:28                                                         ` Linus Torvalds
2012-12-10 21:42                                                           ` Borislav Petkov
2012-12-10 21:47                                                             ` Linus Torvalds
2012-12-10 21:54                                                               ` Borislav Petkov
2012-12-10 22:15                                                                 ` Zlatko Calusic
2012-12-10 23:27                                                           ` Hugh Dickins
2012-12-11  0:19                                                         ` Zlatko Calusic
2012-12-11 21:56                                                           ` Zlatko Calusic
2012-12-19 22:24                                                           ` Zlatko Calusic
2012-12-10 18:29                                               ` Zlatko Calusic
2012-12-06  8:09                               ` Thorsten Leemhuis
2012-11-27 21:29   ` Johannes Weiner
2012-11-28 13:35   ` Zdenek Kabelac
2012-11-28 14:04     ` Jiri Slaby
2012-11-28  9:45 ` Mel Gorman
2012-12-03 15:23   ` Zdenek Kabelac
2012-12-03 19:18     ` Johannes Weiner
2012-12-04  9:05       ` Zdenek Kabelac
2012-12-04  9:15         ` Jiri Slaby
2012-12-04 16:11           ` Johannes Weiner
2012-12-04 16:22             ` Jiri Slaby
2012-12-04 19:50               ` Johannes Weiner
2012-12-08 10:35             ` Jiri Slaby [this message]
2012-12-04 16:15         ` Johannes Weiner
2012-12-06 13:51         ` Zdenek Kabelac
2012-12-03 13:14 ` Jiri Slaby
2012-12-04  8:55   ` Jiri Slaby

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=50C31802.7030506@suse.cz \
    --to=jslaby@suse.cz \
    --cc=Valdis.Kletnieks@vt.edu \
    --cc=akpm@linux-foundation.org \
    --cc=bruno@wolff.to \
    --cc=dave@linux.vnet.ibm.com \
    --cc=fedora@leemhuis.info \
    --cc=hannes@cmpxchg.org \
    --cc=jack@suse.cz \
    --cc=johannes.hirte@fem.tu-ilmenau.de \
    --cc=jwboyer@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linux@horizon.com \
    --cc=mgorman@suse.de \
    --cc=riel@redhat.com \
    --cc=torvalds@linux-foundation.org \
    --cc=tracek@redhat.com \
    --cc=zkabelac@redhat.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;
as well as URLs for NNTP newsgroup(s).