mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH -rt] fix setting of preempt_max_latency and preempt_thresh on 64 bit systems
@ 2007-03-27 17:19 Steven Rostedt
  2007-03-27 19:15 ` Andreas Mohr
  2007-03-27 19:15 ` Ingo Molnar
  0 siblings, 2 replies; 4+ messages in thread
From: Steven Rostedt @ 2007-03-27 17:19 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: LKML

Ingo,

I wasn't able to turn on latency tracing on a x86_64 box. Using logdev
to see what was happening, I found that echoing 0
into /proc/sys/kernel/preempt_max_latency would only change the max from
-1ULL to 0xffffffff00000000. Which would keep the max pretty high still.

The problem is in sysctl.c where preempt_max_latency can be modified. On
systems where cycle_t is greater than the size of int (x86_64) we only
write to the 4 LSB.

Here's the patch:

-- Steve

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>

Index: linux-2.6.21-rc5/kernel/sysctl.c
===================================================================
--- linux-2.6.21-rc5.orig/kernel/sysctl.c
+++ linux-2.6.21-rc5/kernel/sysctl.c
@@ -287,17 +287,17 @@ static ctl_table kern_table[] = {
 		.ctl_name	= CTL_UNNUMBERED,
 		.procname	= "preempt_max_latency",
 		.data		= &preempt_max_latency,
-		.maxlen		= sizeof(int),
+		.maxlen		= sizeof(preempt_max_latency),
 		.mode		= 0644,
-		.proc_handler	= &proc_dointvec,
+		.proc_handler	= &proc_doulongvec_minmax,
 	},
 	{
 		.ctl_name	= CTL_UNNUMBERED,
 		.procname	= "preempt_thresh",
 		.data		= &preempt_thresh,
-		.maxlen		= sizeof(int),
+		.maxlen		= sizeof(preempt_thresh),
 		.mode		= 0644,
-		.proc_handler	= &proc_dointvec,
+		.proc_handler	= &proc_doulongvec_minmax,
 	},
 #endif
 #ifdef CONFIG_EVENT_TRACE



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-03-27 19:40 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-03-27 17:19 [PATCH -rt] fix setting of preempt_max_latency and preempt_thresh on 64 bit systems Steven Rostedt
2007-03-27 19:15 ` Andreas Mohr
2007-03-27 19:39   ` Steven Rostedt
2007-03-27 19:15 ` Ingo Molnar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome