kernel-testers.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mel Gorman <mel-wPRd99KPJ+uzQB+pC5nmwQ@public.gmane.org>
To: Andrew Morton
	<akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>,
	stable-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org
Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	"linux-mm-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.org\""
	<linux-mm-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.org>,
	Frans Pop <elendil-EIBgga6/0yRmR6Xm/wNWPw@public.gmane.org>,
	Jiri Kosina <jkosina-AlSwsSmVLrQ@public.gmane.org>,
	Sven Geggus
	<lists-+AJD3D7QEjjt/htJsj1pd9AswbaBtrod@public.gmane.org>,
	Karol Lewandowski
	<karol.k.lewandowski-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	Tobias Oetiker <tobi-7K0TWYW2a3pyDzI6CaY1VQ@public.gmane.org>,
	KOSAKI Motohiro
	<kosaki.motohiro-+CUm20s59erQFUHtdCDX3A@public.gmane.org>,
	Pekka Enberg <penberg-bbCR+/B0CizivPeTLB3BmA@public.gmane.org>,
	Rik van Riel <riel-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
	Christoph Lameter
	<cl-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>,
	Stephan von Krawczynski
	<skraw-DcQCyzbjH0jQT0dZR+AlfA@public.gmane.org>,
	"Rafael J. Wysocki" <rjw-KKrjLPT3xs0@public.gmane.org>,
	Kernel Testers List
	<kernel-testers-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	Mel Gorman <mel-wPRd99KPJ+uzQB+pC5nmwQ@public.gmane.org>
Subject: [PATCH 1/3] page allocator: Always wake kswapd when restarting an allocation attempt after direct reclaim failed
Date: Tue, 27 Oct 2009 13:40:31 +0000	[thread overview]
Message-ID: <1256650833-15516-2-git-send-email-mel@csn.ul.ie> (raw)
In-Reply-To: <1256650833-15516-1-git-send-email-mel-wPRd99KPJ+uzQB+pC5nmwQ@public.gmane.org>

If a direct reclaim makes no forward progress, it considers whether it
should go OOM or not. Whether OOM is triggered or not, it may retry the
application afterwards. In times past, this would always wake kswapd as well
but currently, kswapd is not woken up after direct reclaim fails. For order-0
allocations, this makes little difference but if there is a heavy mix of
higher-order allocations that direct reclaim is failing for, it might mean
that kswapd is not rewoken for higher orders as much as it did previously.

This patch wakes up kswapd when an allocation is being retried after a direct
reclaim failure. It would be expected that kswapd is already awake, but
this has the effect of telling kswapd to reclaim at the higher order as well.

