From: "Toke Høiland-Jørgensen" <toke@redhat.com>
To: Jesper Dangaard Brouer <brouer@redhat.com>,
Ilias Apalodimas <ilias.apalodimas@linaro.org>,
netdev@vger.kernel.org
Cc: bpf@vger.kernel.org, Lorenzo Bianconi <lorenzo@kernel.org>,
mtahhan@redhat.com, mcroce@microsoft.com
Subject: Re: [PATCH net-next] xdp: improve page_pool xdp_return performance
Date: Thu, 22 Sep 2022 00:16:02 +0200 [thread overview]
Message-ID: <87v8pgv0f1.fsf@toke.dk> (raw)
In-Reply-To: <166377993287.1737053.10258297257583703949.stgit@firesoul>
Jesper Dangaard Brouer <brouer@redhat.com> writes:
> During LPC2022 I meetup with my page_pool co-maintainer Ilias. When
> discussing page_pool code we realised/remembered certain optimizations
> had not been fully utilised.
>
> Since commit c07aea3ef4d4 ("mm: add a signature in struct page") struct
> page have a direct pointer to the page_pool object this page was
> allocated from.
>
> Thus, with this info it is possible to skip the rhashtable_lookup to
> find the page_pool object in __xdp_return().
>
> The rcu_read_lock can be removed as it was tied to xdp_mem_allocator.
> The page_pool object is still safe to access as it tracks inflight pages
> and (potentially) schedules final release from a work queue.
>
> Created a micro benchmark of XDP redirecting from mlx5 into veth with
> XDP_DROP bpf-prog on the peer veth device. This increased performance
> 6.5% from approx 8.45Mpps to 9Mpps corresponding to using 7 nanosec
> (27 cycles at 3.8GHz) less per packet.
>
> Suggested-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
> Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
Nice! The two of you should get together in person more often ;)
Acked-by: Toke Høiland-Jørgensen <toke@redhat.com>
next prev parent reply other threads:[~2022-09-21 22:16 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-21 17:05 [PATCH net-next] xdp: improve page_pool xdp_return performance Jesper Dangaard Brouer
2022-09-21 22:16 ` Toke Høiland-Jørgensen [this message]
2022-09-22 9:56 ` Ilias Apalodimas
2022-09-26 18:40 ` patchwork-bot+netdevbpf
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=87v8pgv0f1.fsf@toke.dk \
--to=toke@redhat.com \
--cc=bpf@vger.kernel.org \
--cc=brouer@redhat.com \
--cc=ilias.apalodimas@linaro.org \
--cc=lorenzo@kernel.org \
--cc=mcroce@microsoft.com \
--cc=mtahhan@redhat.com \
--cc=netdev@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).