linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Pekka Enberg <penberg@kernel.org>
Cc: Christoph Lameter <cl@gentwo.org>,
	Sasha Levin <sasha.levin@oracle.com>,
	"linux-mm@kvack.org" <linux-mm@kvack.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] slab: prevent warnings when allocating with __GFP_NOWARN
Date: Tue, 11 Jun 2013 15:34:54 -0700	[thread overview]
Message-ID: <20130611153454.6ab17ce44bc4a678b8bf72d4@linux-foundation.org> (raw)
In-Reply-To: <51B73F38.6040802@kernel.org>

On Tue, 11 Jun 2013 18:16:08 +0300 Pekka Enberg <penberg@kernel.org> wrote:

> On Tue, 11 Jun 2013, Sasha Levin wrote:
> >> I think that leaving the warning makes sense to catch similar
> >> things which are actually bugs - we had a similar issue with
> >> /dev/kmsg (if I remember correctly) which actually pointed to
> >> a bug.
> 
> On 6/11/13 6:14 PM, Christoph Lameter wrote:
> > Right. Requesting an allocation larger than even supported by the page
> > allocator from the slab allocators that are specializing in allocations of
> > small objects is usually an indication of a problem in the code.
> 
> So you're OK with going forward with Sasha's patch?

Yes please.  slab should honour __GFP_NOWARN.

__GFP_NOWARN is frequently used by kernel code to probe for "how big an
allocation can I get".  That's a bit lame, but it's used on slow paths
and is pretty simple.

In the case of pipe_set_size(), it's userspace who is doing the
probing: an application can request a huge pipe buffer and if that
fails, try again with a smaller one.  It's just wrong to emit a kernel
warning in this case.  Plus, we've already reported the failure
anyway, by returning -ENOMEM from pipe_fcntl().

--
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:[~2013-06-11 22:34 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-10 19:18 Sasha Levin
2013-06-10 19:31 ` Pekka Enberg
2013-06-10 19:56   ` Sasha Levin
2013-06-10 23:40     ` Christoph Lameter
2013-06-11  0:54       ` Sasha Levin
2013-06-11  6:28         ` Pekka Enberg
2013-06-11 13:16           ` Sasha Levin
2013-06-11 15:14             ` Christoph Lameter
2013-06-11 15:16               ` Pekka Enberg
2013-06-11 15:23                 ` Christoph Lameter
2013-06-11 15:44                   ` Sasha Levin
2013-06-11 16:13                     ` Eric Dumazet
2013-06-11 16:19                       ` Sasha Levin
2013-06-11 16:37                         ` Eric Dumazet
2013-06-11 16:43                           ` Dave Jones
2013-06-11 19:02                           ` Sasha Levin
2013-06-12 13:01                           ` Christoph Lameter
2013-06-11 16:28                       ` Christoph Lameter
2013-06-11 22:34                 ` Andrew Morton [this message]
2013-06-13  7:03                   ` Pekka Enberg
2013-06-11 22:10               ` David Rientjes
2013-06-11 15:08         ` Christoph Lameter

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=20130611153454.6ab17ce44bc4a678b8bf72d4@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=cl@gentwo.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=penberg@kernel.org \
    --cc=sasha.levin@oracle.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