From: Mel Gorman <mel@csn.ul.ie>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: stable@kernel.org, linux-kernel@vger.kernel.org,
"linux-mm@kvack.org" <linux-mm@kvack.org>,
Frans Pop <elendil@planet.nl>, Jiri Kosina <jkosina@suse.cz>,
Sven Geggus <lists@fuchsschwanzdomain.de>,
Karol Lewandowski <karol.k.lewandowski@gmail.com>,
Tobias Oetiker <tobi@oetiker.ch>,
KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>,
Pekka Enberg <penberg@cs.helsinki.fi>,
Rik van Riel <riel@redhat.com>,
Christoph Lameter <cl@linux-foundation.org>,
Stephan von Krawczynski <skraw@ithnet.com>,
Kernel Testers List <kernel-testers@vger.kernel.org>
Subject: Re: [PATCH 3/3] vmscan: Force kswapd to take notice faster when high-order watermarks are being hit
Date: Wed, 28 Oct 2009 10:29:36 +0000 [thread overview]
Message-ID: <20091028102936.GS8900@csn.ul.ie> (raw)
In-Reply-To: <20091027131905.410ec04a.akpm@linux-foundation.org>
On Tue, Oct 27, 2009 at 01:19:05PM -0700, Andrew Morton wrote:
> On Tue, 27 Oct 2009 13:40:33 +0000
> Mel Gorman <mel@csn.ul.ie> wrote:
>
> > When a high-order allocation fails, kswapd is kicked so that it reclaims
> > at a higher-order to avoid direct reclaimers stall and to help GFP_ATOMIC
> > allocations. Something has changed in recent kernels that affect the timing
> > where high-order GFP_ATOMIC allocations are now failing with more frequency,
> > particularly under pressure. This patch forces kswapd to notice sooner that
> > high-order allocations are occuring.
> >
>
> "something has changed"? Shouldn't we find out what that is?
>
We've been trying but the answer right now is "lots". There were some
changes in the allocator itself which were unintentional and fixed in
patches 1 and 2 of this series. The two other major changes are
iwlagn is now making high order GFP_ATOMIC allocations which didn't
help. This is being addressed separetly and I believe the relevant
patches are now in mainline.
The other major change appears to be in page writeback. Reverting
commits 373c0a7e + 8aa7e847 significantly helps one bug reporter but
it's still unknown as to why that is.
The latter is still being investigated but as the patches in this series
are known to help some bug reporters with their GFP_ATOMIC failures and
it is being reported against latest mainline and -stable, I felt it was
best to help some of the bug reporters now to reduce duplicate reports.
> > ---
> > mm/vmscan.c | 9 +++++++++
> > 1 files changed, 9 insertions(+), 0 deletions(-)
> >
> > diff --git a/mm/vmscan.c b/mm/vmscan.c
> > index 64e4388..7eceb02 100644
> > --- a/mm/vmscan.c
> > +++ b/mm/vmscan.c
> > @@ -2016,6 +2016,15 @@ loop_again:
> > priority != DEF_PRIORITY)
> > continue;
> >
> > + /*
> > + * Exit the function now and have kswapd start over
> > + * if it is known that higher orders are required
> > + */
> > + if (pgdat->kswapd_max_order > order) {
> > + all_zones_ok = 1;
> > + goto out;
> > + }
> > +
> > if (!zone_watermark_ok(zone, order,
> > high_wmark_pages(zone), end_zone, 0))
> > all_zones_ok = 0;
>
> So this handles the case where some concurrent thread or interrupt
> increases pgdat->kswapd_max_order while kswapd was running
> balance_pgdat(), yes?
>
Right.
> Does that actually happen much? Enough for this patch to make any
> useful difference?
>
Apparently, yes. Wireless drivers in particularly seem to be very
high-order GFP_ATOMIC happy.
> If one where to whack a printk in that `if' block, how often would it
> trigger, and under what circumstances?
I don't know the frequency. The circumstances are "under load" when
there are drivers depending on high-order allocations but the
reproduction cases are unreliable.
Do you want me to slap together a patch that adds a vmstat counter for
this? I can then ask future bug reporters to examine that counter and see
if it really is a major factor for a lot of people or not.
> If the -stable maintainers were to ask me "why did you send this" then
> right now my answer would have to be "I have no idea". Help.
>
--
Mel Gorman
Part-time Phd Student Linux Technology Center
University of Limerick IBM Dublin Software Lab
--
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>
next prev parent reply other threads:[~2009-10-28 10:29 UTC|newest]
Thread overview: 46+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-27 13:40 [PATCH 0/3] Reduce GFP_ATOMIC allocation failures, partial fix V3 Mel Gorman
2009-10-27 13:40 ` [PATCH 1/3] page allocator: Always wake kswapd when restarting an allocation attempt after direct reclaim failed Mel Gorman
2009-10-27 13:40 ` [PATCH 2/3] page allocator: Do not allow interrupts to use ALLOC_HARDER Mel Gorman
[not found] ` <1256650833-15516-3-git-send-email-mel-wPRd99KPJ+uzQB+pC5nmwQ@public.gmane.org>
2009-10-27 20:09 ` Andrew Morton
2009-10-27 21:12 ` David Rientjes
2009-10-31 18:40 ` Pavel Machek
2009-10-31 19:51 ` David Rientjes
2009-10-31 20:11 ` Pavel Machek
2009-10-31 21:19 ` David Rientjes
2009-10-31 22:29 ` Pavel Machek
2009-10-31 22:55 ` Rik van Riel
2009-11-01 7:35 ` Pavel Machek
2009-11-01 12:37 ` KOSAKI Motohiro
2009-11-01 14:44 ` Rik van Riel
2009-11-01 19:32 ` Pavel Machek
2009-11-02 16:38 ` Christoph Lameter
2009-10-31 23:59 ` Rik van Riel
2009-11-02 16:42 ` Christoph Lameter
2009-11-02 20:53 ` David Rientjes
2009-11-03 17:10 ` Christoph Lameter
2009-11-04 1:46 ` David Rientjes
2009-11-04 9:01 ` Pavel Machek
2009-11-09 10:11 ` Mel Gorman
2009-10-28 10:24 ` Mel Gorman
2009-10-27 13:40 ` [PATCH 3/3] vmscan: Force kswapd to take notice faster when high-order watermarks are being hit Mel Gorman
2009-10-27 18:18 ` Rik van Riel
2009-10-27 20:19 ` Andrew Morton
2009-10-28 3:54 ` KOSAKI Motohiro
2009-10-28 10:29 ` Mel Gorman [this message]
2009-10-28 19:47 ` Andrew Morton
2009-11-02 16:05 ` Mel Gorman
2009-11-02 17:32 ` Frans Pop
2009-11-02 17:38 ` Mel Gorman
2009-11-02 20:36 ` Mel Gorman
2009-11-03 22:01 ` Frans Pop
2009-11-03 22:08 ` Mel Gorman
2009-11-04 0:01 ` Frans Pop
2009-11-04 1:18 ` Mel Gorman
2009-11-04 2:05 ` Frans Pop
2009-11-04 2:08 ` Frans Pop
2009-11-04 15:48 ` Mel Gorman
2009-11-04 20:57 ` Frans Pop
2009-11-05 16:48 ` [PATCH 3/3] vmscan: Force kswapd to take notice faster when high-order watermarks are being hit (data on latencies available) Mel Gorman
2009-11-12 11:36 ` Frans Pop
2009-11-04 2:08 ` [PATCH 3/3] vmscan: Force kswapd to take notice faster when high-order watermarks are being hit Mel Gorman
2009-10-28 13:02 ` [PATCH 0/3] Reduce GFP_ATOMIC allocation failures, partial fix V3 Karol Lewandowski
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=20091028102936.GS8900@csn.ul.ie \
--to=mel@csn.ul.ie \
--cc=akpm@linux-foundation.org \
--cc=cl@linux-foundation.org \
--cc=elendil@planet.nl \
--cc=jkosina@suse.cz \
--cc=karol.k.lewandowski@gmail.com \
--cc=kernel-testers@vger.kernel.org \
--cc=kosaki.motohiro@jp.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=lists@fuchsschwanzdomain.de \
--cc=penberg@cs.helsinki.fi \
--cc=riel@redhat.com \
--cc=skraw@ithnet.com \
--cc=stable@kernel.org \
--cc=tobi@oetiker.ch \
/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