Until some smarty comes along and optimises printk() to skip empty strings.
An explicit wake_up_klogd() thing might make sense, rather than relying
upon side-effects.
> no need to print a space and make a mess.
Can't say that I've ever noticed that space.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majo...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
> ------------------------------------------------------------------------
>
> --- ./arch/i386/mm/fault.c.printk 2004-08-14 14:54:46.000000000 +0400
> +++ ./arch/i386/mm/fault.c 2004-09-06 11:02:32.730550352 +0400
> @@ -51,7 +51,7 @@ void bust_spinlocks(int yes)
> * a poke. Hold onto your hats...
> */
> console_loglevel = 15; /* NMI oopser may have shut the console up */
> - printk(" ");
> + printk("");
> console_loglevel = loglevel_save;
> }
>
Kalin.
--
|| ~~~~~~~~~~~~~~~~~~~~~~ ||
( ) http://ThinRope.net/ ( )
|| ______________________ ||
>>no need to print a space and make a mess.
> Can't say that I've ever noticed that space.
We did. Many times.
I've noticed another thing. There is a default bust_spinlocks() in
lib/bust_spinlocks.c. 4 architectures including x86 have their own
copies of it, which are exactly the same as the default one.
So do we really need lib/bust_spinlocks.c or we can move a signle copy
of this function to kernel/printk.c?
Kirill
I'd leave it as is - nobody's complaining.
In the more modern scheme of things we'd move that file to kernel/ and
require that per-arch Kconfigs define CONFIG_NEED_GENERIC_BUST_SPINLOCKS,
then use that in kernel/Makefile. But doing that now would be gratuitous
noise, IMO.
On Mon, Sep 06, 2004 at 04:57:55PM +0900, Kalin KOZHUHAROV wrote:
> I may be just a newbie, but why call prink with no arguments?
> Does it do something?
Actually, there is an argument: a NULL terminated string of size 0.
It pokes the klogd. This can be done much better through
wake_up_klogd() though.
Tonnerre
> Until some smarty comes along and optimises printk() to skip empty
> strings.
define the bahavior to disallow that
> An explicit wake_up_klogd() thing might make sense, rather than
> relying upon side-effects.
what about something like:
#define wake_up_klogd() (printk(NULL))
then? and have printk short-circuit where required when it gets NULL
but still wake the console up?
--cw
| >>This patch removes unnessary print of space in bust_spinlocks().
| >> printk("") wakeups klogd as well,
| >
| > Until some smarty comes along and optimises printk() to skip empty strings.
| >
| > An explicit wake_up_klogd() thing might make sense, rather than relying
| > upon side-effects.
| yup, you are right. I was the easiest, but not the best.
| I'll make a patch with wakeup_klogd.
|
| >>no need to print a space and make a mess.
| > Can't say that I've ever noticed that space.
| We did. Many times.
Same here. Thanks for cleaning it up.
| I've noticed another thing. There is a default bust_spinlocks() in
| lib/bust_spinlocks.c. 4 architectures including x86 have their own
| copies of it, which are exactly the same as the default one.
|
| So do we really need lib/bust_spinlocks.c or we can move a signle copy
| of this function to kernel/printk.c?
--
~Randy