[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.44L0.1601061032000.1579-100000@iolanthe.rowland.org>
Date: Wed, 6 Jan 2016 10:35:05 -0500 (EST)
From: Alan Stern <stern@...land.harvard.edu>
To: "Steinar H. Gunderson" <sesse@...gle.com>
cc: Christoph Hellwig <hch@...radead.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
<linux-usb@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] Add support for usbfs zerocopy.
On Wed, 6 Jan 2016, Steinar H. Gunderson wrote:
> On Tue, Jan 05, 2016 at 10:49:49PM -0800, Christoph Hellwig wrote:
> > This is a completely broken usage of the mmap interface. if you use
> > mmap on a device file you must use the actual mmap for the data
> > transfer.
>
> Really? V4L does exactly the same thing, from what I can see. It's just a way
> of allocating memory with specific properties, roughly similar to hugetlbfs.
>
> > Our interface for zero copy reads/writes is O_DIRECT, and that requires
> > not special memory allocation, just proper alignment.
>
> But that assumes you are using I/O using read()/write(). There's no way you
> can shoehorn USB isochronous reads into the read() interface, O_DIRECT or not.
Indeed, the I/O operations we are using with mmap here are not reads or
writes; they are ioctls. As far as I know, the kernel doesn't have any
defined interface for zerocopy ioctls.
Furthermore, this approach _does_ use the mmap for data transfers. I'm
not sure what Christoph was referring to.
Alan Stern
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists