Am 03.05.2014 18:43, schrieb Ben Hutchings:
On Sat, 2014-05-03 at 18:35 +0200, Dirk Behme wrote:
Am 02.05.2014 20:09, schrieb Kamal Mostafa:
On Fri, 2014-05-02 at 13:30 -0400, gregkh wrote:
On Fri, May 02, 2014 at 10:07:33AM -0700, Kamal Mostafa wrote:
Dirk Behme points out that this "Cc: stable" commit breaks the
lttng-modules userspace API when applied to stable kernels. Stable
versions 3.2, 3.8, 3.11, and 3.13 (at least) have all queued it:
af5040da01ef980670b3741b3e10733ee3e33566
blktrace: fix accounting of partially completed requests
On Thu, 2014-05-01 at 10:28 +0200, Dirk Behme wrote:
[...] might break the build of the user space lttng-modules
(lttng-probe-block.c) due the the API change of
trace_block_rq_complete().
[...] On the other hand, looking into the lttng-modules git
http://git.lttng.org/?p=lttng-modules.git;a=commitdiff;h=1c53e689434a6bdd7dc3f54c07bfb72750d1d24c
looks like this is the necessary user space adaption to the kernel
change? So this looks like that lttng-modules expects a KERNEL_VERSION
= (3,15,0) to have this commit?
My inclination is that we probably need to revert/drop "af5040d
blktrace: fix accounting..." from the stable kernels to unbreak the
userspace API.
Then you will run into this issue with 3.15, when it is released.
No, I think "#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,15,0))" in the
lttng-modules commit referenced above guards against that. Apparently,
lttng-modules expects to see the new API in >= 3.15 and the old API in
the stable kernels.
I'm not in the position to judge if it's a lttng or a kernel community
issue ;)
So just for my understanding:
Having
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,15,0))
in lttng-modules commit
http://git.lttng.org/?p=lttng-modules.git;a=commitdiff;h=1c53e689434a6bdd7dc3f54c07bfb72750d1d24c
does mean that we don't have a lttng-modules version which will build
against the -stable kernels (3.2.58, 3,8.13.22 etc) with the back
ported commit [1], atm?
[...]
I don't understand why lttng-modules has its own definitions of
tracepoints. However, I suspect that it doesn't use anything beyond the
event structure definition, which has *not* changed, making that commit
a no-op.
Someone who cares should actually experiment with using old
lttng-modules with blktrace eventsf rom a patched kernel.
Not sure if this helps, but using -stable kernel 3.2.58 and recent
lttng-modules.git:
$ cd linux-stable.git
$ git log --pretty=oneline
f453538a1f5b66168caf9c446c56375246b4ac29 Linux 3.2.58
...
$ make x86_64_defconfig; make
...
$ cd ../lttng-modules.git/
$ git log --pretty=oneline
7915e163192dc9674bcd7ce80338d9d8ebf23d4c Fix: pass proper args when
writing commit counter
...
$ KERNELDIR=../linux-stable.git/ make
..
CC [M] lttng-modules.git/probes/lttng-probe-block.o
In file included from
lttng-modules.git/probes/../instrumentation/events/lttng-module/../../../probes/lttng-events.h:157:0,
from
lttng-modules.git/probes/../instrumentation/events/lttng-module/../../../probes/define_trace.h:139,
from
lttng-modules.git/probes/../instrumentation/events/lttng-module/block.h:989,
from lttng-modules.git/probes/lttng-probe-block.c:42:
lttng-modules.git/probes/../instrumentation/events/lttng-module/../../../probes/../instrumentation/events/lttng-module/block.h:291:1:
Error: Conflicting types for »trace_block_rq_complete«
In file included from lttng-modules.git/probes/lttng-probe-block.c:31:0:
include/trace/events/block.h:123:1: Note: Previous definition of
»trace_block_rq_complete« was here
make[3]: *** [lttng-modules.git/probes/lttng-probe-block.o] Error 1
Then reverting "blktrace: fix accounting of partially completed
requests" results in
$ cd ../linux-stable.git/
$ git revert 5b85afa68e4f56c27f
$ git log --pretty=oneline
17ae514b8af7da2a093036904320ef36c1d37eff Revert "blktrace: fix
accounting of partially completed requests"
f453538a1f5b66168caf9c446c56375246b4ac29 Linux 3.2.58
...
$ cd ../lttng-modules.git/
$ KERNELDIR=../linux-stable.git/ make
...
CC [M] lttng-modules.git/probes/lttng-probe-block.o
CC [M] lttng-modules.git/probes/lttng-probe-napi.o
...
I.e. lttng-probe-block.c compiles fine, now. Let me know which 'old
lttng-modules' you like me to try if this helps.
Thanks
Dirk
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html