4.9-rt: uprev notes, incremental uprev, adding bisection ability
From: Paul Gortmaker
Date: Wed Dec 28 2016 - 23:10:46 EST
TL;DR: incremental -rt patch uprev from 4.8-rt to the new 4.9-rt
covering 175 touch down points on mainline merges & tags by Linus;
useful for rt developers and bugfixers to research and bisect with.
If you just want the bisect points generated on your machine, then:
# clone mainline or clone from a local copy with >=4.9 tags in it.
git clone /path/to/my/existing/mainline/linux linux-rt-bisect
git clone git://git.kernel.org/pub/scm/linux/kernel/git/paulg/4.9-rt-patches.git
------ end TL;DR ------ 8< -------- end TL;DR ------
Now that 4.9-rt1 is out there, we can do what was done for 4.8-rt
and create an incremental uprev to get an idea of what mainline
merges impacted the patches in the preempt-rt series to bring more
clarity into what conflicts arose:
The usual suspects have impact to rt: scheduler changes in tip, x86
changes in tip, CPU hotplug (this time) in tip, large "patch bombs"
from akpm, and even somewhat net-next content from davem.
Points of interest:
lglocks: -removed from mainline, so we get to drop the -rt
extensions to that support. However -rt specific users need
to be converted to something else; e.g. see the new /* XXX */
in cpu_stopper_thread, where an lglock used to be used.
thread_info: -x86 dabbled with THREAD_INFO_IN_TASK then disabled it
again before rc2. With the benefit of hindsight, we can
take the disable commit and temporarily backport it so that
we essentially never have it in task, which means saving a
whole lot of mess in the preempt_lazy patches for nothing.
(see Add / Delete patch marked with "*" at end of this post)
new/removed patches: -there were six new patches added and 16
patches removed. A couple of the "removed" patches were not
really removed, but instead squished as fixups into another
Further details can be found at the end of this post, where the merges
and the patches they impacted are listed. A majority of the changes
are just basic context refresh -- updating the patch to match the
changes in the surrounding code without changing what the patch
really is doing.
One can also inspect the commit logs in the above git repo since the
baseline v4.8.15-rt10 commit.
Sanity boot testing was done on RT_FULL for x86-64 along the way on
selected "high risk" merges, like those listed above. The final
result is that the patches at the end of the incremental uprev here
match the patches of v4.9-rt1 just recently released.
Bisecting to find new issues in 4.9-rt:
The other benefit of this is that it allows one to quasi-bisect the
preempt-rt (treated as a whole) across the some 15,000 patches that
make up the new 4.9 content. This allowed me to solve several bugs
in 4.8-rt that I would have had an extrememly hard time to solve in
any other way. I won't repeat every detail of how this process
makes sense, since I've documented that in the past.
The 15,000 odd commits of 4.9 made it to mainline via ~165 merges
from Linus between 4.8 and v4.9-rc1 (the merge window) where we can
apply the -rt patches and see which feature merges cause disruption
to the -rt patches.
Not every feature/maintainer-merge causes issues with the -rt patch
queue: I had to create just over 50 commits to the v4.8.15-rt10
baseline in order to have about 30 possible series of patches to
cover all those 165 merges from 4.8 to mainline 4.9-rc1.
Since Linux development has a lot less commits in rc2, rc3, ...
rc8, and final 4.9 -- those tags represent the remaining bisection
points that can be created and used from this repo. I didn't do
per-merge patch application testng post-rc1 (just as was done for
the 4.8-rt incremental uprev earlier) since it would be pointless.
Quick recap on how to use this repo to do merge level bisect:
1) Full list of feature merges in mainline repo you can test on:
git log --oneline --merges --author=Torvalds \
--reverse ^v4.8 v4.9-rc1
2) Tags in this 4.9-rt patch repo look like:
3) Say you want to test -rt on this merge from #1:
"af79ad2b1f33 Merge branch 'sched-core-for-linus' ..."
You run "git describe af79ad2b1f33" and get:
No problem, you check out the patches tagged in #2 with the
matching name. These will apply to that merge as a baseline.
4) Or, you did as in #3 but you have a merge that doesn't have a
matching tag in the patch repo released here, like:
The patches you want to use are on tag "rt-v4.8-304-g4b978934a440"
since "304" is the highest mainline commit count to your "346"
commit count without going over (think "Price is Right".) The
"304" will cover Linus merges 304-->372 inclusive. You don't use
"373" since that is only for 373-->557 inclusive.
5) Check out your merge commit on mainline repo from #1. Check out
your patch tag from #3/#4 in the -rt patch repo. Apply the
patches in the series file of the patch repo to mainline just
as you would any other series of patches.
Or you can use the script in the repo to automatically generate all
of the rt bisect points (can take 4h on a reasonably fast machine).
Summary of merges that impacted the -rt patch set:
[commits since v4.8] A=add M=modify D=delete
 7af8a0f8 Merge tag 'arm64-upstream' of arm64/linux
M localversion.patch (reset to "rt0")
 4b978934 Merge branch 'core-rcu-for-linus' of tip/tip
 00bcf5cd Merge branch 'locking-core-for-linus' of tip/tip
 e606d81d Merge branch 'ras-core-for-linus' of tip/tip
 af79ad2b Merge branch 'sched-core-for-linus' of tip/tip
 1a4a2bc4 Merge branch 'x86-asm-for-linus' of tip/tip
* A sched-core-x86-Make-struct-thread_info-arch-specific.patch
 a6c4e4cd Merge branch 'x86-platform-for-linus' of tip/tip
 8e4ef638 Merge branch 'x86-vdso-for-linus' of tip/tip
 999dcbe2 Merge branch 'irq-core-for-linus' of tip/tip
 597f03f9 Merge branch 'smp-hotplug-for-linus' of tip/tip
 687ee0ad Merge davem/net-next
 14986a34 Merge branch 'for-linus' of ebiederm/user-namespace
 95107b30 Merge tag 'trace-v4.9' of rostedt/linux-trace
 513a4bef Merge branch 'for-4.9/block' of git://git.kernel.dk/linux-block
 b66484cd Merge branch 'akpm' (patches from Andrew)
 12e3d3cd Merge branch 'for-4.9/block-irq' of git://git.kernel.dk/linux-block
 24532f76 Merge branch 'for-4.9/block-smp' of git://git.kernel.dk/linux-block
 a379f71a Merge branch 'akpm' (patches from Andrew)
 6b25e21f Merge tag 'drm-for-v4.9' of git://people.freedesktop.org/~airlied/linux
 9ffc6694 Merge tag 'gcc-plugins-v4.9-rc1' of kees/linux
[v4.9-rc1] tag v4.9-rc1
[v4.9-rc2] tag v4.9-rc2
* D sched-core-x86-Make-struct-thread_info-arch-specific.patch
[v4.9-rc3] tag v4.9-rc3
[v4.9-rc8] tag v4.9-rc8
[v4.9] tag v4.9
M localversion.patch (set to "rt1")