Re: [RFC][PATCHv6 00/12] printk: introduce printing kernel thread

Tejun Heo
2017-12-14T15:26:03Z

Hello, Petr.

On Thu, Dec 14, 2017 at 03:27:09PM +0100, Petr Mladek wrote:
> Ah, I know that it was me who was pessimistic about Steven's approach[1]
> and persuaded you that offloading idea was still alive. But I am less
> sure now.

So, I don't really care which one gets in as long as the livelock
problem is fixed although to my obviously partial eyes the two
alternatives seem overly complex. That said,

> My three main concerns about Steven's approach were:
>
> 1. I was afraid that it might introduce new type of deadlocks.
>
> But it seems that it is quite safe after all.
>
>
> 2. Steven's code, implementing the hand shake, is far from trivial.
> Few people were confused and reported false bugs.
>
> But the basic idea is pretty simple and straightforward. If
> we manage to encapsulate it into few helpers, it might become
> rather self-contained and maintainable. In each case, the needed
> changes are much smaller than I expected.
>
>
> 3. Soft-lockups are still theoretically possible with Steven's
> approach.
>
> But it seems to be quite efficient in many real life scenarios,
> including Tetsuo's stress testing. Or am I wrong?

AFAICS, Steven's approach doesn't fix the livelock that we see quite
often in the fleet where we don't have a safe context to keep flushing
messages. This isn't theoretical at all. You simply don't have a
safe context on the cpu to go to. I said I'd come back with a repro
case but haven't had a chance to yet. I'll try to do it before the
end of the year, but idk this is pretty obvious.

Thanks.

--
tejun