From: Chuck Ebbert <76306.1226@compuserve.com>
To: linux-kernel <linux-kernel@vger.kernel.org>
Cc: Andi Kleen <ak@suse.de>, Andrew Morton <akpm@osdl.org>,
Linus Torvalds <torvalds@osdl.org>, Ingo Molnar <mingo@elte.hu>,
Chuck Ebbert <76306.1226@compuserve.com>
Subject: [patch 2.6.14-rc4] i386: spinlock optimization
Date: Fri, 14 Oct 2005 13:47:09 -0400 [thread overview]
Message-ID: <200510141350_MC3-1-ACA0-C8C9@compuserve.com> (raw)
Attempt to acquire spinlock sooner after spinning and then noticing
it has become available. Also adds a slight delay before testing the
spinlock again when it's not available, reducing bus traffic.
This change makes spinlocks fairer in the case where the owner drops
the lock and then immediately tries to take it again.
Signed-Off-By: Chuck Ebbert <76306.1226@compuserve.com>
---
include/asm-i386/spinlock.h | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
--- 2.6.14-rc4a.orig/include/asm-i386/spinlock.h
+++ 2.6.14-rc4a/include/asm-i386/spinlock.h
@@ -28,8 +28,8 @@
"2:\t" \
"rep;nop\n\t" \
"cmpb $0,%0\n\t" \
- "jle 2b\n\t" \
- "jmp 1b\n" \
+ "jg 1b\n\t" \
+ "jmp 2b\n" \
"3:\n\t"
#define __raw_spin_lock_string_flags \
next reply other threads:[~2005-10-14 17:50 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-10-14 17:47 Chuck Ebbert [this message]
2005-10-14 18:04 ` Andi Kleen
2005-10-14 18:24 ` linux-os (Dick Johnson)
2005-10-14 18:32 ` Andrew Morton
2005-10-14 18:55 ` linux-os (Dick Johnson)
2005-10-14 18:37 ` Linus Torvalds
2005-10-14 18:56 ` linux-os (Dick Johnson)
2005-10-15 1:24 Chuck Ebbert
2005-10-15 15:09 ` Ingo Molnar
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=200510141350_MC3-1-ACA0-C8C9@compuserve.com \
--to=76306.1226@compuserve.com \
--cc=ak@suse.de \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=torvalds@osdl.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
Powered by JetHome