From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3A93CC47082 for ; Mon, 7 Jun 2021 04:36:08 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id BD3856121E for ; Mon, 7 Jun 2021 04:36:07 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BD3856121E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id DE2F36B006C; Mon, 7 Jun 2021 00:36:06 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id D6CE16B006E; Mon, 7 Jun 2021 00:36:06 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B98496B0070; Mon, 7 Jun 2021 00:36:06 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0221.hostedemail.com [216.40.44.221]) by kanga.kvack.org (Postfix) with ESMTP id 83EDD6B006C for ; Mon, 7 Jun 2021 00:36:06 -0400 (EDT) Received: from smtpin34.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 0C779BBDE for ; Mon, 7 Jun 2021 04:36:06 +0000 (UTC) X-FDA: 78225665532.34.B42A357 Received: from mail-wm1-f43.google.com (mail-wm1-f43.google.com [209.85.128.43]) by imf16.hostedemail.com (Postfix) with ESMTP id D16D880192FE for ; Mon, 7 Jun 2021 04:36:03 +0000 (UTC) Received: by mail-wm1-f43.google.com with SMTP id f16-20020a05600c1550b02901b00c1be4abso1300977wmg.2 for ; Sun, 06 Jun 2021 21:36:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=x9T5pBSugoXfUpXUjZ5j/66j/njzDcDs53OE8tdEeqg=; b=dsbm6ZaentwbYXK1/AX02BUJNveYH454Bc8Hxkr7AuBiVrsN0BwXTGFy2clCJ3Jnaa GVTrl601GfVuELPA/rENvBHO99Cy1m2KaZ8VVysBjujsFon1u+rGpWWuuR4VVwcognXg jUSks59gR0/wnezCcElQ23S/7PPhUz0TUqPnzHreb7oT4TLB53lh5OGwuENgESqfyNk9 5CU7WXl0wn1KyvZr8sZisHG+5yxfr5M517OOBXZfBORui+ZBnTIaPD3UV1Q6xzY+ZuLv WuD/vIzz5AylzaeEZmgBpvTFNQi4ZGVNTBgD+VEAaB41Pi3aX25tA3hGs7PgBHFLI4rg kL7A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=x9T5pBSugoXfUpXUjZ5j/66j/njzDcDs53OE8tdEeqg=; b=Tkxg2aZO1pGuD7d2NBk810b+LLHYxq0cJujHywkwzdmiUTdSsEVPp+qq2RA2MiToff RusVO8pw7jqi6AwALJQ8hkAKWatH0C/pIvYVl+ucxB2G840IGV2mqUaL+WkJ+Y3Fk1bx wrCREEkneghT90wNtmaswghMZlh1UXDfk2aN3KdHhdsqKMZuYDuYDB5PMoUfY10UAxOB 5gHkIvf+DZXr3ZRqEfy8muIqax8EuKAGAHfTQtL7Iw36rqsDRcX3jpmyTsjgk3z8FP1E r7kkkCULIbrrvfmA7rEYntpJmqu/nEfAqOKXALBBWG5nxb3BMtXXkO/STxCjSQADteoL 9wyg== X-Gm-Message-State: AOAM532wU9C8ka2fhiJ9L/y/pQfiMgP6EbRyJlVIU/TehrRnqupleKyS fr8Ws7iXA4WzOxvMwJhCdM08Wg== X-Google-Smtp-Source: ABdhPJznwN3/xCvknr5BYPh40gyjYOCnx/fab+dzKNlPRZ8IkCnKQnH8Vp5zlcA8IQx74ttZF0sDKw== X-Received: by 2002:a1c:a3c3:: with SMTP id m186mr15287383wme.154.1623040564231; Sun, 06 Jun 2021 21:36:04 -0700 (PDT) Received: from Iliass-MBP (ppp-94-66-57-185.home.otenet.gr. [94.66.57.185]) by smtp.gmail.com with ESMTPSA id o17sm13829115wrp.47.2021.06.06.21.36.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 06 Jun 2021 21:36:03 -0700 (PDT) Date: Mon, 7 Jun 2021 07:35:58 +0300 From: Ilias Apalodimas To: David Ahern Cc: Yunsheng Lin , Matteo Croce , netdev@vger.kernel.org, linux-mm@kvack.org, Ayush Sawal , Vinay Kumar Yadav , Rohit Maheshwari , "David S. Miller" , Jakub Kicinski , Thomas Petazzoni , Marcin Wojtas , Russell King , Mirko Lindner , Stephen Hemminger , Tariq Toukan , Jesper Dangaard Brouer , Alexei Starovoitov , Daniel Borkmann , John Fastabend , Boris Pismenny , Arnd Bergmann , Andrew Morton , "Peter Zijlstra (Intel)" , Vlastimil Babka , Yu Zhao , Will Deacon , Fenghua Yu , Roman Gushchin , Hugh Dickins , Peter Xu , Jason Gunthorpe , Jonathan Lemon , Alexander Lobakin , Cong Wang , wenxu , Kevin Hao , Jakub Sitnicki , Marco Elver , Willem de Bruijn , Miaohe Lin , Guillaume Nault , linux-kernel@vger.kernel.org, linux-rdma@vger.kernel.org, bpf@vger.kernel.org, Matthew Wilcox , Eric Dumazet , Lorenzo Bianconi , Saeed Mahameed , Andrew Lunn , Paolo Abeni , Sven Auhagen Subject: Re: [PATCH net-next v6 3/5] page_pool: Allow drivers to hint on SKB recycling Message-ID: References: <20210521161527.34607-1-mcroce@linux.microsoft.com> <20210521161527.34607-4-mcroce@linux.microsoft.com> <722e5567-d8ee-228c-978e-9d5966257bb1@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <722e5567-d8ee-228c-978e-9d5966257bb1@gmail.com> X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: D16D880192FE Authentication-Results: imf16.hostedemail.com; dkim=pass header.d=linaro.org header.s=google header.b=dsbm6Zae; dmarc=pass (policy=none) header.from=linaro.org; spf=pass (imf16.hostedemail.com: domain of ilias.apalodimas@linaro.org designates 209.85.128.43 as permitted sender) smtp.mailfrom=ilias.apalodimas@linaro.org X-Stat-Signature: 5curj3wrq4j89sddadmnhyk89wrz5d89 X-HE-Tag: 1623040563-201286 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Hi David, On Sat, Jun 05, 2021 at 10:06:30AM -0600, David Ahern wrote: > On 6/4/21 2:42 AM, Ilias Apalodimas wrote: > > [...] > >>> + /* Driver set this to memory recycling info. Reset it on recycle. > >>> + * This will *not* work for NIC using a split-page memory model. > >>> + * The page will be returned to the pool here regardless of the > >>> + * 'flipped' fragment being in use or not. > >>> + */ > >> > >> I am not sure I understand how does the last part of comment related > >> to the code below, as there is no driver using split-page memory model > >> will reach here because those driver will not call skb_mark_for_recycle(), > >> right? > >> > > > > Yes the comment is there to prohibit people (mlx5 only actually) to add the > > recycling bit on their driver. Because if they do it will *probably* work > > but they might get random corrupted packets which will be hard to debug. > > > > What's the complexity for getting it to work with split page model? > Since 1500 is the default MTU, requiring a page per packet means a lot > of wasted memory. It boils down to 'can we re-use the page or is someone using it'. Yunsheng sent a patch in earlier series that implements this with ref counters. As Matteo mentions we can also add another page pool type. In theory none of those sound too hard, but we'll have to code it and see. /Ilias