Re: [PATCH] Make printk lock when appropriate...

Jeff Garzik (jgarzik@mandrakesoft.com)
Sat, 01 Jul 2000 10:14:33 -0400


Manfred Spraul wrote:
>
> Chris Lattner wrote:
> >
> > Okay, here's an official patch against 2.4.0test2... that moves the lock
> > of the console lock to after the vsprintf. It would be nice if this went
> > into 2.4.0 final, especially since it's such a trivial change...
> >
>
> Sorry, but the patch is wrong.
>
> "buf" is a static variable, defined in line 28 [printk.c]

Since vsprintf can definitely be slow, maybe buf could be made per-cpu.
Tradeoff wasting 1K x max_cpus in uninitialized data space versus
locking before vsprintf.

Jeff

-- 
Jeff Garzik              |
Building 1024            | Make my funk the p-funk.
MandrakeSoft, Inc.       |

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/