Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp4130136pxf; Tue, 16 Mar 2021 06:32:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyWkqLCz9k1gqZIbUIbHNRnzhLljkXSTezlDNa/kiLwe1eXZG3TamMbyjuXknSG5Wh9AkbR X-Received: by 2002:a50:e702:: with SMTP id a2mr36755138edn.3.1615901532940; Tue, 16 Mar 2021 06:32:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615901532; cv=none; d=google.com; s=arc-20160816; b=bic3KlnHsF6DC6+mmTx12plbMoNTLXTqVKBUqSpbjJxWTntrfLE5XydLPigKSxBdLB ubQ4dHApJd6BXMaF8u3YJGoDvTf4PJ3HR38eAHC5RkH+85cRdGgzvrTuySlU4lOxZf+D X7LGUbCzPANMOfD2Rb3YOg+YJ+WfKH2IhbjVWV9jGlnB1UaaXexAVqJ4yhd24c4pildt fRlxCo0285DP/bxAyfKRHF58wQh3Ujiv67TB6SWv4eFN/C1KT/iwJtE0ekxFg1jhli2Z N/d1oJt1trIH9Vhm0CO7tsdsZ20UWKX6GBxL6H+4WeVVVeYClbd5c0scuGmeWgZlWlO4 89XQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=XzQM0Cf+1AT6mhtBiEma2xKVU0JrxTNMkYB+7GvexVc=; b=bv2kGk2eLX3SM8Ggn74YwTkaZihmCN8/xO3VUFwpur5bVfg+vMYIJZDiI+YKBdbboL iJPaxZ1kwjIDF6SzA5Hmhm8uH2rwYi1VDi7i9WHmdzaQdOV3qRqJxqB3NEkALhmvzG+v 7zPXjTBiO+I5Obb/aTlokjkW3nPUzQcLf3zOMDRs2/d+oQbm6PcZ6DeyqcQSYmyrvKea CxYHHjLTw4euUNcpRoQzyaJeGPEJxjfTKy4W5h/0nKBLalPS3csuCcdRbUx5AyYYP04f B8pT/ulc02Jps5YgmfK60oKirJHxIYrlSDPltlE59TXIxu//46qwhcICfLUt89kXGvaY qfRQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a3si14073713ejj.228.2021.03.16.06.31.48; Tue, 16 Mar 2021 06:32:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233687AbhCPH5a (ORCPT + 99 others); Tue, 16 Mar 2021 03:57:30 -0400 Received: from verein.lst.de ([213.95.11.211]:58838 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233632AbhCPH5D (ORCPT ); Tue, 16 Mar 2021 03:57:03 -0400 Received: by verein.lst.de (Postfix, from userid 2407) id 7222268C4E; Tue, 16 Mar 2021 08:56:58 +0100 (CET) Date: Tue, 16 Mar 2021 08:56:58 +0100 From: Christoph Hellwig To: Robin Murphy Cc: Logan Gunthorpe , linux-kernel@vger.kernel.org, linux-nvme@lists.infradead.org, linux-block@vger.kernel.org, linux-pci@vger.kernel.org, linux-mm@kvack.org, iommu@lists.linux-foundation.org, Minturn Dave B , John Hubbard , Dave Hansen , Matthew Wilcox , Christian =?iso-8859-1?Q?K=F6nig?= , Jason Gunthorpe , Jason Ekstrand , Daniel Vetter , Dan Williams , Stephen Bates , Jakowski Andrzej , Christoph Hellwig , Xiong Jianxin Subject: Re: [RFC PATCH v2 06/11] dma-direct: Support PCI P2PDMA pages in dma-direct map_sg Message-ID: <20210316075658.GA15949@lst.de> References: <20210311233142.7900-1-logang@deltatee.com> <20210311233142.7900-7-logang@deltatee.com> <215e1472-5294-d20a-a43a-ff6dfe8cd66e@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2007-11-01) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Mar 12, 2021 at 06:11:17PM +0000, Robin Murphy wrote: > Sure, that's how things stand immediately after this patch. But then > someone comes along with the perfectly reasonable argument for returning > more expressive error information for regular mapping failures as well > (because sometimes those can be terminal too, as above), we start to get > divergent behaviour across architectures and random bits of old code subtly > breaking down the line. *That* is what makes me wary of making a > fundamental change to a long-standing "nonzero means success" interface... Agreed. IMHO dma_map_sg actually needs to be switched to return unsigned to help root this out, going the other way is no helpful.