From: Anton Blanchard <anton@samba.org>
To: torvalds@transmeta.com
Cc: linux-kernel@vger.kernel.org
Subject: Re: prepare_to_wait/waitqueue_active issues in 2.6
Date: Sun, 14 Dec 2003 14:53:56 +1100 [thread overview]
Message-ID: <20031214035356.GM17683@krispykreme> (raw)
In-Reply-To: <20031214034059.GL17683@krispykreme>
> End result is waitqueue_active returns 0 and buffer_locked returns 1.
> We miss a wakeup. Game over. Ive attached a patch that forces the check
> to happen after we are put on the waitqueue. Thanks to Brian Twichell
> for the analysis and suggested fix for this.
This time for sure.
Anton
===== mm/filemap.c 1.212 vs edited =====
--- 1.212/mm/filemap.c Sun Oct 26 16:41:06 2003
+++ edited/mm/filemap.c Sun Dec 14 14:25:45 2003
@@ -299,6 +299,7 @@
do {
prepare_to_wait(waitqueue, &wait, TASK_UNINTERRUPTIBLE);
+ smp_mb();
if (test_bit(bit_nr, &page->flags)) {
sync_page(page);
io_schedule();
@@ -372,6 +373,7 @@
while (TestSetPageLocked(page)) {
prepare_to_wait(wqh, &wait, TASK_UNINTERRUPTIBLE);
+ smp_mb();
if (PageLocked(page)) {
sync_page(page);
io_schedule();
===== fs/buffer.c 1.215 vs edited =====
--- 1.215/fs/buffer.c Tue Sep 30 11:12:02 2003
+++ edited/fs/buffer.c Sun Dec 14 14:24:26 2003
@@ -131,6 +131,7 @@
do {
prepare_to_wait(wqh, &wait, TASK_UNINTERRUPTIBLE);
+ smp_mb();
if (buffer_locked(bh)) {
blk_run_queues();
io_schedule();
next prev parent reply other threads:[~2003-12-14 3:54 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-12-14 3:40 prepare_to_wait/waitqueue_active issues in 2.6 Anton Blanchard
2003-12-14 3:53 ` Anton Blanchard [this message]
2003-12-14 5:02 ` Linus Torvalds
2003-12-14 5:23 ` Anton Blanchard
2003-12-14 5:35 ` Linus Torvalds
2003-12-14 8:58 ` Anton Blanchard
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=20031214035356.GM17683@krispykreme \
--to=anton@samba.org \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@transmeta.com \
/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