public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrea Arcangeli <andrea@suse.de>
To: Jeff Garzik <jgarzik@mandrakesoft.com>
Cc: Linus Torvalds <torvalds@transmeta.com>,
	"Stephen C. Tweedie" <sct@redhat.com>,
	linux-kernel@vger.kernel.org
Subject: Re: DVD blockdevice buffers
Date: Thu, 24 May 2001 00:32:20 +0200	[thread overview]
Message-ID: <20010524003220.C764@athlon.random> (raw)
In-Reply-To: <Pine.LNX.4.31.0105231258420.6642-100000@penguin.transmeta.com> <3B0C202E.AA9962AD@mandrakesoft.com>
In-Reply-To: <3B0C202E.AA9962AD@mandrakesoft.com>; from jgarzik@mandrakesoft.com on Wed, May 23, 2001 at 04:40:14PM -0400

On Wed, May 23, 2001 at 04:40:14PM -0400, Jeff Garzik wrote:
> Linus Torvalds wrote:
> > Now, it may be that the preliminary patches from Andrea do not work this
> > way. I didn't look at them too closely, and I assume that Andrea basically
> > made the block-size be the same as the page size. That's how I would have
> > done it (and then waited for people to find real life cases where we want
> > to allow sector writes).
> 
> Due to limitations in low-level drivers, Andrea was forced to hardcode
> 4096 for the block size, instead of using PAGE_SIZE or PAGE_CACHE_SIZE.

Yes, actually to trigger the read-modify-write logic not more than with
the current buffercache I could simply decrease the softblocksize of the
blkdev pagecache to 1k, like the default granularity of the current
buffercache before any filesystem is mounted, but that would impose a
_very_ significant performance hit to the non-cached case which is quite
important as well mainly for a blkdev I think.

I measured on high end disks reading (out of cache) with 4k buffercache
blocksize instead of with 1k buffercache blocksize is an exact x2
improvement because at that speed the bottleneck become the work that
has to be done by the cpu.

Infact rawio /dev/raw* is as well 2 times slower than the 2.4 4k
bufferecache on blkdev in those environment (of course with rawio the
cpu is not used much comared to the buffered I/O) and that's one of the
reasons I also imposed a 4k granularity on the direct I/O from
open("/dev/hda", O_DIRECT|O_RDRW)  I didn't benchmarked yet but I
suspect that doing rawio with forced 4k bh (as opposed to 512bytes bh of
/dev/raw*) will make O_DIRECT on the blkdev much faster than the
buffered I/O on the blkdev through pagecache just like O_DIRECT scored
the 170MByte/sec of very scalable I/O recently I think also because it
was done through ext2 that imposed a 4k softblocksize:

        http://boudicca.tux.org/hypermail/linux-kernel/2001week17/1175.html
        http://boudicca.tux.org/hypermail/linux-kernel/2001week17/att-1175/01-directio.png

(boudicca.tux.org is not online at the moment but I assume it will
return online soon)

However this is still flexible, right now my first object is to solve
the showstoppers (so for example I can run my machine with that patch
applied) and then we can think how to solve the 4k/1k/512byte
softblocksize issues. Possibly automatically or selectable from
userspace. I will try to work on the blkdev patch tomorrow to bring it
in an usable state.

Andrea

  reply	other threads:[~2001-05-23 22:32 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-05-18 19:02 DVD blockdevice buffers Eduard Hasenleithner
2001-05-18 19:25 ` Jens Axboe
2001-05-18 19:59   ` Eduard Hasenleithner
2001-05-20  2:36   ` Linus Torvalds
2001-05-23 17:34     ` Stephen C. Tweedie
2001-05-23 18:12       ` Linus Torvalds
2001-05-23 19:57         ` Stephen C. Tweedie
2001-05-23 20:01           ` Linus Torvalds
2001-05-23 20:40             ` Jeff Garzik
2001-05-23 22:32               ` Andrea Arcangeli [this message]
2001-05-25 20:12                 ` blkdev-pagecache-2 [was Re: DVD blockdevice buffers] Andrea Arcangeli
2001-05-25 20:15                   ` Andrea Arcangeli
2001-05-23 22:09             ` DVD blockdevice buffers Andrea Arcangeli
2001-05-23 22:13               ` Alexander Viro
2001-05-23 22:24                 ` Andrea Arcangeli
2001-05-24 11:36             ` Stephen C. Tweedie
2001-05-25 15:09               ` Eric W. Biederman
2001-05-25 15:45                 ` Stephen C. Tweedie
2001-05-25 17:16                 ` Linus Torvalds
2001-05-25 17:40                   ` Alexander Viro
2001-05-25 18:05                     ` Linus Torvalds
2001-05-25 18:24                       ` Alexander Viro
2001-05-25 19:02                         ` Stephen C. Tweedie
2001-05-27  6:38                     ` Pavel Machek
2001-05-25 21:07                   ` Eric W. Biederman
2001-05-25 21:18                     ` Linus Torvalds
2001-05-25 22:31                       ` Eric W. Biederman
  -- strict thread matches above, loose matches on Subject: below --
2001-05-19 18:16 Adam Schrotenboer
2001-05-19 22:56 ` Jens Axboe
2001-05-20  1:55   ` Adam Schrotenboer
2001-05-21 15:44   ` Adam Schrotenboer
2001-05-21 15:47     ` Jens Axboe

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=20010524003220.C764@athlon.random \
    --to=andrea@suse.de \
    --cc=jgarzik@mandrakesoft.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sct@redhat.com \
    --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