linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@transmeta.com>
To: Ben LaHaise <bcrl@redhat.com>
Cc: Ingo Molnar <mingo@elte.hu>,
	"Stephen C. Tweedie" <sct@redhat.com>,
	Alan Cox <alan@lxorguk.ukuu.org.uk>,
	Manfred Spraul <manfred@colorfullife.com>,
	Steve Lord <lord@sgi.com>,
	Linux Kernel List <linux-kernel@vger.kernel.org>,
	kiobuf-io-devel@lists.sourceforge.net,
	Ingo Molnar <mingo@redhat.com>
Subject: Re: [Kiobuf-io-devel] RFC: Kernel mechanism: Compound event wait
Date: Tue, 6 Feb 2001 12:26:50 -0800 (PST)	[thread overview]
Message-ID: <Pine.LNX.4.10.10102061210130.1474-100000@penguin.transmeta.com> (raw)
In-Reply-To: <Pine.LNX.4.30.0102061437250.15204-100000@today.toronto.redhat.com>



On Tue, 6 Feb 2001, Ben LaHaise wrote:
> 
> This small correction is the crux of the problem: if it blocks, it takes
> away from the ability of the process to continue doing useful work.  If it
> returns -EAGAIN, then that's okay, the io will be resubmitted later when
> other disk io has completed.  But, it should be possible to continue
> servicing network requests or user io while disk io is underway.

Ehh..  The supprot for this is actually all there already. It's just not
used, because nobody asked for it.

Check the "rw_ahead" variable in __make_request(). Notice how it does
everything you ask for.

So remind me again why we should need a whole new interface for something
that already exists but isn't exported because nobody needed it? It got
created for READA, but that isn't used any more.

You could absolutely _trivially_ re-introduce it (along with WRITEA), but
you should probably change the semantics of what happens when it doesn't
get a request. Something like making "submit_bh()" return an error value
for the case, instead of doing "bh->b_end_io(0..)" which is what I think
it does right now. That would make it easier for the submitter to say "oh,
the queue is full".

This is probably all of 5 lines of code.

