Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp4424439pxu; Wed, 9 Dec 2020 17:25:32 -0800 (PST) X-Google-Smtp-Source: ABdhPJwxbR2jcncq+ecPjrAzNxB2288+Wl2s8PecAOhK54G5DYSZIypzPRAryH2rqYTFVz4purP7 X-Received: by 2002:a17:906:8354:: with SMTP id b20mr4336728ejy.397.1607563532156; Wed, 09 Dec 2020 17:25:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607563532; cv=none; d=google.com; s=arc-20160816; b=UUiagePsMgByPpyBdART0SLUGqWAkvsTiieDHAGBEVthoyEDS3JohwkYOiwE1+TbjW mgjiaTBR0yRn2G5glRvnHF/jPj4GL5wX03gZ4pyMOVW0p/VNkkzG4NuepR3oy3kOF5mu sOIYJWhwMn4fj1KZnV2CRONUIsuOK522pWv6alAdaY3AKBthjWyBkzWdvLFEs7v+WVlB 2hcIIlQL+f0UzDM158igu+5T4kG0G1v4bhghPgs2HGIKIy/NZ3klGfdyM0haHZ7jd/BC pRcNv3rz4uokXjnq/lXYcLU7PqNXmKYmYUps0Gdo06hO9C2WuoeWmwtj+POKVxw58KtF wQbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=1RvR2QPPiPyu+6Jv4jWyGokFplcRpCGGMGXA++YNtNY=; b=wcaMVOvCVepWZNTWhov28ZOj7SbCj7fILDXsZeFtIJI+mjFYWlMkTS3b70lXmB5Kzp B+bTHQAt8/DTmJb6TuCUxNOtU75HCGJXwhykma519lE4vWh0ar6f31AMXmV7Lfm72nn5 pBqSb4uCzlN1NiDUmvSt1IeriIwsAXUcY9dIZM4SEkqA+Ly/esYmf1bZ6o3mFfHShlKO 983h4xPC2Wf5Iti5r7kVl/x5kiunX+3Q1Y+26ceuRF5w9HKdu0AeDNYbrkqomvUxazAq n0no2gwmRbkrw+RL7T/muxvh2vKvk7O4JOT36/soIq2bgiaSX5EybUdZlFkrt/D7DccZ Qcuw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=hLlhVWiZ; 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=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u2si1602421ejo.423.2020.12.09.17.25.09; Wed, 09 Dec 2020 17:25:32 -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; dkim=pass header.i=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=hLlhVWiZ; 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=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731648AbgLJBXI (ORCPT + 99 others); Wed, 9 Dec 2020 20:23:08 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52746 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726519AbgLJBWw (ORCPT ); Wed, 9 Dec 2020 20:22:52 -0500 Received: from mail-ej1-x643.google.com (mail-ej1-x643.google.com [IPv6:2a00:1450:4864:20::643]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0673BC0613CF for ; Wed, 9 Dec 2020 17:22:12 -0800 (PST) Received: by mail-ej1-x643.google.com with SMTP id d17so4979079ejy.9 for ; Wed, 09 Dec 2020 17:22:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=1RvR2QPPiPyu+6Jv4jWyGokFplcRpCGGMGXA++YNtNY=; b=hLlhVWiZHkRszGDN0QvNv3k5cDa7NBwZGJhnG+u6snpj/DqWm97HsIYwTJsnjvT1vM lqLgTToh0Yl0+7UdLKf0OJc3R9/7th3uREf05mUHcpVQ/dGI9wmQMaG7b8tJQr7VzCU6 n7TG/Q+F4n+X2SsRVoAlKSheAcmCFeTxkrOIXFDWuvtQdZWTf7ANt2zcUkpZxBGmjkXa wO9mFNtjhCJhXDZ9MpC+XSEcdnWG+j3g1YG8jxS+Jo15C0UFtAA2umrf/tujow1hZuMc f9OtadNZ60HDDPjDjL1evB3x/w7Ymxm2RXqqrVLk5LCk3Du/muGWXQQZ7gJkcfcPQvRI RABQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=1RvR2QPPiPyu+6Jv4jWyGokFplcRpCGGMGXA++YNtNY=; b=dle4PV4NE4ep52O6KJl1QHGJpkDBZEmxfeK10BVaGyxPrquvc8Qx+y7YuWq3KzUlp8 iL+NX53fGWlBi8X6YGyaAaBBNp9PJVPDWQGaAMcBJfwut4Qm8ZUWXSLHl9QaL8e6thYp +bwm233eSDZhRlseBNKe+96ka07uy+q0mhi3y5kHoV+CaA3AotkDWzk48D2NyfBPGzoI b/dVzaFaGtdp+aG5qwbQfx5BNMOrbTYaBCTzSmxeUaGOsaspmv8EGoMXKwghJwbiYizF 26rGPknO9QfPD/LDOVI28Qb2NEqw+dnRexHSZJ/vvdhFK+qa2YynzF+Q8UNhBTd+KPxV wrjw== X-Gm-Message-State: AOAM530gJnB/RtmiXdTtc0zmLqO+png/Du2pJT294SAquZNB+ixDTjS3 u65q2jdkeB6FXkNBtgaYHrlRasN/bHdSWVwGGU2P2Q== X-Received: by 2002:a17:906:a29a:: with SMTP id i26mr4331316ejz.45.1607563330752; Wed, 09 Dec 2020 17:22:10 -0800 (PST) MIME-Version: 1.0 References: <20201106170036.18713-1-logang@deltatee.com> <20201106170036.18713-5-logang@deltatee.com> <20201109091258.GB28918@lst.de> <4e336c7e-207b-31fa-806e-c4e8028524a5@deltatee.com> In-Reply-To: <4e336c7e-207b-31fa-806e-c4e8028524a5@deltatee.com> From: Dan Williams Date: Wed, 9 Dec 2020 17:22:09 -0800 Message-ID: Subject: Re: [RFC PATCH 04/15] lib/scatterlist: Add flag for indicating P2PDMA segments in an SGL To: Logan Gunthorpe Cc: Christoph Hellwig , Linux Kernel Mailing List , linux-nvme@lists.infradead.org, linux-block@vger.kernel.org, Linux PCI , Linux MM , "open list:DMA MAPPING HELPERS" , Stephen Bates , Jason Gunthorpe , =?UTF-8?Q?Christian_K=C3=B6nig?= , Ira Weiny , John Hubbard , Don Dutile , Matthew Wilcox , Daniel Vetter Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Nov 9, 2020 at 8:47 AM Logan Gunthorpe wrote: > > > > On 2020-11-09 2:12 a.m., 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. > > Yes, I expected this would be the unacceptable part. Any alternative ideas? Why is the SG_P2PDMA_FLAG needed as compared to checking the SGL segment-pages for is_pci_p2pdma_page()?