Re: [RFC][PATCHv6 00/12] printk: introduce printing kernel thread
From: Petr Mladek
Date: Thu Dec 14 2017 - 09:27:15 EST
On Mon 2017-12-04 22:48:13, Sergey Senozhatsky wrote:
> Hello,
>
> RFC
>
> A new version, yet another rework. Lots of changes, e.g. hand off
> control based on Steven's patch. Another change is that this time around
> we finally have a kernel module to test printk offloading (YAYY!). The
> module tests a bunch use cases; we also have trace printk events to...
> trace offloading.
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.
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?
Therefore I tend to give Steven's solution a chance before this
combined approach.
In each case, I do not feel comfortable with this combined solution.
I know that it might work much better that the two approaches
alone. But it has the complexity and possible risks of both
implementations. I would prefer to go with smaller steps.
[1] https://lkml.kernel.org/r/20171108102723.602216b1@xxxxxxxxxxxxxxxxxx
> I'll post the testing script and test module in reply
> to this mail. So... let's have some progress ;) The code is not completely
> awesome, but not tremendously difficult at the same time. We can verify
> the approach/design (we have tests and traces now) first and then start
> improving the code.
The testing module and code is great. Thanks a lot for posting it.
Best Regards,
Petr