Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp37166248rwd; Tue, 11 Jul 2023 10:14:56 -0700 (PDT) X-Google-Smtp-Source: APBJJlGT9uO/X6U5TjtOa0bQNLOjOjbChCVwnWu6JXXsL+MG+3+gUafi+DwKA4aak3p+50BmDADt X-Received: by 2002:a05:6a00:2e91:b0:67f:48a2:5d9f with SMTP id fd17-20020a056a002e9100b0067f48a25d9fmr16752185pfb.11.1689095695921; Tue, 11 Jul 2023 10:14:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689095695; cv=none; d=google.com; s=arc-20160816; b=sE9HRHN8izoPzmh+BsTzFQmE5mgswTVMb95BL4dJIJ+IE8hliNZ2qE9idPdVGO66iI kv7ixUKlBtvSC2FxoX2PArWOmmvbqgJOAb780+Yy152qmkohFwE+25YETJHn8h4GoSYA S2S0LFwyPlvxs0znWAbbjuvpiO3Cr0r9XT3rDgfucEZu2AsJlRDbw8i/2xI9EfvPlOtV No5Twc9Cte5hwdAlPE+sZT9mRiUsFjuF7uqg7KjiTGtAJ2U9/HDuvLDZ4iwPkK7qGFMb yVHnfWaiZYLVl3sIXnKJVgvE3Vfhx3oWuKIniAPdgmdKlM26psxS6jtVc9JEpbsXu4q6 QUsA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=shCkNkuISpAjo0wvso+e9CaqC7Tu4suQbB4adf5Gg28=; fh=rsdydDGtBchNC0DVKTevRVJEf8MpZyw1FwKHkDV9iSU=; b=uKossJLxCb4MvfDq4QbFhrRhcj4E0OXjQSH8W/67oCdeju0XNunK4GHdKGGOSRoHnl sYIxybZYkQDxNPmBDN+YvVQ8fmezhok5r4UDcmRM5clOYRu7wLzlg1Gilg3UtRS91Ujr 4xoeU5FIQBE1PTC1G2HkqznIsNYWpt+NQzWAPE9a4JswIM+fXY9CFT81jJUBk+sFhSuI x4ga2f1OAQLddvugxWuB0AIvTNS4lZH3TVTMs9BZ/bbIZzdjTikbmznXBu1aKu3xqJRu yBX4aXPL/sKBVzf2qLmONVK0UZW9/7vVRwwYPAOK+Xyk6aK1pfgShoXQqVkMCVYs2XS+ j9cg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20221208 header.b=YbbA06X7; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ay22-20020a056a00301600b00682686181c2si1757418pfb.65.2023.07.11.10.14.48; Tue, 11 Jul 2023 10:14:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20221208 header.b=YbbA06X7; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231965AbjGKRGx (ORCPT + 60 others); Tue, 11 Jul 2023 13:06:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56362 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231858AbjGKRGn (ORCPT ); Tue, 11 Jul 2023 13:06:43 -0400 Received: from mail-ua1-x92e.google.com (mail-ua1-x92e.google.com [IPv6:2607:f8b0:4864:20::92e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 41C02A1 for ; Tue, 11 Jul 2023 10:06:41 -0700 (PDT) Received: by mail-ua1-x92e.google.com with SMTP id a1e0cc1a2514c-79492b8f4bbso1984257241.2 for ; Tue, 11 Jul 2023 10:06:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1689095200; x=1691687200; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=shCkNkuISpAjo0wvso+e9CaqC7Tu4suQbB4adf5Gg28=; b=YbbA06X7m0lTKmRD/qrCSPe46OZZXtyoWwxn94R62ChwLlyI4NVTjYPGfo3UBlMajj k6fH+Dkqu85y17natO+NnHXFOP3k1pkffPwP4MSk9drst1XGd/0ospwiBvP1V2Cjsp4w kqT2TO4HE+d7uUCguJ2ovnNME5Ya6Nu2B2evKvl7BcEp1EWaRJzM466r1a7+Ac3BeOwj E0omfNfD0agGLMLbLYeHEb+3aukvUGiEi+9dtdNeOxvp9oOSGBCChkpDj4aW9pT8bT/k Sw2KCbmOc1yGOSVjG88PEgzwwiXTrz+H1cyxyuHyDsyfTWNm1JTQjWbMvuxQVExeMj+M gipQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689095200; x=1691687200; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=shCkNkuISpAjo0wvso+e9CaqC7Tu4suQbB4adf5Gg28=; b=PFKfn8fANcc8OKLLyQKAgLxqojoTJfClrsT9ihWh46d8RqF1bdsBLEW+B0y9Wj/w/m F4tHEQiPogQl/9RMElOz4uJoMJDrRAXVi0cNlwD6dxSoAOAhzL80hCMr0tvtZXfITm5F /Wu6UOCmEE/owf4zNF/NKoUO+6C/knH2GQzkk38DFAujV8+gQBAzbrw1wvFMoGiff4c2 OL77EjaZXUlXgQuzHW9E4QBktvT+rmgt9znMOuWXKVfktEk7NiEWA4/eLHDhogV9mYKR EgYtWTkCMPbVMBLtVSaOEiuPQOsFnG1OoQieOyrO6rk8eFhT/dX7h1rmqIMNAsfQx7xg UPGA== X-Gm-Message-State: ABy/qLaJ7OTonkxmxIF3ecbOKk7vzm3s9/UtYJXhqmVoDU+ka4pqEtti oDMm1RIJvJIubd0vzu0nNSEygIckPIx9iG3RkovuKQ== X-Received: by 2002:a67:e34b:0:b0:444:c49c:a95d with SMTP id s11-20020a67e34b000000b00444c49ca95dmr7222548vsm.7.1689095200160; Tue, 11 Jul 2023 10:06:40 -0700 (PDT) MIME-Version: 1.0 References: <5e0ac5bb-2cfa-3b58-9503-1e161f3c9bd5@kernel.org> <20230711042708.GA18658@lst.de> <20230710215906.49514550@kernel.org> <20230711050445.GA19323@lst.de> <20230711090047.37d7fe06@kernel.org> <04187826-8dad-d17b-2469-2837bafd3cd5@kernel.org> <20230711093224.1bf30ed5@kernel.org> In-Reply-To: <20230711093224.1bf30ed5@kernel.org> From: Mina Almasry Date: Tue, 11 Jul 2023 10:06:28 -0700 Message-ID: Subject: Re: Memory providers multiplexing (Was: [PATCH net-next v4 4/5] page_pool: remove PP_FLAG_PAGE_FRAG flag) To: Jakub Kicinski Cc: David Ahern , Jason Gunthorpe , Christoph Hellwig , John Hubbard , Dan Williams , Jesper Dangaard Brouer , brouer@redhat.com, Alexander Duyck , Yunsheng Lin , davem@davemloft.net, pabeni@redhat.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Lorenzo Bianconi , Yisen Zhuang , Salil Mehta , Eric Dumazet , Sunil Goutham , Geetha sowjanya , Subbaraya Sundeep , hariprasad , Saeed Mahameed , Leon Romanovsky , Felix Fietkau , Ryder Lee , Shayne Chen , Sean Wang , Kalle Valo , Matthias Brugger , AngeloGioacchino Del Regno , Jesper Dangaard Brouer , Ilias Apalodimas , linux-rdma@vger.kernel.org, linux-wireless@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, Jonathan Lemon Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On Tue, Jul 11, 2023 at 9:32=E2=80=AFAM Jakub Kicinski wr= ote: > > On Tue, 11 Jul 2023 10:20:58 -0600 David Ahern wrote: > > On 7/11/23 10:00 AM, Jakub Kicinski wrote: > > >> RDMA works with the AMD and Intel intree drivers using DMABUF withou= t > > >> requiring struct pages using the DRM hacky scatterlist approach. > > > I see, thanks. We need pages primarily for refcounting. Avoiding all > > > the infamous problems with memory pins. Oh well. > > > > io_uring for example already manages the page pinning. An skb flag was > > added for ZC Tx API to avoid refcounting in the core networking layer. > > Right, we can refcount in similar fashion. Still tracking explicitly > when buffers are handed over to the NIC. > > > Any reason not to allow an alternative representation for skb frags tha= n > > struct page? > > I don't think there's a hard technical reason. We can make it work. I also think we can switch the representation for skb frags to something else. However - please do correct me if I'm wrong - I don't think that is sufficient for device memory TCP. My understanding is that we also need to modify any NIC drivers that want to use device memory TCP to understand a new memory type, and the page pool as well if that's involved. I think in particular modifying the memory type in all the NIC drivers that want to do device memory TCP is difficult. Do you think this is feasible? -- Thanks, Mina