Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp3228276pxb; Mon, 9 Nov 2020 06:06:40 -0800 (PST) X-Google-Smtp-Source: ABdhPJxHEel/lUo4LeROCnrEjAwPPAZI1KTlkbqSWCZB+x82qUCchrJxLRJY6hFguqISebNmSZQN X-Received: by 2002:adf:b1d6:: with SMTP id r22mr17390967wra.136.1604930800491; Mon, 09 Nov 2020 06:06:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604930800; cv=none; d=google.com; s=arc-20160816; b=V2fEBLsBciujiNWCWWZFFxA5Gq2G2RJysINhoElqC7HMz8S+3EoNtP1NSvZyRoBXz8 MCPYU/Qc85oGmstlVcpKU1IXbfH18KhJsZ/+FbFK/3y7ck8nCVuOyXhxsyQI8SzYI8xr 3ZHcWLlmRKnAkAD6REDuYd3KLP2smpnnTpTdXTRstpmlz+YFlDnZAyFzpqOcNRgcq83U Yj2a+THTjl0OTgEi88Vd1ewHUIUJykAFvUqogvm4Zr5f1831/e7lweoeWw/xHwqCUE6C cXndQujY4myGdf9V5bLKe/QJyeW8bkV0+wG4ARXdbzxjrQpABh+XM/qMLJg6wpxhem1j rLDQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=gcXSpmzUNWgi+gHROxtiP43jMchdOy65bCtwD9enF/w=; b=RQjiN90RNIGXCuvQZ4WwxqMQezYUZpcdkkq5DSScFPSJioO7susIxPvuNfJIdO+JTv 3oyhMfA0iXNzH/Mn092YpEoiAdjv9Jck1CI4f0TDKZvzFohEvQMVnLm/o0SZZv5tHEIa hhqW/H1CQavuTLzGSd0cBPXNIsK81aVHja+NrjuptQLSSyvzWxDmkGDfzjz5fy2w2DYB ki6P4/18W9fiQFU1FNV2Ez+t+dK+EyeXtMKy+7e1aRnAcPDZ/MfLHyt1Vcl3ui6ItCvj sdkhBOfVqzEb+OfNGX/fRjuliYKXMGrI7D4SmCH972tOQGF80gWloeJ8Uc4xxik0uvhi bdMw== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h13si7494856edn.268.2020.11.09.06.06.16; Mon, 09 Nov 2020 06:06:40 -0800 (PST) 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730941AbgKIOC0 (ORCPT + 99 others); Mon, 9 Nov 2020 09:02:26 -0500 Received: from foss.arm.com ([217.140.110.172]:41070 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730035AbgKIOC0 (ORCPT ); Mon, 9 Nov 2020 09:02:26 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 8C77E31B; Mon, 9 Nov 2020 06:02:25 -0800 (PST) Received: from [10.57.54.223] (unknown [10.57.54.223]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 383D53F719; Mon, 9 Nov 2020 06:02:23 -0800 (PST) Subject: Re: [RFC PATCH 04/15] lib/scatterlist: Add flag for indicating P2PDMA segments in an SGL To: Christoph Hellwig , Logan Gunthorpe Cc: Matthew Wilcox , Jason Gunthorpe , linux-pci@vger.kernel.org, Daniel Vetter , Ira Weiny , linux-kernel@vger.kernel.org, linux-nvme@lists.infradead.org, Stephen Bates , linux-block@vger.kernel.org, linux-mm@kvack.org, iommu@lists.linux-foundation.org, =?UTF-8?Q?Christian_K=c3=b6nig?= , John Hubbard , Dan Williams References: <20201106170036.18713-1-logang@deltatee.com> <20201106170036.18713-5-logang@deltatee.com> <20201109091258.GB28918@lst.de> From: Robin Murphy Message-ID: <491c26de-bda0-3266-a67d-ee2580559a54@arm.com> Date: Mon, 9 Nov 2020 14:02:21 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; rv:78.0) Gecko/20100101 Thunderbird/78.4.1 MIME-Version: 1.0 In-Reply-To: <20201109091258.GB28918@lst.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2020-11-09 09:12, Christoph Hellwig wrote: > On Fri, Nov 06, 2020 at 10:00:25AM -0700, Logan Gunthorpe wrote: >> We make use of the top bit of the dma_length to indicate a P2PDMA >> segment. > > I don't think "we" can. There is nothing limiting the size of a SGL > segment. Right, the story behind ab2cbeb0ed30 ("iommu/dma: Handle SG length overflow better") comes immediately to mind, for one. If all the P2P users can agree to be in on the game then by all means implement this in the P2P code, but I don't think it belongs in the generic top-level scatterlist API. Robin.