From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754219AbcAHJpl (ORCPT ); Fri, 8 Jan 2016 04:45:41 -0500 Received: from bombadil.infradead.org ([198.137.202.9]:42586 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751397AbcAHJpi (ORCPT ); Fri, 8 Jan 2016 04:45:38 -0500 Date: Fri, 8 Jan 2016 01:45:35 -0800 From: Christoph Hellwig To: Alan Stern Cc: "Steinar H. Gunderson" , Christoph Hellwig , Greg Kroah-Hartman , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH] Add support for usbfs zerocopy. Message-ID: <20160108094535.GA17286@infradead.org> References: <20160106144512.GA21737@imap.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. 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.