All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrea Arcangeli <andrea@suse.de>
To: V Ganesh <ganesh@veritas.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: beware of add_waitqueue/waitqueue_active
Date: Thu, 30 Nov 2000 22:27:25 +0100	[thread overview]
Message-ID: <20001130222725.F18804@athlon.random> (raw)
In-Reply-To: <200011301332.TAA00277@vxindia.veritas.com>
In-Reply-To: <200011301332.TAA00277@vxindia.veritas.com>; from ganesh@veritas.com on Thu, Nov 30, 2000 at 07:02:56PM +0530

On Thu, Nov 30, 2000 at 07:02:56PM +0530, V Ganesh wrote:
> 3. add_wait_queue adds this process to the waitqueue. but all the writes
>    are in write-buffers and have not gone down to cache/memory yet.
> 4. PageLocked() finds that the page is locked.

Right.

> [..] speculative execution
> of PageLocked() even before add_wait_queue returns [..]

Right.

Both could happen because of the new spin_unlock implementation that doesn't
take anymore the lock on the bus:

	#define spin_unlock_string \
		"movb $1,%0"

With the previous `lock ; btrl' 4) couldn't happen with pending
writes on the write buffer because spin_unlock was a full barrier too...

Alpha was safe because it has to imply an mb() in spin_unlock (but
sparc64 was hurted too for example).

As you say the problematic construct is not used anymore into 2.4.0-test12-pre2
in filemap.c so such deadlock can't happen anymore but it's been useful that
you pointing out the problem, thanks.

Andrea
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

      reply	other threads:[~2000-11-30 21:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-11-30 13:32 beware of add_waitqueue/waitqueue_active V Ganesh
2000-11-30 21:27 ` Andrea Arcangeli [this message]

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=20001130222725.F18804@athlon.random \
    --to=andrea@suse.de \
    --cc=ganesh@veritas.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.