Re: [PATCH] printk: avoid livelock if another CPU printks continuously

From: Steven Rostedt
Date: Tue Feb 09 2016 - 11:57:29 EST


On Tue, 09 Feb 2016 17:41:25 +0100
Denys Vlasenko <dvlasenk@xxxxxxxxxx> wrote:


> > No, I mentioned the taking of console sem. The spamming task will be
> > trying that a bit, failing and then letting this CPU continue doing its
> > bidding.
>
> That's exactly what we *don't* want to happen.
> We want that other CPU to get the lock.

I know. I meant that if the task fails to get the lock, it will let the
other continue to do its bidding. Hence the multiple tries. But this is
moot, because it's just adding onto the hacks.


>
> How do you plan to achieve that, if not by giving it a grace period
> when it can grab a lock?

What really needs to be done is to find out why a CPU is spamming with
printks and fix that. Is it a bug that is triggering?

-- Steve