linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [Kiobuf-io-devel] RFC: Kernel mechanism: Compound event wait
@ 2001-02-12 14:56 bsuparna
  0 siblings, 0 replies; 125+ messages in thread
From: bsuparna @ 2001-02-12 14:56 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: Martin Dalecki, Ben LaHaise, Stephen C. Tweedie, Alan Cox,
	Manfred Spraul, Steve Lord, linux-kernel, kiobuf-io-devel,
	Ingo Molnar


Going through all the discussions once again and trying to look at this
from the point of view of just basic requirements for data structures and
mechanisms, that they imply.

1. Should have a data structure that represents a  memory chain , which may
not be contiguous in physical memory, and which can be passed down as a
single unit all the way  through to lowest level drivers
     - e.g for direct i/o to/from a contiguous virtual address range in
user space (without any intermediate copies)

(Networking and block i/o seem may have require different optimizations in
the design of such a data structure, due to differences in the kind of
patterns expected, as is apparent from the zero-copy networking fragments
vs raw i/o kiobuf/kiovec patches. There are situations when such a data
structure may be passed between subsystems as in the i2o example)

This data structure could be part of an I/O container.

2.  I/O containers may get split or merged as they pass through various
layers --- so any completion mechanism and i/o container design should be
able to account for both cases. At any point, a request could be
     - a collection of several higher level requests,
          or
     - could be one among several sub-requests of a single higher level
request.
(Just as appropriate "clustering"  could happen at each level, appropriate
"splitting" may also take place depending on the situation. It may make
sense to delay splitting as far down the chain as possible in many
situations, where the higher level is only interested in the i/o in its
entirety and not in partial completion )
When caching/buffers are involved, sometimes the sub-requests of a single
higher level request may have individual completion requirements (even when
no merges were involved), because the sub-request buffers may be used to
service other requests alongside. With raw i/o that might not be the case.

3. It is desirable that layers which process the requests along the way
without splitting/merging, be able to pass along the same I/O container
without any duplication or cloning, and intercept async i/o completions for
post processing.

4. (Optional) It would be nice if different kinds of I/O containers or
buffer structures could be used at different levels, without having
explicit linkage fields (like bh --> page, for example) , and in a way that
intermediate drivers or layers can work transparently.

3 & 4 are more of layering related items, which gets a little specific, but
do 1 and 2 cover the general things we are looking for ?

Regards
Suparna

  Suparna Bhattacharya
  Systems Software Group, IBM Global Services, India
  E-mail : bsuparna@in.ibm.com
  Phone : 91-80-5267117, Extn : 2525


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

^ permalink raw reply	[flat|nested] 125+ messages in thread
* Re: [Kiobuf-io-devel] RFC: Kernel mechanism: Compound event wait /notify + callback chains
@ 2001-02-05 19:09 Linus Torvalds
  2001-02-05 19:16 ` [Kiobuf-io-devel] RFC: Kernel mechanism: Compound event wait Alan Cox
  0 siblings, 1 reply; 125+ messages in thread
From: Linus Torvalds @ 2001-02-05 19:09 UTC (permalink / raw)
  To: Stephen C. Tweedie
  Cc: Alan Cox, Manfred Spraul, Christoph Hellwig, Steve Lord,
	linux-kernel, kiobuf-io-devel



On Mon, 5 Feb 2001, Stephen C. Tweedie wrote:
> > Thats true for _block_ disk devices but if we want a generic kiovec then
> > if I am going from video capture to network I dont need to force anything more
> > than 4 byte align
> 
> Kiobufs have never, ever required the IO to be aligned on any
> particular boundary.  They simply make the assumption that the
> underlying buffered object can be described in terms of pages with
> some arbitrary (non-aligned) start/offset.  Every video framebuffer
> I've ever seen satisfies that, so you can easily map an arbitrary
> contiguous region of the framebuffer with a kiobuf already.

Stop this idiocy, Stephen. You're _this_ close to be the first person I
ever blacklist from my mailbox. 

Network. Packets. Fragmentation. Or just non-page-sized MTU's. 

It is _not_ a "series of contiguous pages". Never has been. Never will be.
So stop making excuses.

Also, think of protocols that may want to gather stuff from multiple
places, where the boundaries have little to do with pages but are
specified some other way. Imagine doing "writev()" style operations to
disk, gathering stuff from multiple sources into one operation.

Think of GART remappings - you can have multiple pages that show up as one
"linear" chunk to the graphics device behind the AGP bridge, but that are
_not_ contiguous in real memory.

There just is NO excuse for the "linear series of pages" view. And if you
cannot realize that, then I don't know what's wrong with you. Your
arguments are obviously crap, and the stuff you seem unable to argue
against (like networking) you decide to just ignore. Get your act
together.

		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/

^ permalink raw reply	[flat|nested] 125+ messages in thread
* Re: [Kiobuf-io-devel] RFC: Kernel mechanism: Compound event wait /notify  + callback chains
@ 2001-02-05 16:56 Linus Torvalds
  2001-02-05 17:27 ` [Kiobuf-io-devel] RFC: Kernel mechanism: Compound event wait Alan Cox
  0 siblings, 1 reply; 125+ messages in thread
