mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Hugh Dickins <hugh@veritas.com>
To: Jean Delvare <khali@linux-fr.org>
Cc: Chuck Ebbert <76306.1226@compuserv.com>,
	Pete Zaitcev <zaitcev@redhat.com>, Andrew Morton <akpm@osdl.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] stop ==== emergency
Date: Mon, 6 Feb 2006 21:11:11 +0000 (GMT)	[thread overview]
Message-ID: <Pine.LNX.4.61.0602062057570.4093@goblin.wat.veritas.com> (raw)
In-Reply-To: <20060206195504.16b60b93.khali@linux-fr.org>

On Mon, 6 Feb 2006, Jean Delvare wrote:
> 
> However, given that printk calls aren't exactly cheap, don't we want to
> merge them where possible?
> 
> --- linux-2.6.16-rc2.orig/arch/i386/kernel/traps.c	2006-02-06 07:50:57.000000000 +0100
> +++ linux-2.6.16-rc2/arch/i386/kernel/traps.c	2006-02-06 19:42:10.000000000 +0100
> @@ -114,8 +114,7 @@
>  
>  static void print_addr_and_symbol(unsigned long addr, char *log_lvl)
>  {
> -	printk(log_lvl);
> -	printk(" [<%08lx>] ", addr);
> +	printk("%s [<%08lx>] ", log_lvl, addr);
> ....
> 
> More merges are possible, but I'm not sure how far we want to go.

I assumed, as I guess Chuck who put in all the printk(log_lvl)s did,
that they wouldn't be deciphered right if as separate args.  But a
glance at vprintk suggests you're right, they're interpreted after
expanding into printk_buf.

But my own interest in minimizing printk calls is rather low at the
moment; and they're hardly time-critical, are they? fast paths won't
be fast if they're doing printk's, and I hope things haven't got so
bad that we need dump_stack to be fast!  Waste more space? expect so.

More important would be: how's the SMP printk behaviour these days?
Does separating log_lvl from message increase the likelihood that the
log_lvls might be misapplied if different CPUs print at the same time?
If so, then I'd say your changes are very important - but please send
them to Andrew rather than to me.

Hugh

  reply	other threads:[~2006-02-06 21:10 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.1139006040.12873.linux-kernel2news@redhat.com>
2006-02-06  4:57 ` Pete Zaitcev
2006-02-06  8:46   ` Hugh Dickins
2006-02-06 18:55     ` Jean Delvare
2006-02-06 21:11       ` Hugh Dickins [this message]
2006-02-06 21:32         ` Pete Zaitcev
2006-02-06 22:15           ` Hugh Dickins
2006-02-03 21:37 Hugh Dickins

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=Pine.LNX.4.61.0602062057570.4093@goblin.wat.veritas.com \
    --to=hugh@veritas.com \
    --cc=76306.1226@compuserv.com \
    --cc=akpm@osdl.org \
    --cc=khali@linux-fr.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=zaitcev@redhat.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

all inboxes | Powered by JetHome®