From: Andrew Morton <akpm@linux-foundation.org>
To: "Jan Beulich" <JBeulich@suse.com>
Cc: <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2] consolidate WARN_...ONCE() static variables
Date: Tue, 28 Feb 2012 00:32:06 -0800 [thread overview]
Message-ID: <20120228003206.e661f926.akpm@linux-foundation.org> (raw)
In-Reply-To: <4F4C9B7802000078000751BC@nat28.tlf.novell.com>
On Tue, 28 Feb 2012 08:16:40 +0000 "Jan Beulich" <JBeulich@suse.com> wrote:
> Oh, sorry - to carry static data the accesses to which are unlikely
> (i.e., as in the case given, fully contained in code sections inside
> conditionals which themselves use unlikely() on their primary/only
> clause - in other words, something that the compiler really could
> do on its own).
I think I just learned more about this patch than at any time since we
started discussing it.
Why add a new section, rather than using __read_mostly?
I suppose we should add and use a #define for this, like __read_mostly.
That would be a good site for documenting it ;)
And I come back to my old friend printk_once(). If I'm understanding
things correctly, we can/should make that test unlikely, then mark
__print_once as __this_new_section? Otherwise... help!
btw, I don't think there's a significant performance benefit here - if
the kernel is ever executing WARN_ON_ONCE(), WARN_ONCE() or
printk_once() with any frequency then it is already badly broken.
Which brings us down to saving a bit of space. And I don't think I see
how this saves space?
next prev parent reply other threads:[~2012-02-28 8:30 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-27 15:10 [PATCH v2] consolidate WARN_...ONCE() static variables Jan Beulich
2012-02-28 0:03 ` Andrew Morton
2012-02-28 7:41 ` Jan Beulich
2012-02-28 7:44 ` Andrew Morton
2012-02-28 8:02 ` Jan Beulich
2012-02-28 8:12 ` Andrew Morton
2012-02-28 8:16 ` Jan Beulich
2012-02-28 8:32 ` Andrew Morton [this message]
2012-02-28 8:58 ` Jan Beulich
2012-02-28 21:19 ` Andrew Morton
2012-02-29 8:21 ` Jan Beulich
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=20120228003206.e661f926.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=JBeulich@suse.com \
--cc=linux-kernel@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 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.