From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752552AbcAFPgJ (ORCPT ); Wed, 6 Jan 2016 10:36:09 -0500 Received: from mail-wm0-f54.google.com ([74.125.82.54]:38360 "EHLO mail-wm0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752079AbcAFPgF (ORCPT ); Wed, 6 Jan 2016 10:36:05 -0500 Date: Wed, 6 Jan 2016 16:36:01 +0100 From: "Steinar H. Gunderson" To: Peter Stuge Cc: Christoph Hellwig , 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: <20160106153601.GA25632@imap.gmail.com> References: <20160106064949.GA14998@infradead.org> <20160106144512.GA21737@imap.gmail.com> <20160106152212.15218.qmail@stuge.se> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160106152212.15218.qmail@stuge.se> 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 Wed, Jan 06, 2016 at 04:22:12PM +0100, Peter Stuge wrote: >>> 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. > How about aio? I don't really see how; a USB device does not look much like a file. (Where would you stick the endpoint, for one? And how would you ever submit an URB with multiple packets in it, which is essential?) It feels a bit like trying to use UDP sockets with only read() and write(). In any case, the usbfs interface already exists and is stable. This is about extending it; replacing it with something new from scratch to get zerocopy would seem overkill. /* Steinar */ -- Software Engineer, Google Switzerland