From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752194AbcAFOpU (ORCPT ); Wed, 6 Jan 2016 09:45:20 -0500 Received: from mail-wm0-f44.google.com ([74.125.82.44]:34837 "EHLO mail-wm0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751653AbcAFOpP (ORCPT ); Wed, 6 Jan 2016 09:45:15 -0500 Date: Wed, 6 Jan 2016 15:45:12 +0100 From: "Steinar H. Gunderson" To: Christoph Hellwig Cc: Greg Kroah-Hartman , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, stern@rowland.harvard.edu Subject: Re: [PATCH] Add support for usbfs zerocopy. Message-ID: <20160106144512.GA21737@imap.gmail.com> References: <20160106064949.GA14998@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160106064949.GA14998@infradead.org> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. /* Steinar */ -- Software Engineer, Google Switzerland