public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@digeo.com>
To: Daniel Phillips <phillips@arcor.de>
Cc: Jesse Barnes <jbarnes@sgi.com>,
	"Richard B. Johnson" <root@chaos.analogic.com>,
	Imran Badr <imran.badr@cavium.com>,
	"'David S. Miller'" <davem@redhat.com>,
	linux-kernel@vger.kernel.org
Subject: Re: Calculating kernel logical address ..
Date: Mon, 09 Sep 2002 12:40:42 -0700	[thread overview]
Message-ID: <3D7CF93A.972FCC8D@digeo.com> (raw)
In-Reply-To: E17oTES-0006qj-00@starship

Daniel Phillips wrote:
> 
> On Monday 09 September 2002 20:13, Jesse Barnes wrote:
> > On Mon, Sep 09, 2002 at 02:00:35PM -0400, Richard B. Johnson wrote:
> > > Well I just read Documentation/DMA-mapping.txt as advised by David
> > > and it seems as though it will no longer be possible to do what
> > > many programmers have been wanting to do, to wit:
> > >
> > > (1) In user-code, allocate a buffer.
> > > (2) Lock that buffer into memory.
> > > (3) Call some driver that DMAs data to/from that buffer.
> >
> > It looks drivers/media/video/video-buf.c uses alloc_kiovec() and
> > map_user_kiobuf() to do it.  And I think Ben LaHaise was talking about
> > removing these functions and creating some other, lightweight
> > interface for the same purpose?
> 
> Hopefully.  My understanding is that kio is obsoleted by bio and aio,
> anyone want to confirm/deny this?

Mumble, mutter, dunno.

There are two sides to kiobufs: they can be used as a front-end to get_user_pages (video-buf.c, Imran's application and at least one
proprietary mpeg streaming driver of which I am aware).  And they
can be used as a container for direct IO to a block device (mtdblk.c
and LVM1).

Nobody seems to have come forth to implement a thought-out scatter/gather,
map-user-pages library infrastructure so I'd be a bit reluctant to
break stuff without offering a replacement.

We need a general-purpose "read or write these pages to this blockdev"
library function.  For mtdblk, LVM1/LVM2 and probably swapper_space.
With that we can remove the block IO stuff from kiovecs.  And convert
the other drivers to use get_user_pages() directly into an ad-hoc private
page array.  Those things would allow kiovecs/kiobufs to be retired.

I guess we need to get more motivated about this, before some large
piece of infrastructure (EVMS/LVM2) lands in the tree using ll_rw_kiovec.

This:

generic_direct_IO(int rw, struct inode *inode, const struct iovec *iov, 
        loff_t offset, unsigned long nr_segs, get_blocks_t get_blocks)

is getting close to what we need.  But it is synchronous, and too
heavyweight for swap I/O.

  reply	other threads:[~2002-09-09 19:36 UTC|newest]

Thread overview: 49+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-09-09 17:06 Calculating kernel logical address Imran Badr
2002-09-09 17:29 ` Richard B. Johnson
2002-09-09 17:23   ` David S. Miller
2002-09-09 17:34     ` Martin J. Bligh
2002-09-09 17:40     ` Daniel Phillips
2002-09-09 17:31   ` Imran Badr
2002-09-09 18:00     ` Richard B. Johnson
2002-09-09 18:12       ` Imran Badr
2002-09-09 18:27         ` Daniel Phillips
2002-09-09 18:41           ` Imran Badr
2002-09-09 21:55         ` Alan Cox
2002-09-09 22:52           ` Imran Badr
2002-09-09 23:09             ` Alan Cox
2002-09-09 18:13       ` Jesse Barnes
2002-09-09 18:25         ` Daniel Phillips
2002-09-09 19:40           ` Andrew Morton [this message]
2002-09-09 20:41             ` Daniel Phillips
2002-09-10  6:43               ` Jens Axboe
2002-09-10  7:12                 ` Andrew Morton
2002-09-09 18:42         ` Andrew Morton
2002-09-10  7:03           ` Gerd Knorr
2002-09-09 18:16       ` Kurt Ferreira
2002-09-09 18:17       ` David S. Miller
2002-09-09 18:17       ` Daniel Phillips
2002-09-09 18:43         ` Richard B. Johnson
2002-09-09 18:50           ` Daniel Phillips
2002-09-09 18:57             ` Richard B. Johnson
2002-09-09 18:08     ` Andrew Morton
2002-09-09 18:23       ` Daniel Phillips
2002-09-09 18:49         ` Imran Badr
2002-09-09 18:46           ` David S. Miller
2002-09-09 19:06           ` Daniel Phillips
2002-09-09 19:14             ` Andrew Morton
2002-09-09 19:23               ` Imran Badr
  -- strict thread matches above, loose matches on Subject: below --
2002-09-09 21:19 Manfred Spraul
2002-09-09 21:47 ` Andrew Morton
2002-09-10 17:01   ` Manfred Spraul
2002-09-09 21:02 Manfred Spraul
2002-09-09 21:07 ` Imran Badr
2002-09-06 15:44 Manfred Spraul
2002-09-06 17:13 ` Imran Badr
2002-09-07  1:57   ` Daniel Phillips
2002-09-06  3:23 side-by-side Re: BYTE Unix Benchmarks Version 3.6 Daniel Phillips
2002-09-06  3:34 ` Calculating kernel logical address Imran Badr
2002-09-07  1:44   ` Daniel Phillips
2002-09-08  0:01     ` David S. Miller
2002-09-08 18:44       ` Daniel Phillips
2002-09-09  5:00         ` David S. Miller
2002-09-09  5:17           ` Daniel Phillips
2002-09-09  5:28             ` David S. Miller

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=3D7CF93A.972FCC8D@digeo.com \
    --to=akpm@digeo.com \
    --cc=davem@redhat.com \
    --cc=imran.badr@cavium.com \
    --cc=jbarnes@sgi.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=phillips@arcor.de \
    --cc=root@chaos.analogic.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