linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: reinette chatre <reinette.chatre@intel.com>
To: Mel Gorman <mel@csn.ul.ie>
Cc: Frans Pop <elendil@planet.nl>,
	David Rientjes <rientjes@google.com>,
	KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>,
	"Rafael J. Wysocki" <rjw@sisk.pl>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Kernel Testers List <kernel-testers@vger.kernel.org>,
	Pekka Enberg <penberg@cs.helsinki.fi>,
	Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>,
	Karol Lewandowski <karol.k.lewandowski@gmail.com>,
	"Abbas, Mohamed" <mohamed.abbas@intel.com>,
	"John W. Linville" <linville@tuxdriver.com>,
	"linux-mm@kvack.org" <linux-mm@kvack.org>
Subject: Re: [Bug #14141] order 2 page allocation failures in iwlagn
Date: Wed, 14 Oct 2009 09:28:00 -0700	[thread overview]
Message-ID: <1255537680.21134.14.camel@rc-desk> (raw)
In-Reply-To: <20091014103002.GA5027@csn.ul.ie>

Hi Mel,

On Wed, 2009-10-14 at 03:30 -0700, Mel Gorman wrote:
> From 5fb9f897117bf2701f9fdebe4d008dbe34358ab9 Mon Sep 17 00:00:00 2001
> From: Mel Gorman <mel@csn.ul.ie>
> Date: Wed, 14 Oct 2009 11:19:57 +0100
> Subject: [PATCH] iwlwifi: Suppress warnings related to GFP_ATOMIC allocations that do not matter
> 
> iwlwifi refills RX buffers in two ways - a direct method using GFP_ATOMIC
> and a tasklet method using GFP_KERNEL. There are a number of RX buffers and
> there are only serious issues when there are no RX buffers left. The driver
> explicitly warns when refills are failing and the buffers are low but it
> always warns when a GFP_ATOMIC allocation fails even when there is no
> packet loss as a result.


No, it does not always warn when a GFP_ATOMIC allocation fails. Please
check earlier in iwl_rx_allocate() we have:

if (rxq->free_count > RX_LOW_WATERMARK)
	priority |= __GFP_NOWARN;

So it will suppress warnings as long as we have buffers available.

We do want to see warnings if memory is below watermark and allocation
fails - your patch prevents these warnings from appearing.

> This patch specifies __GFP_NOWARN for the direct refill method that uses
> GFP_ATOMIC. To help identify where allocation failures might be coming
> from, the stack is dumped when the RX queue is dangerously low.
> 
> Signed-off-by: Mel Gorman <mel@csn.ul.ie>
> --- 
>  drivers/net/wireless/iwlwifi/iwl-rx.c |    6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/Documentation/trace/postprocess/trace-pagealloc-postprocess.pl b/Documentation/trace/postprocess/trace-pagealloc-postprocess.pl
> old mode 100644
> new mode 100755
> diff --git a/drivers/net/wireless/iwlwifi/iwl-rx.c b/drivers/net/wireless/iwlwifi/iwl-rx.c
> index 8e1bb53..f91a108 100644
> --- a/drivers/net/wireless/iwlwifi/iwl-rx.c
> +++ b/drivers/net/wireless/iwlwifi/iwl-rx.c
> @@ -260,10 +260,12 @@ void iwl_rx_allocate(struct iwl_priv *priv, gfp_t priority)
>  			if (net_ratelimit())
>  				IWL_DEBUG_INFO(priv, "Failed to allocate SKB buffer.\n");
>  			if ((rxq->free_count <= RX_LOW_WATERMARK) &&
> -			    net_ratelimit())
> +			    net_ratelimit()) {
>  				IWL_CRIT(priv, "Failed to allocate SKB buffer with %s. Only %u free buffers remaining.\n",
>  					 priority == GFP_ATOMIC ?  "GFP_ATOMIC" : "GFP_KERNEL",
>  					 rxq->free_count);
> +				dump_stack();
> +			}
>  			/* We don't reschedule replenish work here -- we will
>  			 * call the restock method and if it still needs
>  			 * more buffers it will schedule replenish */
> @@ -320,7 +322,7 @@ EXPORT_SYMBOL(iwl_rx_replenish);
>  
>  void iwl_rx_replenish_now(struct iwl_priv *priv)
>  {
> -	iwl_rx_allocate(priv, GFP_ATOMIC);
> +	iwl_rx_allocate(priv, GFP_ATOMIC|__GFP_NOWARN);
>  
>  	iwl_rx_queue_restock(priv);
>  }

--
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:[~2009-10-14 16:28 UTC|newest]

Thread overview: 88+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <3onW63eFtRF.A.xXH.oMTxKB@chimera>
     [not found] ` <COE24pZSBH.A.k2B.ZNTxKB@chimera>
     [not found]   ` <200910021111.55749.elendil@planet.nl>
