mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] 2.6.0-test9-mm4-lockmeter-preemption
@ 2003-11-20 20:54 Joe Korty
  0 siblings, 0 replies; only message in thread
From: Joe Korty @ 2003-11-20 20:54 UTC (permalink / raw)
  To: linux-kernel

11/20/2003: base is 2.6.0-test9-mm4
 o Fix lockmeter under preemption (i386 only)
 o Fix compile warnings in kernel/lockmeter.c

Joe

diff -ura base/arch/i386/Kconfig new/arch/i386/Kconfig
--- base/arch/i386/Kconfig	2003-11-20 14:47:30.000000000 -0500
+++ new/arch/i386/Kconfig	2003-11-20 15:01:21.000000000 -0500
@@ -1300,7 +1300,7 @@
 	  
 config LOCKMETER
 	bool "Kernel lock metering"
-	depends on SMP && !PREEMPT
+	depends on SMP
 	help
 	  Say Y to enable kernel lock metering, which adds overhead to SMP locks,
 	  but allows you to see various statistics using the lockstat command.
diff -ura base/include/asm-i386/spinlock.h new/include/asm-i386/spinlock.h
--- base/include/asm-i386/spinlock.h	2003-11-20 14:47:30.000000000 -0500
+++ new/include/asm-i386/spinlock.h	2003-11-20 15:14:20.000000000 -0500
@@ -270,10 +270,12 @@
 	return 0;
 
 slow_path:
+	preempt_disable();
 	_metered_spin_lock(lock);
 	if (atomic_dec_and_test(atomic))
 		return 1;
 	_metered_spin_unlock(lock);
+	preempt_enable();
 	return 0;
 }
 
diff -ura base/kernel/lockmeter.c new/kernel/lockmeter.c
--- base/kernel/lockmeter.c	2003-11-20 14:47:30.000000000 -0500
+++ new/kernel/lockmeter.c	2003-11-20 15:20:20.000000000 -0500
@@ -23,6 +23,7 @@
 #include <linux/vmalloc.h>
 #include <linux/spinlock.h>
 #include <linux/utsname.h>
+#include <linux/module.h>
 #include <asm/system.h>
 #include <asm/uaccess.h>
 

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-11-20 20:54 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-11-20 20:54 [PATCH] 2.6.0-test9-mm4-lockmeter-preemption Joe Korty

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

all inboxes | Powered by JetHome®