From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759583AbcAKLKr (ORCPT ); Mon, 11 Jan 2016 06:10:47 -0500 Received: from mx2.suse.de ([195.135.220.15]:33931 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759098AbcAKLKp (ORCPT ); Mon, 11 Jan 2016 06:10:45 -0500 Message-ID: <1452510506.3907.3.camel@suse.com> Subject: Re: [PATCH v2] Add support for usbfs zerocopy. From: Oliver Neukum To: Alan Stern Cc: Lingzhu Xiang , "Steinar H. Gunderson" , Greg Kroah-Hartman , Konrad Rzeszutek Wilk , USB list , Kernel development list Date: Mon, 11 Jan 2016 12:08:26 +0100 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.12.11 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 2016-01-07 at 10:40 -0500, Alan Stern wrote: > > I understand there are some requirements on the allocation such that > > large blocks are not always available. But what is the proper way to > > determine the upper limit of the size such that the user can avoid > > generating warnings like this? (Also, the application really wants > to > > be able to allocate large buffers, maybe tune swiotlb=?.) > > It's debatable whether this should have generated a warning. Why > doesn't dma_alloc_coherent() simply fail silently? I suspect many drivers to be unable to deal well with a failure. Having this report makes "my device doesn't work" easier to solve as a bug report. Hence it seems to me that a driver which can handle a failure with a good fallback should indicate this with a flag to the VM layer. Regards Oliver