From: Linus Torvalds @ 2001-02-05 16:56 UTC (permalink / raw)
  To: Manfred Spraul
  Cc: Stephen C. Tweedie, Christoph Hellwig, Steve Lord, linux-kernel,
	kiobuf-io-devel, Alan Cox



On Mon, 5 Feb 2001, Manfred Spraul wrote:
> "Stephen C. Tweedie" wrote:
> > 
> > You simply cannot do physical disk IO on
> > non-sector-aligned memory or in chunks which aren't a multiple of
> > sector size.
> 
> Why not?
> 
> Obviously the disk access itself must be sector aligned and the total
> length must be a multiple of the sector length, but there shouldn't be
> any restrictions on the data buffers.

In fact, regular IDE DMA allows arbitrary scatter-gather at least in
theory. Linux has never used it, so I don't know how well it works in
practice - I would not be surprised if it ends up causing no end of nasty 
corner-cases that have bugs. It's not as if IDE controllers always follow 
the documentation ;)

The _total_ length of the buffers have to be a multiple of the sector
size, and there are some alignment issues (each scatter-gather area has to
be at least 16-bit aligned both in physical memory and in length, and
apparently many controllers need 32-bit alignment). And I'd almost be
surprised if there wouldn't be hardware that wanted cache alignment
because they always expect to burst. 

But despite a lot of likely practical reasons why it won't work for
arbitrary sg lists on plain IDE DMA, there is no _theoretical_ reason it
wouldn't. And there are bound to be better controllers that could handle
it.

		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/

^ permalink raw reply	[flat|nested] 125+ messages in thread
* Re: [Kiobuf-io-devel] RFC: Kernel mechanism: Compound event wait /notify + callback chains
@ 2001-02-01 18:39 Rik van Riel
  2001-02-01 18:46 ` [Kiobuf-io-devel] RFC: Kernel mechanism: Compound event wait Alan Cox
  0 siblings, 1 reply; 125+ messages in thread
From: Rik van Riel @ 2001-02-01 18:39 UTC (permalink / raw)
  To: Alan Cox
  Cc: Christoph Hellwig, Stephen C. Tweedie, bsuparna, linux-kernel,
	kiobuf-io-devel

On Thu, 1 Feb 2001, Alan Cox wrote:

> > Now one could say: just let the networkers use their own kind of buffers
> > (and that's exactly what is done in the zerocopy patches), but that again leds
> > to inefficient buffer passing and ungeneric IO handling.

	[snip]
> It is quite possible that the right thing to do is to do
> conversions in the cases it happens.

OTOH, somehow a zero-copy system which converts the zero-copy
metadata every time the buffer is handed to another subsystem
just doesn't sound right ...

(well, maybe it _is_, but it looks quite inefficient at first
glance)

regards,

Rik
--
Virtual memory is like a game you can't win;
However, without VM there's truly nothing to lose...

		http://www.surriel.com/
http://www.conectiva.com/	http://distro.conectiva.com.br/

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

^ permalink raw reply	[flat|nested] 125+ messages in thread

end of thread, other threads:[~2001-02-12 16:21 UTC | newest]

Thread overview: 125+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [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-05 12:09 ` [Kiobuf-io-devel] RFC: Kernel mechanism: Compound event wait /notify + callback chains Stephen C. Tweedie
2001-02-12 14:56 [Kiobuf-io-devel] RFC: Kernel mechanism: Compound event wait bsuparna
  -- strict thread matches above, loose matches on Subject: below --
2001-02-05 19:09 [Kiobuf-io-devel] RFC: Kernel mechanism: Compound event wait /notify + callback chains 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-08 15:06                                                     ` 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
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 16:56 [Kiobuf-io-devel] RFC: Kernel mechanism: Compound event wait /notify + callback chains Linus Torvalds
2001-02-05 17:27 ` [Kiobuf-io-devel] RFC: Kernel mechanism: Compound event wait Alan Cox
2001-02-01 18:39 [Kiobuf-io-devel] RFC: Kernel mechanism: Compound event wait /notify + callback chains Rik van Riel
2001-02-01 18:46 ` [Kiobuf-io-devel] RFC: Kernel mechanism: Compound event wait Alan Cox

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).