From: Aaro Koskinen <aaro.koskinen@iki.fi>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: "David S. Miller" <davem@davemloft.net>,
netdev@vger.kernel.org, linux-mm@kvack.org,
linux-kernel@vger.kernel.org
Subject: Re: __napi_alloc_skb failures locking up the box
Date: Tue, 24 May 2016 00:36:04 +0300 [thread overview]
Message-ID: <20160523213604.GB1253@raspberrypi.musicnaut.iki.fi> (raw)
In-Reply-To: <1462046052.5535.190.camel@edumazet-glaptop3.roam.corp.google.com>
Hi,
On Sat, Apr 30, 2016 at 12:54:12PM -0700, Eric Dumazet wrote:
> On Sat, 2016-04-30 at 22:24 +0300, Aaro Koskinen wrote:
> > Hi,
> >
> > I have old NAS box (Thecus N2100) with 512 MB RAM, where rsync from NFS ->
> > disk reliably results in temporary out-of-memory conditions.
> >
> > When this happens the dmesg gets flooded with below logs. If the serial
> > console logging is enabled, this will lock up the box completely and
> > the backup is not making any progress.
> >
> > Shouldn't these allocation failures be ratelimited somehow (or even made
> > silent)? It doesn't sound right if I can lock up the system simply by
> > copying files...
>
> Agreed.
>
> All napi_alloc_skb() callers handle failure just fine.
>
> If they did not, a NULL deref would produce a proper stack dump.
>
> When memory gets this tight, other traces will be dumped anyway.
>
> diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
> index 15d0df943466..0652709fe81a 100644
> --- a/include/linux/skbuff.h
> +++ b/include/linux/skbuff.h
> @@ -2423,7 +2423,7 @@ struct sk_buff *__napi_alloc_skb(struct napi_struct *napi,
> static inline struct sk_buff *napi_alloc_skb(struct napi_struct *napi,
> unsigned int length)
> {
> - return __napi_alloc_skb(napi, length, GFP_ATOMIC);
> + return __napi_alloc_skb(napi, length, GFP_ATOMIC | __GFP_NOWARN);
> }
> void napi_consume_skb(struct sk_buff *skb, int budget);
Care to send this as a formal patch, so I can reply with my Tested-by?
A.
--
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>
prev parent reply other threads:[~2016-05-23 21:36 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-30 19:24 Aaro Koskinen
2016-04-30 19:54 ` Eric Dumazet
2016-05-23 21:36 ` Aaro Koskinen [this message]
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=20160523213604.GB1253@raspberrypi.musicnaut.iki.fi \
--to=aaro.koskinen@iki.fi \
--cc=davem@davemloft.net \
--cc=eric.dumazet@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=netdev@vger.kernel.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