From: Yunsheng Lin <linyunsheng@huawei.com>
To: Paolo Abeni <pabeni@redhat.com>, <davem@davemloft.net>,
<kuba@kernel.org>
Cc: <netdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
Lorenzo Bianconi <lorenzo@kernel.org>,
Alexander Duyck <alexander.duyck@gmail.com>,
Liang Chen <liangchen.linux@gmail.com>,
Alexander Lobakin <aleksander.lobakin@intel.com>,
Jesper Dangaard Brouer <hawk@kernel.org>,
Ilias Apalodimas <ilias.apalodimas@linaro.org>,
Eric Dumazet <edumazet@google.com>
Subject: Re: [PATCH net-next v8 2/6] page_pool: unify frag_count handling in page_pool_is_last_frag()
Date: Mon, 18 Sep 2023 19:15:15 +0800 [thread overview]
Message-ID: <e7f2d1b1-49fe-cf8d-eb96-c5ddf52903a0@huawei.com> (raw)
In-Reply-To: <9e53ca46be34f3c393861b7a645bb25f0b03f1d2.camel@redhat.com>
On 2023/9/14 23:17, Paolo Abeni wrote:
>> --- a/net/core/page_pool.c
>> +++ b/net/core/page_pool.c
>> @@ -376,6 +376,14 @@ static void page_pool_set_pp_info(struct page_pool *pool,
>> {
>> page->pp = pool;
>> page->pp_magic |= PP_SIGNATURE;
>> +
>> + /* Ensuring all pages have been split into one big frag initially:
>> + * page_pool_set_pp_info() is only called once for every page when it
>> + * is allocated from the page allocator and page_pool_fragment_page()
>> + * is dirtying the same cache line as the page->pp_magic above, so
>> + * the overhead is negligible.
>> + */
>> + page_pool_fragment_page(page, 1);
>> if (pool->p.init_callback)
>> pool->p.init_callback(page, pool->p.init_arg);
>> }
>
> I think it would be nice backing the above claim with some benchmarks.
> (possibly even just a micro-benchmark around the relevant APIs)
> and include such info into the changelog message.
Sure, will adjust Jesper's below micro-benchmark to test it:
https://github.com/netoptimizer/prototype-kernel/blob/master/kernel/lib/bench_page_pool_simple.c
Please let me know if there is other better idea to do the
micro-benchmark in your mind, thanks.
>
> Cheers,
>
> Paolo
>
> .
>
next prev parent reply other threads:[~2023-09-18 12:30 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-12 8:31 [PATCH net-next v8 0/6] introduce page_pool_alloc() related API Yunsheng Lin
2023-09-12 8:31 ` [PATCH net-next v8 1/6] page_pool: frag API support for 32-bit arch with 64-bit DMA Yunsheng Lin
2023-09-15 8:28 ` Jesper Dangaard Brouer
2023-09-20 8:59 ` Yunsheng Lin
2023-09-25 10:37 ` Ilias Apalodimas
2023-09-25 11:31 ` Yunsheng Lin
2023-09-12 8:31 ` [PATCH net-next v8 2/6] page_pool: unify frag_count handling in page_pool_is_last_frag() Yunsheng Lin
2023-09-14 15:17 ` Paolo Abeni
2023-09-18 11:15 ` Yunsheng Lin [this message]
2023-09-19 12:47 ` Yunsheng Lin
2023-09-12 8:31 ` [PATCH net-next v8 3/6] page_pool: remove PP_FLAG_PAGE_FRAG Yunsheng Lin
2023-09-12 8:31 ` [PATCH net-next v8 4/6] page_pool: introduce page_pool[_cache]_alloc() API Yunsheng Lin
2023-09-12 8:31 ` [PATCH net-next v8 5/6] page_pool: update document about frag API Yunsheng Lin
2023-09-12 8:31 ` [PATCH net-next v8 6/6] net: veth: use newly added page pool API for veth with xdp Yunsheng Lin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e7f2d1b1-49fe-cf8d-eb96-c5ddf52903a0@huawei.com \
--to=linyunsheng@huawei.com \
--cc=aleksander.lobakin@intel.com \
--cc=alexander.duyck@gmail.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=hawk@kernel.org \
--cc=ilias.apalodimas@linaro.org \
--cc=kuba@kernel.org \
--cc=liangchen.linux@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lorenzo@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®