From: Ingo Molnar <mingo@elte.hu>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: sfr@canb.auug.org.au, rostedt@goodmis.org,
linux-kernel@vger.kernel.org, fweisbec@gmail.com
Subject: Re: [PATCH 5/5] ring-buffer: fix printk output
Date: Wed, 29 Apr 2009 22:11:04 +0200 [thread overview]
Message-ID: <20090429201104.GD17021@elte.hu> (raw)
In-Reply-To: <20090429125203.dd2e1095.akpm@linux-foundation.org>
* Andrew Morton <akpm@linux-foundation.org> wrote:
> On Wed, 29 Apr 2009 21:45:46 +0200
> Ingo Molnar <mingo@elte.hu> wrote:
>
> >
> > * Andrew Morton <akpm@linux-foundation.org> wrote:
> >
> > > On Wed, 29 Apr 2009 11:56:25 +0200 Ingo Molnar <mingo@elte.hu> wrote:
> > >
> > > >
> > > > > > My larger point remains, about possibly embedding linux-next
> > > > > > into lkml. I couldnt think of a single linux-next mail that isnt
> > > > > > relevant to lkml. It's all about commits that are destined for
> > > > > > upstream in 0-2.5 months.
> > > > >
> > > > > Sure, I'd be OK with zapping the linux-next list.
> > > >
> > > > Another, less drastic solution would be to keep it as an _alias_
> > > > list. All mails posted to it also go to lkml, but it would still be
> > > > subscribe-able separately.
> > >
> > > That would work, although I wonder about the potential for
> > > duplicates turning up somewhere.
> >
> > The potential for duplicates is inherent in Cc: lines to begin with.
>
> But if someone does reply-to-all to linux-next and linux-kernel,
> and the linux-next email gets redirected to linux-kernel, badness
> might happen. Bearing in mind the screwiness of the mail clients
> whcih some people use..
Hm, what badness would happen? Today, if i send a mail to linux-next
and lkml, it shows up on both lists. If i'm subscribed to both, i
get two mails - one from lkml and one from linux-next.
Auto-aliasing the lists means adding an implicit Cc: lkml to all
mails that the linux-next list server gets. Two mails are generated
- and if someone is subscribed to both lists, two mails are
received. How would mail clients have a problem with that? It's
already happening.
> > > > ( This has come up before and this would be useful for a number of
> > > > other things - such as tracing/instrumentation. Someone who is
> > > > only interested in instrumentation related discussions could
> > > > subscribe to that list. )
> > > >
> > > > > > > printk_once() is racy on smp and preempt btw ;)
> > > > > >
> > > > > > Like WARN_ONCE() and WARN_ON_ONCE(). It's really an "oh crap"
> > > > > > facility, not for normal kernel messages.
> > > > > >
> > > > > > Do we want to complicate them with locking and preemption - or
> > > > > > should we just concentrate on getting the "oh crap" message out
> > > > > > to the syslog (before it's possibly too late to get anything
> > > > > > out)?
> > > > > >
> > > > > > I have no strong opinion about it - but i tend to like the
> > > > > > simpler method most. printk + stack dumps themselves arent
> > > > > > atomic to begin with.
> > > > >
> > > > > Well, it's hardly likely to be a problem. otoh, if two CPUs _do_
> > > > > hit the thing at the same time, the resulting output will be all
> > > > > messed up and we'd really like to see it.
> > > > >
> > > > > Easily fixed with test_and_set_bit()?
> > > >
> > > > but if two CPUs hit it at once then the printk+stack-dump itself is
> > > > already mixed up. So if we do any atomicity it should be done for
> > > > all the print-once APIs. (note, lockdep does such message-atomicity
> > > > already, in its own facility)
> > >
> > > Confused.
> > >
> > > <gets distracted by FW_BUG and friends. ytf are they in kernel.h?>
> > >
> > > #define printk_once(x...) ({ \
> > > static unsigned long __print_once; \
> > > \
> >
> > hm, this doubles the flag size on 32-bit kernels.
>
> Well yeah. I was wondering whether __print_once should be a char
> anyway. Will that hurt text size on any arch? Will gcc dtrt with
> such things? It might go and 4-byte align the chars anwyay.
a char would make sense - since they are all rare codepaths
compression is important - and this should be done for the other
_ONCE APIs as well.
gcc does the right thing and will compress adjacent char's - but the
problem is that these char's are unlikely to be adjacent - te
adjacent variables will likely be larger so the chars will take up 4
or 8 bytes in practice.
So to achieve compression we'd have to put them into a separate data
section and have a per arch linker script detail for that. Is that
worth the trouble? How many flags are we talking about?
Ingo
next prev parent reply other threads:[~2009-04-29 20:11 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-29 4:48 [PATCH 0/5] [GIT PULL] tracing/splice/ringbuffer: updates for tip Steven Rostedt
2009-04-29 4:48 ` [PATCH 1/5] tracing: convert ftrace_dump spinlocks to raw Steven Rostedt
2009-04-29 5:07 ` Andrew Morton
2009-04-29 5:55 ` Ingo Molnar
2009-04-29 4:48 ` [PATCH 2/5] tracing: fix ref count in splice pages Steven Rostedt
2009-04-29 4:48 ` [PATCH 3/5] tracing: only add splice page if entries exist Steven Rostedt
2009-04-29 4:48 ` [PATCH 4/5] tracing: have splice only copy full pages Steven Rostedt
2009-04-29 4:48 ` [PATCH 5/5] ring-buffer: fix printk output Steven Rostedt
2009-04-29 5:20 ` Andrew Morton
2009-04-29 5:43 ` Ingo Molnar
2009-04-29 5:55 ` Andrew Morton
2009-04-29 6:09 ` Ingo Molnar
2009-04-29 6:20 ` Andrew Morton
2009-04-29 7:22 ` Ingo Molnar
2009-04-29 7:41 ` Andrew Morton
2009-04-29 9:56 ` Ingo Molnar
2009-04-29 15:09 ` Andrew Morton
2009-04-29 19:45 ` Ingo Molnar
2009-04-29 19:52 ` Andrew Morton
2009-04-29 20:11 ` Ingo Molnar [this message]
2009-04-29 16:19 ` Valdis.Kletnieks
2009-04-29 20:15 ` Ingo Molnar
2009-04-29 6:03 ` [PATCH 0/5] [GIT PULL] tracing/splice/ringbuffer: updates for tip Ingo Molnar
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=20090429201104.GD17021@elte.hu \
--to=mingo@elte.hu \
--cc=akpm@linux-foundation.org \
--cc=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rostedt@goodmis.org \
--cc=sfr@canb.auug.org.au \
/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