--- ./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;
}
Kirill Korotaev <[email protected]> wrote:
>
> 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.
> no need to print a space and make a mess.
Can't say that I've ever noticed that space.
Kirill Korotaev wrote:
> This patch removes unnessary print of space in bust_spinlocks().
> printk("") wakeups klogd as well, no need to print a space
> and make a mess.
>
I may be just a newbie, but why call prink with no arguments?
Does it do something?
> ------------------------------------------------------------------------
>
> --- ./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/ ( )
|| ______________________ ||
>>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.
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
Kirill Korotaev <[email protected]> wrote:
>
> 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?
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.
Salut,
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
On Mon, Sep 06, 2004 at 12:08:26AM -0700, Andrew Morton wrote:
> 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
On Mon, 06 Sep 2004 12:34:37 +0400 Kirill Korotaev wrote:
| >>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