public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: William Lee Irwin III <wli@holomorphy.com>
To: Eric Valette <eric.valette@free.fr>,
	Andrew Morton <akpm@osdl.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: wait_on_bit_lock() must test_and_set_bit(), not test_bit()
Date: Tue, 31 Aug 2004 01:44:58 -0700	[thread overview]
Message-ID: <20040831084458.GM5492@holomorphy.com> (raw)
In-Reply-To: <20040831081456.GL5492@holomorphy.com>

On Tue, Aug 31, 2004 at 01:09:16AM -0700, William Lee Irwin III wrote:
>> I very distinctly recall compiling and booting these...

On Tue, Aug 31, 2004 at 01:14:56AM -0700, William Lee Irwin III wrote:
> Index: mm2-2.6.9-rc1/kernel/wait.c

Incremental atop the fastcall fix:

wait_on_bit_lock() needs to test_and_set_bit() in the fastpath, not
test_bit().


-- wli

Index: mm2-2.6.9-rc1/include/linux/wait.h
===================================================================
--- mm2-2.6.9-rc1.orig/include/linux/wait.h	2004-08-31 01:37:55.507900064 -0700
+++ mm2-2.6.9-rc1/include/linux/wait.h	2004-08-31 01:38:34.670946376 -0700
@@ -388,7 +388,7 @@
 	DEFINE_WAIT_BIT(q, word, bit);
 	wait_queue_head_t *wqh;
 
-	if (!test_bit(bit, word))
+	if (!test_and_set_bit(bit, word))
 		return 0;
 
 	wqh = bit_waitqueue(word, bit);

  reply	other threads:[~2004-08-31  8:45 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-31  8:05 2.6.9-rc1-mm2 : compilation error in kernel/wait.c Eric Valette
2004-08-31  8:09 ` William Lee Irwin III
2004-08-31  8:14   ` William Lee Irwin III
2004-08-31  8:44     ` William Lee Irwin III [this message]
2004-08-31 21:03       ` [1/2] move wait ops' contention case completely out of line William Lee Irwin III
2004-08-31 21:05         ` [2/2] reduce number of parameters to __wait_on_bit() and __wait_on_bit_lock() William Lee Irwin III
2004-08-31 21:12           ` [3/2] document wake_up_bit()'s requirement for preceding memory barriers William Lee Irwin III
2004-08-31  8:13 ` 2.6.9-rc1-mm2 : compilation error in kernel/wait.c Andrew Morton

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=20040831084458.GM5492@holomorphy.com \
    --to=wli@holomorphy.com \
    --cc=akpm@osdl.org \
    --cc=eric.valette@free.fr \
    --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