[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <063D6719AE5E284EB5DD2968C1650D6D1CCC00A7@AcuExch.aculab.com>
Date: Fri, 8 Jan 2016 10:22:52 +0000
From: David Laight <David.Laight@...LAB.COM>
To: 'Christoph Hellwig' <hch@...radead.org>,
Alan Stern <stern@...land.harvard.edu>
CC: "Steinar H. Gunderson" <sesse@...gle.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
"linux-usb@...r.kernel.org" <linux-usb@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-mm@...ck.org" <linux-mm@...ck.org>
Subject: RE: [PATCH] Add support for usbfs zerocopy.
From: Christoph Hellwig
> Sent: 08 January 2016 09:46
> On Wed, Jan 06, 2016 at 10:35:05AM -0500, Alan Stern wrote:
> > 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.
>
> IF it was using mmap for I/O it would read in through the page fault
> handler an then mark the page dirty for writeback by the VM. Thats
> clearly not the case.
Indeed, and never is the case when mmap() is processed by a
driver rather than a filesystem.
> Instead it's using mmap on a file as a pecial purpose anonymous
> memory allocator, bypassing the VM and VM policies, including
> allowing to pin kernel memory that way.
Opening a driver often allocates kernel memory, not a big deal.
David
Powered by blists - more mailing lists