I really think that people don't give the block device layer enough
credit. Some of it is quite ugly due to 10 years of history, and there is
certainly a lack of some interesting capabilities (there is no "barrier"
operation right now to enforce ordering, for example, and it really would
be sensible to support a wider operation of ops than just read/write and
let the ioctl's use it to pass commands too).

These issues are things that I've been discussing with Jens for the last
few months, and are things that he already to some degree has been toying
with, and we already decided to try to do this during 2.5.x.

It's already been a _lot_ of clean-up with the per-queue request lists
etc, and there's more to be done in the cleanup section too. But the fact
is that too many people seem to have ignored the support that IS there,
and that actually works very well indeed - and is very generic.

> > What more do you think your kiobuf's should be able to do?
> 
> That's what my code is doing today.  There are a ton of bh's setup for a
> single kiobuf request that is issued.  For something like a single 256kb
> io, this is the difference between the batched io requests being passed
> into submit_bh fitting in L1 cache and overflowing it.  Resizable bh's
> would certainly improve this.

bh's _are_ resizeable. You just change bh->b_size, and you're done.

Of course, you'll need to do your own memory management for the backing
store. The generic bread() etc layer makes memory management simpler by
having just one size per page and making "struct page" their native mm
etity, but that's not really a bh issue - it's a MM issue and stems from
the fact that this is how all traditional block filesystems tend to want
to work.

NOTE! If you do start to resize the buffer heads, please give me a ping.
The code has never actually been _tested_ with anything but 512. 1024,
2048, 4096 and 8192-byte blocks. I would not be surprised at all if some
low-level drivers actually have asserts that the sizes are ones they
"recognize". The generic layer should be happy with anything that is a
multiple of 512, but as with all things, you'll probably find some gotchas
when you actually try something new.

		Linus

-
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/

  parent reply	other threads:[~2001-02-06 20:27 UTC|newest]

Thread overview: 186+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-02-01 14:44 [Kiobuf-io-devel] RFC: Kernel mechanism: Compound event wait /notify + callback chains bsuparna
2001-02-01 15:09 ` Christoph Hellwig
2001-02-01 16:08   ` Steve Lord
2001-02-01 16:49     ` Stephen C. Tweedie
2001-02-01 17:02       ` Christoph Hellwig
2001-02-01 17:34         ` Alan Cox
2001-02-01 17:49           ` Stephen C. Tweedie
2001-02-01 17:09             ` Chaitanya Tumuluri
2001-02-01 20:33             ` Christoph Hellwig
2001-02-01 20:56               ` Steve Lord
2001-02-01 20:59                 ` Christoph Hellwig
2001-02-01 21:17                   ` Steve Lord
2001-02-01 21:44               ` Stephen C. Tweedie
2001-02-01 22:07               ` Stephen C. Tweedie
2001-02-02 12:02                 ` Christoph Hellwig
2001-02-05 12:19                   ` Stephen C. Tweedie
2001-02-05 21:28                     ` Ingo Molnar
2001-02-05 22:58                       ` Stephen C. Tweedie
2001-02-05 23:06                         ` Alan Cox
2001-02-05 23:16                           ` Stephen C. Tweedie
2001-02-06  0:19                         ` Manfred Spraul
2001-02-03 20:28                 ` Linus Torvalds
2001-02-05 11:03                   ` Stephen C. Tweedie
2001-02-05 12:00                     ` Manfred Spraul
2001-02-05 15:03                       ` Stephen C. Tweedie
2001-02-05 15:19                         ` Alan Cox
2001-02-05 17:20                           ` Stephen C. Tweedie
2001-02-05 17:29                             ` Alan Cox
2001-02-05 18:49                               ` Stephen C. Tweedie
2001-02-05 19:04                                 ` Alan Cox
2001-02-05 19:09                                 ` Linus Torvalds
2001-02-05 19:16                                   ` [Kiobuf-io-devel] RFC: Kernel mechanism: Compound event wait Alan Cox
2001-02-05 19:28                                     ` Linus Torvalds
2001-02-05 20:54                                       ` Stephen C. Tweedie
2001-02-05 21:08                                         ` David Lang
2001-02-05 21:51                                         ` Alan Cox
2001-02-06  0:07                                         ` Stephen C. Tweedie
2001-02-06 17:00                                           ` Christoph Hellwig
2001-02-06 17:05                                             ` Stephen C. Tweedie
2001-02-06 17:14                                               ` Jens Axboe
2001-02-06 17:22                                               ` Christoph Hellwig
2001-02-06 18:26                                                 ` Stephen C. Tweedie
2001-02-06 17:37                                               ` Ben LaHaise
2001-02-06 18:00                                                 ` Jens Axboe
2001-02-06 18:09                                                   ` Ben LaHaise
2001-02-06 19:35                                                     ` Jens Axboe
2001-02-06 18:14                                                 ` Linus Torvalds
2001-02-08 11:21                                                   ` Andi Kleen
2001-02-08 14:11                                                   ` Martin Dalecki
2001-02-08 17:59                                                     ` Linus Torvalds
2001-02-06 18:18                                                 ` Ingo Molnar
2001-02-06 18:25                                                   ` Ben LaHaise
2001-02-06 18:35                                                     ` Ingo Molnar
2001-02-06 18:54                                                       ` Ben LaHaise
2001-02-06 18:58                                                         ` Ingo Molnar
2001-02-06 19:11                                                           ` Ben LaHaise
2001-02-06 19:32                                                             ` Jens Axboe
2001-02-06 19:32                                                             ` Ingo Molnar
2001-02-06 19:32                                                             ` Linus Torvalds
2001-02-06 19:44                                                               ` Ingo Molnar
2001-02-06 19:49                                                               ` Ben LaHaise
2001-02-06 19:57                                                                 ` Ingo Molnar
2001-02-06 20:07                                                                   ` Jens Axboe
2001-02-06 20:25                                                                   ` Ben LaHaise
2001-02-06 20:41                                                                     ` Manfred Spraul
2001-02-06 20:50                                                                       ` Jens Axboe
2001-02-06 21:26                                                                         ` Manfred Spraul
2001-02-06 21:42                                                                           ` Linus Torvalds
2001-02-06 20:16                                                                             ` Marcelo Tosatti
2001-02-06 22:09                                                                               ` Jens Axboe
2001-02-06 22:26                                                                                 ` Linus Torvalds
2001-02-06 21:13                                                                                   ` Marcelo Tosatti
2001-02-06 23:26                                                                                     ` Linus Torvalds
2001-02-07 23:17                                                                                       ` select() returning busy for regular files [was Re: [Kiobuf-io-devel] RFC: Kernel mechanism: Compound event wait] Pavel Machek
2001-02-08 13:57                                                                                         ` Ben LaHaise
2001-02-08 17:52                                                                                         ` Linus Torvalds
2001-02-08 15:06                                                                                       ` [Kiobuf-io-devel] RFC: Kernel mechanism: Compound event wait Ben LaHaise
2001-02-08 13:44                                                                                         ` Marcelo Tosatti
2001-02-08 13:45                                                                                           ` Marcelo Tosatti
2001-02-07 23:15                                                                                   ` Pavel Machek
2001-02-08 13:22                                                                                     ` Stephen C. Tweedie
2001-02-08 12:03                                                                                       ` Marcelo Tosatti
2001-02-08 15:46                                                                                         ` Mikulas Patocka
2001-02-08 14:05                                                                                           ` Marcelo Tosatti
2001-02-08 16:11                                                                                             ` Mikulas Patocka
2001-02-08 14:44                                                                                               ` Marcelo Tosatti
2001-02-08 16:57                                                                                               ` Rik van Riel
2001-02-08 17:13                                                                                                 ` James Sutherland
2001-02-08 18:38                                                                                                 ` Linus Torvalds
2001-02-09 12:17                                                                                                   ` Martin Dalecki
2001-02-08 15:55                                                                                           ` Jens Axboe
2001-02-08 18:09                                                                                         ` Linus Torvalds
2001-02-08 14:52                                                                                     ` Mikulas Patocka
2001-02-08 19:50                                                                                       ` Stephen C. Tweedie
2001-02-11 21:30                                                                                       ` Pavel Machek
2001-02-06 21:57                                                                             ` Manfred Spraul
2001-02-06 22:13                                                                               ` Linus Torvalds
2001-02-06 22:26                                                                                 ` Andre Hedrick
2001-02-06 20:49                                                                     ` Jens Axboe
2001-02-07  0:21                                                                   ` Stephen C. Tweedie
2001-02-07  0:25                                                                     ` Ingo Molnar
2001-02-07  0:36                                                                       ` Stephen C. Tweedie
2001-02-07  0:50                                                                         ` Linus Torvalds
2001-02-07  1:49                                                                           ` Stephen C. Tweedie
2001-02-07  2:37                                                                             ` Linus Torvalds
2001-02-07 14:52                                                                               ` Stephen C. Tweedie
2001-02-07 19:12                                                                               ` Richard Gooch
2001-02-07 20:03                                                                                 ` Stephen C. Tweedie
2001-02-07  1:51                                                                           ` Jeff V. Merkey
2001-02-07  1:01                                                                             ` Ingo Molnar
2001-02-07  1:59                                                                               ` Jeff V. Merkey
2001-02-07  1:02                                                                             ` Jens Axboe
2001-02-07  1:19                                                                               ` Linus Torvalds
2001-02-07  1:39                                                                                 ` Jens Axboe
2001-02-07  1:45                                                                                   ` Linus Torvalds
2001-02-07  1:55                                                                                     ` Jens Axboe
2001-02-07  9:10                                                                                     ` David Howells
2001-02-07 12:16                                                                                       ` Stephen C. Tweedie
2001-02-07  2:00                                                                               ` Jeff V. Merkey
2001-02-07  1:06                                                                                 ` Ingo Molnar
2001-02-07  1:09                                                                                   ` Jens Axboe
2001-02-07  1:11                                                                                     ` Ingo Molnar
2001-02-07  1:26                                                                                   ` Linus Torvalds
2001-02-07  2:07                                                                                   ` Jeff V. Merkey
2001-02-07  1:08                                                                                 ` Jens Axboe
2001-02-07  2:08                                                                                   ` Jeff V. Merkey
2001-02-07  1:42                                                                         ` Jeff V. Merkey
2001-02-07  0:42                                                                       ` Linus Torvalds
2001-02-07  0:35                                                                     ` Jens Axboe
2001-02-07  0:41                                                                     ` Linus Torvalds
2001-02-07  1:27                                                                       ` Stephen C. Tweedie
2001-02-07  1:40                                                                         ` Linus Torvalds
2001-02-12 10:07                                                                           ` Jamie Lokier
2001-02-06 20:26                                                                 ` Linus Torvalds [this message]
2001-02-06 20:25                                                               ` Christoph Hellwig
2001-02-06 20:35                                                                 ` Ingo Molnar
2001-02-06 19:05                                                                   ` Marcelo Tosatti
2001-02-06 20:59                                                                     ` Ingo Molnar
2001-02-06 21:20                                                                       ` Steve Lord
2001-02-07 18:27                                                                   ` Christoph Hellwig
2001-02-06 20:59                                                                 ` Linus Torvalds
2001-02-07 18:26                                                                   ` Christoph Hellwig
2001-02-07 18:36                                                                     ` Linus Torvalds
2001-02-07 18:44                                                                       ` Christoph Hellwig
2001-02-08  0:34                                                                       ` Neil Brown
2001-02-06 19:46                                                             ` Ingo Molnar
2001-02-06 20:16                                                               ` Ben LaHaise
2001-02-06 20:22                                                                 ` Ingo Molnar
2001-02-06 19:20                                                         ` Linus Torvalds
2001-02-06  0:31                                       ` Roman Zippel
2001-02-06  1:01                                         ` Linus Torvalds
2001-02-06  9:22                                           ` Roman Zippel
2001-02-06  9:30                                           ` Ingo Molnar
2001-02-06  1:08                                         ` David S. Miller
2001-02-05 22:09                         ` [Kiobuf-io-devel] RFC: Kernel mechanism: Compound event wait /notify + callback chains Ingo Molnar
2001-02-05 16:56                       ` Linus Torvalds
2001-02-05 17:27                         ` [Kiobuf-io-devel] RFC: Kernel mechanism: Compound event wait Alan Cox
2001-02-05 16:36                     ` [Kiobuf-io-devel] RFC: Kernel mechanism: Compound event wait /notify + callback chains Linus Torvalds
2001-02-05 19:08                       ` Stephen C. Tweedie
2001-02-01 17:49           ` Christoph Hellwig
2001-02-01 17:58             ` Alan Cox
2001-02-01 18:32               ` Rik van Riel
2001-02-01 18:59                 ` yodaiken
2001-02-01 19:33             ` Stephen C. Tweedie
2001-02-01 18:51           ` bcrl
2001-02-01 16:16   ` Stephen C. Tweedie
2001-02-01 17:05     ` Christoph Hellwig
2001-02-01 17:09       ` Christoph Hellwig
2001-02-01 17:41       ` Stephen C. Tweedie
2001-02-01 18:14         ` Christoph Hellwig
2001-02-01 18:25           ` Alan Cox
2001-02-01 18:39             ` Rik van Riel
2001-02-01 18:46               ` [Kiobuf-io-devel] RFC: Kernel mechanism: Compound event wait Alan Cox
2001-02-01 18:48             ` [Kiobuf-io-devel] RFC: Kernel mechanism: Compound event wait /notify + callback chains Christoph Hellwig
2001-02-01 18:57               ` Alan Cox
2001-02-01 19:00                 ` Christoph Hellwig
2001-02-01 19:32           ` Stephen C. Tweedie
2001-02-01 20:46             ` Christoph Hellwig
2001-02-01 21:25               ` Stephen C. Tweedie
2001-02-02 11:51                 ` Christoph Hellwig
2001-02-02 14:04                   ` Stephen C. Tweedie
2001-02-02  4:18           ` bcrl
2001-02-02 12:12             ` Christoph Hellwig
2001-02-01 20:04         ` Chaitanya Tumuluri
     [not found] <CA2569E9.004A4E23.00@d73mta05.au.ibm.com>
2001-02-04 16:46 ` [Kiobuf-io-devel] RFC: Kernel mechanism: Compound event wait Alan Cox
2001-02-12 14:56 bsuparna

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=Pine.LNX.4.10.10102061210130.1474-100000@penguin.transmeta.com \
    --to=torvalds@transmeta.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=bcrl@redhat.com \
    --cc=kiobuf-io-devel@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lord@sgi.com \
    --cc=manfred@colorfullife.com \
    --cc=mingo@elte.hu \
    --cc=mingo@redhat.com \
    --cc=sct@redhat.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;
as well as URLs for NNTP newsgroup(s).