From: Andrea Arcangeli <andrea@suse.de>
To: Linus Torvalds <torvalds@transmeta.com>
Cc: Rik van Riel <riel@conectiva.com.br>,
Mike Galbraith <mikeg@wen-online.de>,
Jeff Garzik <jgarzik@mandrakesoft.com>,
Daniel Phillips <phillips@bonn-fries.net>,
Alexander Viro <viro@math.psu.edu>, Alan Cox <alan@redhat.com>,
linux-kernel@vger.kernel.org
Subject: Re: VM in 2.4.7-pre hurts...
Date: Tue, 10 Jul 2001 07:43:15 +0200 [thread overview]
Message-ID: <20010710074315.N1594@athlon.random> (raw)
In-Reply-To: <Pine.LNX.4.33.0107092053130.10187-100000@penguin.transmeta.com> <Pine.LNX.4.33.0107092112180.10220-100000@penguin.transmeta.com>
In-Reply-To: <Pine.LNX.4.33.0107092112180.10220-100000@penguin.transmeta.com>; from torvalds@transmeta.com on Mon, Jul 09, 2001 at 09:20:23PM -0700
On Mon, Jul 09, 2001 at 09:20:23PM -0700, Linus Torvalds wrote:
> In contrast, the version in pre4 doesn't depend on any memory ordering
> between BH_Locked at all - it really only depends on a memory barrier
> before the final atomic_dec() that releases the buffer, as it ends up
> being sufficient for try_to_free_buffers() to just worry about the buffer
> count when it comes to IO completion. The b_flags BUSY bits don't matter
> wrt the IO completion at all - they end up being used only for "idle"
> buffers (which in turn are totally synchronized by the LRU and hash
> spinlocks, so that is the "obviously correct" case)
>
> I personally think it's a hard thing to depend on memory ordering,
Sometime memory ordering pays off by avoiding locks, but this isn't the
case ;).
> especially if there are two independent fields. Which is why I really
> don't think that the pre4 fix is "overkill".
It certainly isn't overkill in respect of doing get_bh in an implicitly
sychronized points where we submit the I/O (that was my second argument
and that was plain wrong).
My first arguments about "overkill" were for async I/O and kiobufs, where
the race cannot trigger. Mainly for the kiobufs I/O I'm still not very
convinced.
> Oh, it does really need a
>
> smp_mb_before_atomic_dec();
>
> as part of the "put_bh()". On x86, this obviously is a no-op. And we
> actually need that one in general - not just for IO completion - as long
> as we consider the "atomic_dec(&bh->b_flags)" to "release" the buffer.
>
> Andrea?
yes, agreed.
Andrea
next prev parent reply other threads:[~2001-07-10 5:43 UTC|newest]
Thread overview: 48+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <Pine.LNX.4.33.0107081640570.308-100000@mikeg.weiden.de>
2001-07-08 15:43 ` VM in 2.4.7-pre hurts Rik van Riel
2001-07-08 17:15 ` Mike Galbraith
2001-07-08 17:58 ` Linus Torvalds
2001-07-08 18:23 ` Rik van Riel
2001-07-08 19:30 ` Linus Torvalds
2001-07-09 2:59 ` Linus Torvalds
2001-07-10 2:56 ` Andrea Arcangeli
2001-07-10 4:03 ` Linus Torvalds
2001-07-10 4:20 ` Linus Torvalds
2001-07-10 5:43 ` Andrea Arcangeli [this message]
2001-07-10 14:56 ` Andrea Arcangeli
2001-07-10 18:46 ` Linus Torvalds
2001-07-10 5:11 ` Andrea Arcangeli
2001-07-09 7:56 ` Mike Galbraith
2001-07-09 8:25 ` Christoph Rohland
2001-07-09 9:18 ` Mike Galbraith
2001-07-09 9:29 ` Christoph Rohland
2001-07-09 9:38 ` Mike Galbraith
2001-07-09 11:17 ` Mike Galbraith
2001-07-09 11:30 ` Christoph Rohland
2001-07-09 12:26 ` Mike Galbraith
2001-07-09 11:25 ` Christoph Rohland
2001-07-09 12:20 ` Mike Galbraith
2001-07-09 16:20 ` Linus Torvalds
2001-07-09 19:44 ` Christoph Rohland
2001-07-09 20:46 ` Linus Torvalds
2001-07-11 19:39 ` Christoph Rohland
2001-07-11 1:05 ` Marcelo Tosatti
2001-07-11 4:03 ` Mike Galbraith
2001-07-12 5:00 ` David Lang
[not found] <Pine.LNX.4.33L.0107071542420.17825-100000@duckman.distro.conectiva>
2001-07-07 18:54 ` Linus Torvalds
2001-07-07 20:11 ` Rik van Riel
2001-07-08 17:11 ` Linus Torvalds
2001-07-08 18:29 ` Rik van Riel
2001-07-07 13:41 Jeff Garzik
2001-07-07 14:05 ` Jeff Garzik
2001-07-07 17:28 ` Linus Torvalds
2001-07-07 17:37 ` Jeff Garzik
2001-07-07 17:53 ` Linus Torvalds
2001-07-07 18:08 ` Jeff Garzik
2001-07-07 18:11 ` Rik van Riel
2001-07-07 21:33 ` Alan Cox
2001-07-07 18:00 ` Rik van Riel
2001-07-07 21:25 ` Alan Cox
2001-07-07 21:29 ` Rik van Riel
2001-07-07 21:34 ` Jeff Garzik
2001-07-07 21:43 ` Alan Cox
2001-07-07 21:45 ` Rik van Riel
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=20010710074315.N1594@athlon.random \
--to=andrea@suse.de \
--cc=alan@redhat.com \
--cc=jgarzik@mandrakesoft.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mikeg@wen-online.de \
--cc=phillips@bonn-fries.net \
--cc=riel@conectiva.com.br \
--cc=torvalds@transmeta.com \
--cc=viro@math.psu.edu \
/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