public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Daniel Phillips <phillips@innominate.de>
To: Linus Torvalds <torvalds@transmeta.com>,
	Alexander Viro <viro@math.psu.edu>
Cc: David Woodhouse <dwmw2@infradead.org>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Re: kernel BUG at buffer.c:827 in test12-pre6 and 7
Date: Fri, 8 Dec 2000 20:50:41 +0100	[thread overview]
Message-ID: <00120821583804.00491@gimli> (raw)
In-Reply-To: <Pine.LNX.4.10.10012081125580.11302-100000@penguin.transmeta.com>
In-Reply-To: <Pine.LNX.4.10.10012081125580.11302-100000@penguin.transmeta.com>

On Fri, 08 Dec 2000, Linus Torvalds wrote:
> Btw, I also think that the dirty buffer flushing should get the page lock.
> Right now it touches the buffer list without holding the lock on the page
> that the buffer is on, which means that there is really nothign that
> prevents it from racing with the page-based writeout. I don't like that:
> it does hold the LRU list lock, so the list state itself is ok, but it
> does actually touch part of the buffer state that is not really protected
> by the lock.
> 
> I think it ends up being ok because ll_rw_block will ignore buffers that
> get output twice, and the rest of the state is handled with atomic
> operations (b_count and b_flags), but it's not really proper. If
> flush_dirty_buffers() got the page lock, everything would be protected
> properly. Thoughts?

This is great when you have buffersize==pagesize.  When there are
multiple buffers per page it means that some of the buffers might have
to wait for flushing just because bdflush started IO on some other
buffer on the same page.  Oh well.  The common case improves in terms
being proveably correct and the uncommon case gets worse a tiny bit. 
It sounds like a win.

We are moving steadily away from buffer oriented I/O anyway, and I
think we can optimize the case of buffersize!=pagesize in 2.5 by being a
little more careful about how getblk hands out buffers.  Getblk
could force all buffers on the same page to be on the same
major/minor, or even better, to be physically close together.  Or
more simply, flush_dirty_buffers could check for other dirty buffers on
the same page and initiate I/O at the same time.  Or both strategies.

This is by way of buttressing an argument in favor of simplicity
and reliabilty, i.e., being religious about taking the page lock, even
when there's a slight cost in the short term.

-- 
Daniel
-
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-12-08 21:31 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-12-07 22:42 kernel BUG at buffer.c:827 in test12-pre6 and 7 Joseph Cheek
2000-12-07 23:14 ` Keith Owens
2000-12-08  0:22 ` Linus Torvalds
2000-12-08  1:23   ` Joseph Cheek
2000-12-08  3:03     ` Keith Owens
2000-12-08  2:16   ` Joseph Cheek
2000-12-08  7:27   ` Tom Leete
2000-12-08  9:07 ` David Woodhouse
2000-12-08  9:58   ` [found?] " Alexander Viro
2000-12-08 18:11     ` [PATCH] " Alexander Viro
2000-12-08 18:48       ` Linus Torvalds
2000-12-08 19:13         ` Alexander Viro
2000-12-08 19:39           ` Linus Torvalds
2000-12-08 19:50             ` Daniel Phillips [this message]
2000-12-08 21:17               ` Linus Torvalds
2000-12-08 22:30             ` Alexander Viro
2000-12-08 22:42               ` Linus Torvalds
2000-12-09  4:59                 ` Alexander Viro
2000-12-09  8:45                   ` Linus Torvalds
2000-12-09  8:56                     ` Linus Torvalds
2000-12-09 10:40                     ` Alexander Viro
2000-12-09 12:56                       ` Andries Brouwer
2000-12-09 13:11                         ` Alexander Viro
2000-12-09 21:25                           ` Mikulas Patocka
2000-12-10  1:11                             ` Linus Torvalds
2000-12-09 17:28                       ` Linus Torvalds
2000-12-09 18:43                         ` Andi Kleen
2000-12-09 14:00                     ` David S. Miller
2000-12-09 15:37           ` David Woodhouse
2000-12-12  0:54 ` [FIXED!] " Joseph Cheek
     [not found] <90rjbg$8eso1$1@fido.engr.sgi.com>
2000-12-08 22:22 ` [PATCH] " Rajagopal Ananthanarayanan

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=00120821583804.00491@gimli \
    --to=phillips@innominate.de \
    --cc=dwmw2@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --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