Re: [PATCH printk 3/5] printk: use buffer pool for sprint buffers

From: Steven Rostedt
Date: Wed Sep 30 2020 - 09:35:57 EST


On Wed, 30 Sep 2020 10:06:24 +0200
Rasmus Villemoes <rasmus.villemoes@xxxxxxxxx> wrote:

> True. But remember that printk is called from _everywhere_, with all
> sorts of locks held and/or preemption disabled or whatnot, and every
> cycle spent in printk makes those windows wider. Doubling the cost of
> every single printk by unconditionally doing vsnprintf() twice is a bad
> idea.

But the console output is usually magnitudes more expensive than the
vsnprintf(), would doing it twice really make a difference?

-- Steve