* [PATCH] removes unnessary print of space
@ 2004-09-06 7:07 Kirill Korotaev
2004-09-06 7:08 ` Andrew Morton
2004-09-06 7:57 ` Kalin KOZHUHAROV
0 siblings, 2 replies; 8+ messages in thread
From: Kirill Korotaev @ 2004-09-06 7:07 UTC (permalink / raw)
To: linux-kernel, akpm, torvalds
[-- Attachment #1: Type: text/plain, Size: 149 bytes --]
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.
Kirill
[-- Attachment #2: diff-oops-printk --]
[-- Type: text/plain, Size: 365 bytes --]
--- ./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;
}
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] removes unnessary print of space
2004-09-06 7:07 [PATCH] removes unnessary print of space Kirill Korotaev
@ 2004-09-06 7:08 ` Andrew Morton
2004-09-06 8:34 ` Kirill Korotaev
2004-09-06 12:17 ` Chris Wedgwood
2004-09-06 7:57 ` Kalin KOZHUHAROV
1 sibling, 2 replies; 8+ messages in thread
From: Andrew Morton @ 2004-09-06 7:08 UTC (permalink / raw)
To: Kirill Korotaev; +Cc: linux-kernel, torvalds
Kirill Korotaev <dev@sw.ru> 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.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] removes unnessary print of space
2004-09-06 7:07 [PATCH] removes unnessary print of space Kirill Korotaev
2004-09-06 7:08 ` Andrew Morton
@ 2004-09-06 7:57 ` Kalin KOZHUHAROV
2004-09-06 9:03 ` Tonnerre
1 sibling, 1 reply; 8+ messages in thread
From: Kalin KOZHUHAROV @ 2004-09-06 7:57 UTC (permalink / raw)
To: linux-kernel
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/ ( )
|| ______________________ ||
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] removes unnessary print of space
2004-09-06 8:34 ` Kirill Korotaev
@ 2004-09-06 8:29 ` Andrew Morton
2004-09-06 16:33 ` Randy.Dunlap
1 sibling, 0 replies; 8+ messages in thread
From: Andrew Morton @ 2004-09-06 8:29 UTC (permalink / raw)
To: Kirill Korotaev; +Cc: linux-kernel
Kirill Korotaev <dev@sw.ru> 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.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] removes unnessary print of space
2004-09-06 7:08 ` Andrew Morton
@ 2004-09-06 8:34 ` Kirill Korotaev
2004-09-06 8:29 ` Andrew Morton
2004-09-06 16:33 ` Randy.Dunlap
2004-09-06 12:17 ` Chris Wedgwood
1 sibling, 2 replies; 8+ messages in thread
From: Kirill Korotaev @ 2004-09-06 8:34 UTC (permalink / raw)
To: Andrew Morton; +Cc: linux-kernel
>>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
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] removes unnessary print of space
2004-09-06 7:57 ` Kalin KOZHUHAROV
@ 2004-09-06 9:03 ` Tonnerre
0 siblings, 0 replies; 8+ messages in thread
From: Tonnerre @ 2004-09-06 9:03 UTC (permalink / raw)
To: Kalin KOZHUHAROV; +Cc: linux-kernel
[-- Attachment #1: Type: text/plain, Size: 344 bytes --]
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
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] removes unnessary print of space
2004-09-06 7:08 ` Andrew Morton
2004-09-06 8:34 ` Kirill Korotaev
@ 2004-09-06 12:17 ` Chris Wedgwood
1 sibling, 0 replies; 8+ messages in thread
From: Chris Wedgwood @ 2004-09-06 12:17 UTC (permalink / raw)
To: Andrew Morton; +Cc: Kirill Korotaev, linux-kernel, torvalds
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
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] removes unnessary print of space
2004-09-06 8:34 ` Kirill Korotaev
2004-09-06 8:29 ` Andrew Morton
@ 2004-09-06 16:33 ` Randy.Dunlap
1 sibling, 0 replies; 8+ messages in thread
From: Randy.Dunlap @ 2004-09-06 16:33 UTC (permalink / raw)
To: Kirill Korotaev; +Cc: akpm, linux-kernel
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
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2004-09-06 16:34 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-09-06 7:07 [PATCH] removes unnessary print of space Kirill Korotaev
2004-09-06 7:08 ` Andrew Morton
2004-09-06 8:34 ` Kirill Korotaev
2004-09-06 8:29 ` Andrew Morton
2004-09-06 16:33 ` Randy.Dunlap
2004-09-06 12:17 ` Chris Wedgwood
2004-09-06 7:57 ` Kalin KOZHUHAROV
2004-09-06 9:03 ` Tonnerre
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox