From: Matt Mackall <mpm@selenic.com>
To: "Theodore Ts'o" <tytso@mit.edu>
Cc: Christoph Lameter <cl@linux-foundation.org>,
Pekka Enberg <penberg@cs.helsinki.fi>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: Should we be using unlikely() around tests of GFP_ZERO?
Date: Mon, 03 Jan 2011 11:23:46 -0600 [thread overview]
Message-ID: <1294075426.3109.99.camel@calx> (raw)
In-Reply-To: <E1PZXeb-0004AV-2b@tytso-glaptop>
On Sun, 2011-01-02 at 18:48 -0500, Theodore Ts'o wrote:
> Given the patches being busily submitted by trivial patch submitters to
> make use kmem_cache_zalloc(), et. al, I believe we should remove the
> unlikely() tests around the (gfp_flags & __GFP_ZERO) tests, such as:
>
> - if (unlikely((flags & __GFP_ZERO) && objp))
> + if ((flags & __GFP_ZERO) && objp)
> memset(objp, 0, obj_size(cachep));
>
> Agreed? If so, I'll send a patch...
Sounds good to me.
We might consider dropping this flag and making the decision statically
(ie alloc vs zalloc), at least for slab objects.
--
Mathematics is the supreme nostalgia of our time.
WARNING: multiple messages have this Message-ID (diff)
From: Matt Mackall <mpm@selenic.com>
To: Theodore Ts'o <tytso@mit.edu>
Cc: Christoph Lameter <cl@linux-foundation.org>,
Pekka Enberg <penberg@cs.helsinki.fi>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: Should we be using unlikely() around tests of GFP_ZERO?
Date: Mon, 03 Jan 2011 11:23:46 -0600 [thread overview]
Message-ID: <1294075426.3109.99.camel@calx> (raw)
In-Reply-To: <E1PZXeb-0004AV-2b@tytso-glaptop>
On Sun, 2011-01-02 at 18:48 -0500, Theodore Ts'o wrote:
> Given the patches being busily submitted by trivial patch submitters to
> make use kmem_cache_zalloc(), et. al, I believe we should remove the
> unlikely() tests around the (gfp_flags & __GFP_ZERO) tests, such as:
>
> - if (unlikely((flags & __GFP_ZERO) && objp))
> + if ((flags & __GFP_ZERO) && objp)
> memset(objp, 0, obj_size(cachep));
>
> Agreed? If so, I'll send a patch...
Sounds good to me.
We might consider dropping this flag and making the decision statically
(ie alloc vs zalloc), at least for slab objects.
--
Mathematics is the supreme nostalgia of our time.
--
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/ .
Fight unfair telecom policy in Canada: sign http://dissolvethecrtc.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2011-01-03 17:23 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-02 23:48 Should we be using unlikely() around tests of GFP_ZERO? Theodore Ts'o
2011-01-02 23:48 ` Theodore Ts'o
2011-01-03 3:46 ` Minchan Kim
2011-01-03 3:46 ` Minchan Kim
2011-01-03 7:40 ` Pekka Enberg
2011-01-03 7:40 ` Pekka Enberg
2011-01-03 13:45 ` Steven Rostedt
2011-01-03 13:45 ` Steven Rostedt
2011-01-03 14:10 ` Pekka Enberg
2011-01-03 14:10 ` Pekka Enberg
2011-01-03 14:26 ` Steven Rostedt
2011-01-03 14:26 ` Steven Rostedt
2011-01-03 13:58 ` Ted Ts'o
2011-01-03 13:58 ` Ted Ts'o
2011-01-03 14:09 ` Pekka Enberg
2011-01-03 14:09 ` Pekka Enberg
2011-01-03 17:23 ` Matt Mackall [this message]
2011-01-03 17:23 ` Matt Mackall
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=1294075426.3109.99.camel@calx \
--to=mpm@selenic.com \
--cc=cl@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=penberg@cs.helsinki.fi \
--cc=tytso@mit.edu \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.