Re: [patch 0/3] futex/rtmutex: Fix issues exposed by trinity

From: Ingo Molnar
Date: Tue May 13 2014 - 02:37:38 EST



* Steven Rostedt <rostedt@xxxxxxxxxxx> wrote:

> > This is beyond sloppy and outright stupid.
>
> Thomas, listen to yourself. You are calling something that got in
> without updating the documentation and test case "beyond sloppy and
> outright stupid". Sure, I'll agree it was a little sloppy, and today I'm
> more on the ball to get things like this right (as we push much harder
> today on documentation coming in along with code changes). But the
> change log had:
>
> need updated after this patch is accepted
> 1) Document/*
> 2) the testcase scripts/rt-tester/t4-l2-pi-deboost.tst
>
> I agree this should be fixed, but you temper tantrum over this seems
> a bit over the top.

Well, the thing is, it's not just about the breakage, but the
changelog and the patch in itself already violates a very basic and
fundamental kernel workflow pattern we try to follow all the time for
core kernel changes: when speedups are introduced then fixes are never
'promised' to be done in an uncertain future, but are done preferably
before (or together) with the speedup.

Especially when there's an ABI involved.

The "break and fix later" kind of pattern might not be as problematic
for debug features which are not critical to users, but for ABI facing
changes it's deadly and inacceptable.

Also, the problems with the broken commit already begin with the
readability of the changelog:

1)

The very first sentence:

> In current rtmutex,

Should be:

> In the current rtmutex code,

2)

Also, the 'Example' that comes next is just a flow of sentences
without any vertical alignment (tabs, spaces, etc.), making it harder
to review.

3)

Plus, here:

"time3
A or other high prio task sleeps, but we have passed some time
The B and C's prio are changed in the period (time2 ~ time3)"

where does the first sentence end?

4)

"when requiring lock,"

I suspect that wanted to say 'reacquiring' the lock.

5)

"Other advantage of this patch:"

s/advantage/advantages/

6)

"The states of a rtmutex are reduced a half, easier to read the code."

s/reduced a half/reduced by half

7)

it is unrelated/unneed boosting

s/unneed/unneeded

?

8)

The diffstat is 'frickin hug:

kernel/futex.c | 22 +++++-----
kernel/rtmutex-debug.c | 1 -
kernel/rtmutex.c | 318 +++++++++++++++++++++++++++++++++++++++++++++++++-----------------------------------------------------------------------------------------
kernel/rtmutex_common.h | 16 +------
4 files changed, 127 insertions(+), 230 deletions(-)

When a changelog is harder to read due to basic grammar and
typographical errors, and when the patch is large, it's harder to
notice more fundamental problems as well.

(I've attached the full changelog below for reference.)

I should have noticed these warning signs when pulling your tree, I
generally read over changelogs and patches I pull, but missed this -
not sure what fell into me.

My bad, will be more careful next time around.

Thanks,

Ingo

=====================================>