Signed-off-by: Mel Gorman <mel-wPRd99KPJ+uzQB+pC5nmwQ@public.gmane.org>
Reviewed-by: Christoph Lameter <cl-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>
Reviewed-by: Pekka Enberg <penberg-bbCR+/B0CizivPeTLB3BmA@public.gmane.org>
Reviewed-by: KOSAKI Motohiro <kosaki.motohiro-+CUm20s59erQFUHtdCDX3A@public.gmane.org>
---
 mm/page_alloc.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index bf72055..dfa4362 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -1817,9 +1817,9 @@ __alloc_pages_slowpath(gfp_t gfp_mask, unsigned int order,
 	if (NUMA_BUILD && (gfp_mask & GFP_THISNODE) == GFP_THISNODE)
 		goto nopage;
 
+restart:
 	wake_all_kswapd(order, zonelist, high_zoneidx);
 
-restart:
 	/*
 	 * OK, we're below the kswapd watermark and have kicked background
 	 * reclaim. Now things get more complex, so set up alloc_flags according
-- 
1.6.3.3

  parent reply	other threads:[~2009-10-27 13:40 UTC|newest]

Thread overview: 45+ 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
     [not found] ` <1256650833-15516-1-git-send-email-mel-wPRd99KPJ+uzQB+pC5nmwQ@public.gmane.org>
2009-10-27 13:40   ` Mel Gorman [this message]
2009-10-28 13:02   ` Karol Lewandowski
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
     [not found]       ` <20091027130924.fa903f5a.akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>
2009-10-27 21:12         ` David Rientjes
     [not found]           ` <alpine.DEB.2.00.0910271411530.9183-X6Q0R45D7oAcqpCFd4KODRPsWskHk0ljAL8bYrjMMd8@public.gmane.org>
2009-10-31 18:40             ` Pavel Machek
2009-10-31 19:51               ` David Rientjes
2009-10-31 20:11                 ` Pavel Machek
     [not found]                   ` <20091031201158.GB29536-I/5MKhXcvmPrBKCeMvbIDA@public.gmane.org>
2009-10-31 21:19                     ` David Rientjes
2009-10-31 22:29                       ` Pavel Machek
2009-10-31 22:55                         ` Rik van Riel
     [not found]                           ` <4AECC04B.9060808-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2009-11-01  7:35                             ` Pavel Machek
     [not found]                               ` <20091101073527.GB32720-I/5MKhXcvmPrBKCeMvbIDA@public.gmane.org>
2009-11-01 12:37                                 ` KOSAKI Motohiro
2009-11-01 14:44                               ` Rik van Riel
     [not found]                                 ` <4AED9EB4.5080601-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
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
     [not found]                             ` <alpine.DEB.2.00.0911031739380.1187-X6Q0R45D7oAcqpCFd4KODRPsWskHk0ljAL8bYrjMMd8@public.gmane.org>
2009-11-04  9:01                               ` Pavel Machek
     [not found]                                 ` <20091104090140.GA14694-I/5MKhXcvmPrBKCeMvbIDA@public.gmane.org>
2009-11-09 10:11                                   ` 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
     [not found]   ` <1256650833-15516-4-git-send-email-mel-wPRd99KPJ+uzQB+pC5nmwQ@public.gmane.org>
2009-10-27 18:18     ` Rik van Riel
2009-10-27 20:19   ` Andrew Morton
     [not found]     ` <20091027131905.410ec04a.akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>
2009-10-28  3:54       ` KOSAKI Motohiro
2009-10-28 10:29       ` Mel Gorman
2009-10-28 19:47         ` Andrew Morton
     [not found]           ` <20091028124756.7af44b6b.akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>
2009-11-02 16:05             ` Mel Gorman
2009-11-02 17:32               ` Frans Pop
     [not found]                 ` <200911021832.59035.elendil-EIBgga6/0yRmR6Xm/wNWPw@public.gmane.org>
2009-11-02 17:38                   ` Mel Gorman
2009-11-02 20:36                     ` Mel Gorman
2009-11-03 22:01                     ` Frans Pop
     [not found]                       ` <200911032301.59662.elendil-EIBgga6/0yRmR6Xm/wNWPw@public.gmane.org>
2009-11-03 22:08                         ` Mel Gorman
2009-11-04  0:01                           ` Frans Pop
2009-11-04  1:18                             ` Mel Gorman
     [not found]                               ` <20091104011811.GG22046-wPRd99KPJ+uzQB+pC5nmwQ@public.gmane.org>
2009-11-04  2:05                                 ` Frans Pop
2009-11-04  2:08                                   ` Frans Pop
     [not found]                                   ` <200911040305.59352.elendil-EIBgga6/0yRmR6Xm/wNWPw@public.gmane.org>
2009-11-04 15:48                                     ` Mel Gorman
     [not found]                                       ` <20091104154853.GM22046-wPRd99KPJ+uzQB+pC5nmwQ@public.gmane.org>
2009-11-04 20:57                                         ` Frans Pop
     [not found]                                           ` <200911042157.25020.elendil-EIBgga6/0yRmR6Xm/wNWPw@public.gmane.org>
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
     [not found]                                               ` <20091105164832.GB25926-wPRd99KPJ+uzQB+pC5nmwQ@public.gmane.org>
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

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=1256650833-15516-2-git-send-email-mel@csn.ul.ie \
    --to=mel-wprd99kpj+uzqb+pc5nmwq@public.gmane.org \
    --cc=akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org \
    --cc=cl-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org \
    --cc=elendil-EIBgga6/0yRmR6Xm/wNWPw@public.gmane.org \
    --cc=jkosina-AlSwsSmVLrQ@public.gmane.org \
    --cc=karol.k.lewandowski-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=kernel-testers-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=kosaki.motohiro-+CUm20s59erQFUHtdCDX3A@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-mm-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.org \
    --cc=lists-+AJD3D7QEjjt/htJsj1pd9AswbaBtrod@public.gmane.org \
    --cc=penberg-bbCR+/B0CizivPeTLB3BmA@public.gmane.org \
    --cc=riel-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=rjw-KKrjLPT3xs0@public.gmane.org \
    --cc=skraw-DcQCyzbjH0jQT0dZR+AlfA@public.gmane.org \
    --cc=stable-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=tobi-7K0TWYW2a3pyDzI6CaY1VQ@public.gmane.org \
    /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 read-only IMAP folder(s) and NNTP newsgroup(s).