From: Joe Korty <joe.korty@ccur.com>
To: linux-kernel@vger.kernel.org
Subject: [PATCH] 2.6.0-test9-mm4-lockmeter-preemption
Date: Thu, 20 Nov 2003 15:54:25 -0500 [thread overview]
Message-ID: <20031120205424.GA5912@rudolph.ccur.com> (raw)
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>
reply other threads:[~2003-11-20 20:54 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20031120205424.GA5912@rudolph.ccur.com \
--to=joe.korty@ccur.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®