* [PATCH] systemtap: fix up on_each_cpu() for kernels 2.6.26+
@ 2008-07-17 16:51 James Bottomley
2008-07-17 16:53 ` James Bottomley
2008-07-17 23:00 ` Stone, Joshua I
0 siblings, 2 replies; 4+ messages in thread
From: James Bottomley @ 2008-07-17 16:51 UTC (permalink / raw)
To: systemtap, linux-kernel
In kernel 2.6.26, this patch
commit 15c8b6c1aaaf1c4edd67e2f02e4d8e1bd1a51c0d
Author: Jens Axboe <jens.axboe@oracle.com>
Date: Fri May 9 09:39:44 2008 +0200
on_each_cpu(): kill unused 'retry' parameter
means that runtime/time.c is now using the wrong calling conventions.
Fix this up and surround it by kernel versioning #ifdefs.
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
---
runtime/time.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/runtime/time.c b/runtime/time.c
index 8a0b6fa..fffdfe0 100644
--- a/runtime/time.c
+++ b/runtime/time.c
@@ -237,7 +237,12 @@ _stp_init_time(void)
return -1;
stp_timer_reregister = 1;
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,26)
ret = on_each_cpu(__stp_init_time, NULL, 0, 1);
+#else
+ ret = on_each_cpu(__stp_init_time, NULL, 1);
+#endif
+
#ifdef CONFIG_CPU_FREQ
if (!ret && !__stp_constant_freq()) {
--
1.5.6
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH] systemtap: fix up on_each_cpu() for kernels 2.6.26+
2008-07-17 16:51 [PATCH] systemtap: fix up on_each_cpu() for kernels 2.6.26+ James Bottomley
@ 2008-07-17 16:53 ` James Bottomley
2008-07-17 17:42 ` Stone, Joshua I
2008-07-17 23:00 ` Stone, Joshua I
1 sibling, 1 reply; 4+ messages in thread
From: James Bottomley @ 2008-07-17 16:53 UTC (permalink / raw)
To: systemtap; +Cc: linux-kernel
On Thu, 2008-07-17 at 11:51 -0500, James Bottomley wrote:
> In kernel 2.6.26, this patch
>
> commit 15c8b6c1aaaf1c4edd67e2f02e4d8e1bd1a51c0d
> Author: Jens Axboe <jens.axboe@oracle.com>
> Date: Fri May 9 09:39:44 2008 +0200
>
> on_each_cpu(): kill unused 'retry' parameter
>
> means that runtime/time.c is now using the wrong calling conventions.
> Fix this up and surround it by kernel versioning #ifdefs.
By the way, this is a classic illustration of the fragility problem in
holding the systemtap runtime outside of the kernel. If it had been
in-kernel, all this would be fixed up and running and no-one would even
have noticed.
At least with changes in argument numbers, the compile breaks ... it
would have been a lot nastier if one of the variables simply changed
meaning ...
James
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: [PATCH] systemtap: fix up on_each_cpu() for kernels 2.6.26+
2008-07-17 16:53 ` James Bottomley
@ 2008-07-17 17:42 ` Stone, Joshua I
0 siblings, 0 replies; 4+ messages in thread
From: Stone, Joshua I @ 2008-07-17 17:42 UTC (permalink / raw)
To: James Bottomley, systemtap@sourceware.org; +Cc: linux-kernel
James Bottomley wrote:
> On Thu, 2008-07-17 at 11:51 -0500, James Bottomley wrote:
>> In kernel 2.6.26, this patch
>>
>> commit 15c8b6c1aaaf1c4edd67e2f02e4d8e1bd1a51c0d
>> Author: Jens Axboe <jens.axboe@oracle.com>
>> Date: Fri May 9 09:39:44 2008 +0200
>>
>> on_each_cpu(): kill unused 'retry' parameter
>>
>> means that runtime/time.c is now using the wrong calling conventions.
>> Fix this up and surround it by kernel versioning #ifdefs.
>
> By the way, this is a classic illustration of the fragility problem
> in holding the systemtap runtime outside of the kernel. If it had
> been in-kernel, all this would be fixed up and running and no-one
> would even have noticed.
Believe it or not, we really do understand this sentiment.
The whole runtime/time.c in particular is a fairly ugly way for us to
get a call-anywhere gettimeofday. I would love to see an in-kernel
replacement for this, but I don't have the expertise to know how to
approach it myself.
Josh
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: [PATCH] systemtap: fix up on_each_cpu() for kernels 2.6.26+
2008-07-17 16:51 [PATCH] systemtap: fix up on_each_cpu() for kernels 2.6.26+ James Bottomley
2008-07-17 16:53 ` James Bottomley
@ 2008-07-17 23:00 ` Stone, Joshua I
1 sibling, 0 replies; 4+ messages in thread
From: Stone, Joshua I @ 2008-07-17 23:00 UTC (permalink / raw)
To: James Bottomley, systemtap@sourceware.org; +Cc: linux-kernel
James Bottomley wrote:
> In kernel 2.6.26, this patch
>
> commit 15c8b6c1aaaf1c4edd67e2f02e4d8e1bd1a51c0d
> Author: Jens Axboe <jens.axboe@oracle.com>
> Date: Fri May 9 09:39:44 2008 +0200
>
> on_each_cpu(): kill unused 'retry' parameter
>
> means that runtime/time.c is now using the wrong calling conventions.
> Fix this up and surround it by kernel versioning #ifdefs.
On a closer look, the referenced commit wasn't actually merged until
sometime between v2.6.26-git2 and -git3. The released v2.6.26 still
has 'retry' in on_each_cpu(), so we'll either have to use an autoconf
test to detect the change, or wait and key the #ifdef on 2.6.27.
Josh
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-07-17 23:01 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-17 16:51 [PATCH] systemtap: fix up on_each_cpu() for kernels 2.6.26+ James Bottomley
2008-07-17 16:53 ` James Bottomley
2008-07-17 17:42 ` Stone, Joshua I
2008-07-17 23:00 ` Stone, Joshua I
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.