On (20/12/04 17:10), Petr Mladek wrote: > > One reason is the use of per-cpu variables. Alternative solution would > be to store printk_context into task_struct.
We can keep per-CPU, disable preemption and have counters for every context (task, soft/hard irq, NMI). Shouldn't be a problem vprintk_emit() { preempt_disable() vprintk_store() preempt_enable() preempt_disable() console_unlock() preempt_enable() } vprintk_store() is a small fraction of console_unlock() time wise. -ss