From: Alexander Lobakin <aleksander.lobakin@intel.com>
To: Yunsheng Lin <linyunsheng@huawei.com>
Cc: "Alexei Starovoitov" <ast@kernel.org>,
"Daniel Borkmann" <daniel@iogearbox.net>,
"Andrii Nakryiko" <andrii@kernel.org>,
"Martin KaFai Lau" <martin.lau@linux.dev>,
"Maciej Fijalkowski" <maciej.fijalkowski@intel.com>,
"Larysa Zaremba" <larysa.zaremba@intel.com>,
"Toke Høiland-Jørgensen" <toke@redhat.com>,
"Song Liu" <song@kernel.org>,
"Jesper Dangaard Brouer" <hawk@kernel.org>,
"Jakub Kicinski" <kuba@kernel.org>,
bpf@vger.kernel.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH bpf-next v1 1/2] xdp: recycle Page Pool backed skbs built from XDP frames
Date: Thu, 9 Mar 2023 17:27:52 +0100 [thread overview]
Message-ID: <fba8f996-003f-1fb1-d5f0-09ef6fc24f51@intel.com> (raw)
In-Reply-To: <1cea3621-8f5d-ba95-1b0b-e245ce770abf@huawei.com>
From: Yunsheng Lin <linyunsheng@huawei.com>
Date: Wed, 8 Mar 2023 14:27:13 +0800
> On 2023/3/8 2:14, Alexander Lobakin wrote:
>> From: Yunsheng Lin <linyunsheng@huawei.com>
>> Date: Tue, 7 Mar 2023 10:50:34 +0800
[...]
>> You mean false-positives in both directions? Because if ->pp_recycle is
>> set, the stack can still free non-PP pages. In the opposite case, I mean
>> when ->pp_recycle is false and an skb page belongs to a page_pool, yes,
>> there'll be issues.
>
> That may depends on what is a PP pages and what is a non-PP pages, it seems
> hard to answer now.
>
> For a skb with ->pp_recycle being true and its frag page with page->pp_magic
> being PP_SIGNATURE, when calling skb_clone()/pskb_expand_head() or
> skb_try_coalesce(), we may call __skb_frag_ref() for the frag page, which
> mean a page with page->pp_magic being PP_SIGNATURE can be both PP page
> and non-PP page at the same time. So it is important to set the ->pp_recycle
> correctly, and it seems hard to get that right from past experience,that's
> why a per page marker is suggested.
Oh well, I didn't know that :s
Thanks for the expl.
[...]
Olek
next prev parent reply other threads:[~2023-03-09 16:39 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-01 16:03 [PATCH bpf-next v1 0/2] xdp: recycle Page Pool backed skbs built from XDP frames Alexander Lobakin
2023-03-01 16:03 ` [PATCH bpf-next v1 1/2] " Alexander Lobakin
2023-03-01 19:08 ` kernel test robot
2023-03-01 19:18 ` kernel test robot
2023-03-02 2:30 ` Yunsheng Lin
2023-03-03 10:31 ` Jesper Dangaard Brouer
2023-03-03 11:22 ` Alexander Lobakin
2023-03-03 12:44 ` Yunsheng Lin
2023-03-03 13:26 ` Alexander Lobakin
2023-03-06 1:09 ` Yunsheng Lin
2023-03-06 11:58 ` Alexander Lobakin
2023-03-07 2:50 ` Yunsheng Lin
2023-03-07 18:14 ` Alexander Lobakin
2023-03-08 6:27 ` Yunsheng Lin
2023-03-09 16:27 ` Alexander Lobakin [this message]
2023-03-01 16:03 ` [PATCH bpf-next v1 2/2] xdp: remove unused {__,}xdp_release_frame() Alexander Lobakin
2023-03-03 10:39 ` [PATCH bpf-next v1 0/2] xdp: recycle Page Pool backed skbs built from XDP frames Jesper Dangaard Brouer
2023-03-03 11:31 ` Alexander Lobakin
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=fba8f996-003f-1fb1-d5f0-09ef6fc24f51@intel.com \
--to=aleksander.lobakin@intel.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=hawk@kernel.org \
--cc=kuba@kernel.org \
--cc=larysa.zaremba@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linyunsheng@huawei.com \
--cc=maciej.fijalkowski@intel.com \
--cc=martin.lau@linux.dev \
--cc=netdev@vger.kernel.org \
--cc=song@kernel.org \
--cc=toke@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