2009-10-05  5:13     ` [Bug #14141] order 2 page allocation failures in iwlagn Frans Pop
2009-10-05  6:50       ` Frans Pop
2009-10-05  8:54         ` Frans Pop
2009-10-05  8:57         ` Mel Gorman
2009-10-05 21:34           ` Frans Pop
2009-10-06  0:04             ` David Rientjes
2009-10-06  1:25               ` KOSAKI Motohiro
2009-10-06  8:53               ` Mel Gorman
2009-10-06  9:14                 ` David Rientjes
2009-10-06  9:22                   ` Mel Gorman
2009-10-06 10:23               ` Frans Pop
2009-10-11 23:10         ` Frans Pop
2009-10-11 23:36           ` Frans Pop
2009-10-12 13:43           ` Mel Gorman
2009-10-12 17:32             ` Frans Pop
2009-10-12 18:43               ` Mel Gorman
2009-10-13 20:38               ` Frans Pop
2009-10-14 10:30                 ` Mel Gorman
2009-10-14 13:10                   ` Frans Pop
2009-10-14 15:40                     ` Mel Gorman
2009-10-14 16:13                       ` Frans Pop
2009-10-14 18:34                       ` Frans Pop
2009-10-14 23:56                         ` Mel Gorman
2009-10-15 20:15                           ` Frans Pop
2009-10-16  9:39                             ` Mel Gorman
2009-10-14 16:30                     ` reinette chatre
2009-10-18 23:33                     ` Frans Pop
2009-10-19  0:36                       ` Pekka Enberg
2009-10-19  2:44                         ` Frans Pop
2009-10-19  9:49                           ` [Bug #14141] order 2 page allocation failures (generic) Tobi Oetiker
2009-10-19  9:54                             ` Pekka Enberg
2009-10-19 14:01                               ` Karol Lewandowski
2009-10-19 14:06                                 ` Mel Gorman
2009-10-19 17:09                                   ` Karol Lewandowski
2009-10-20  1:47                                     ` Karol Lewandowski
2009-10-19 13:31                             ` Mel Gorman
2009-10-19 13:40                               ` Tobias Oetiker
2009-10-19 14:09                                 ` Mel Gorman
2009-10-19 14:16                                   ` Tobias Oetiker
2009-10-19 14:59                                     ` Mel Gorman
2009-10-19 20:12                                       ` Tobias Oetiker
2009-10-19 20:17                                         ` Tobias Oetiker
2009-10-20 10:57                                           ` Mel Gorman
2009-10-20 11:44                                             ` Tobias Oetiker
2009-10-20 12:51                                               ` Mel Gorman
2009-10-20 12:58                                                 ` Tobias Oetiker
2009-10-20 13:39                                                   ` Mel Gorman
2009-10-20 13:50                                                     ` Tobias Oetiker
2009-10-20 14:14                                                       ` Mel Gorman
2009-10-20 14:20                                                         ` Tobias Oetiker
2009-10-22 10:27                                                     ` Tobias Oetiker
2009-10-19  2:52                         ` [Bug #14141] order 2 page allocation failures in iwlagn Jens Axboe
2009-10-19 14:01                       ` Mel Gorman
2009-10-19 16:18                         ` Chris Mason
2009-10-19 17:01                           ` Christoph Hellwig
2009-10-19 17:01                           ` Christoph Hellwig
2009-10-19 21:57                             ` Chris Mason
2009-10-20 10:48                           ` Mel Gorman
2009-10-20 10:48                           ` Mel Gorman
2009-10-26 21:06                             ` Frans Pop
2009-10-27 14:54                               ` Mel Gorman
2009-10-27 15:16                                 ` KOSAKI Motohiro
2009-10-27 15:21                                   ` Mel Gorman
2009-10-27 15:52                                 ` Mel Gorman
2009-10-27 16:03                                   ` Chris Mason
2009-10-27 17:21                                     ` Frans Pop
2009-10-27 17:21                                     ` Frans Pop
2009-11-05 20:14                               ` Frans Pop
2009-11-06  9:51                                 ` Frans Pop
2009-11-09 19:00                                   ` Mel Gorman
2009-10-25 18:54                           ` Frans Pop
2009-10-14 16:28                   ` reinette chatre [this message]
2009-10-14 16:50                     ` Mel Gorman
2009-10-14 20:41                       ` reinette chatre
2009-10-14 21:33                         ` Frans Pop
2009-10-14 21:55                           ` reinette chatre
2009-10-15  2:02                         ` Frans Pop
2009-10-15 15:29                           ` reinette chatre
2009-10-15 19:41                             ` Frans Pop
2009-10-16 17:21                               ` reinette chatre
2009-10-17  5:42                               ` reinette chatre
2009-10-27 11:10                                 ` Frans Pop
2009-10-27 16:15                                   ` reinette chatre
     [not found] ` <COE24pZSBH.A.rP.2MTxKB@chimera>
2009-10-21 20:04   ` [PATCH] SLUB: Don't drop __GFP_NOFAIL completely from allocate_slab() (was: Re: [Bug #14265] ifconfig: page allocation failure. order:5,ode:0x8020 w/ e100) Karol Lewandowski
2009-10-21 21:06     ` David Rientjes
2009-10-21 21:20       ` Karol Lewandowski
2009-10-22 10:20         ` Mel Gorman
2009-10-22 21:33           ` 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=1255537680.21134.14.camel@rc-desk \
    --to=reinette.chatre@intel.com \
    --cc=bzolnier@gmail.com \
    --cc=elendil@planet.nl \
    --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=linville@tuxdriver.com \
    --cc=mel@csn.ul.ie \
    --cc=mohamed.abbas@intel.com \
    --cc=penberg@cs.helsinki.fi \
    --cc=rientjes@google.com \
    --cc=rjw@sisk.pl \
    /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).