From: Ilias Apalodimas <ilias.apalodimas@linaro•org>
To: Yunsheng Lin <linyunsheng@huawei•com>
Cc: Matteo Croce <mcroce@linux•microsoft.com>,
Marcin Wojtas <mw@semihalf•com>,
"Russell King (Oracle)" <linux@armlinux•org.uk>,
Sven Auhagen <sven.auhagen@voleatech•de>,
David Miller <davem@davemloft•net>,
Jakub Kicinski <kuba@kernel•org>,
linuxarm@openeuler•org, yisen.zhuang@huawei•com,
salil.mehta@huawei•com,
Thomas Petazzoni <thomas.petazzoni@bootlin•com>,
Jesper Dangaard Brouer <hawk@kernel•org>,
Alexei Starovoitov <ast@kernel•org>,
Daniel Borkmann <daniel@iogearbox•net>,
John Fastabend <john.fastabend@gmail•com>,
Andrew Morton <akpm@linux-foundation•org>,
Peter Zijlstra <peterz@infradead•org>,
Will Deacon <will@kernel•org>,
Matthew Wilcox <willy@infradead•org>,
Vlastimil Babka <vbabka@suse•cz>,
Fenghua Yu <fenghua.yu@intel•com>, Roman Gushchin <guro@fb•com>,
Peter Xu <peterx@redhat•com>,
feng.tang@intel•com, Jason Gunthorpe <jgg@ziepe•ca>,
Matteo Croce <mcroce@microsoft•com>,
Hugh Dickins <hughd@google•com>,
Jonathan Lemon <jonathan.lemon@gmail•com>,
Alexander Lobakin <alobakin@pm•me>,
Willem de Bruijn <willemb@google•com>, wenxu <wenxu@ucloud•cn>,
Cong Wang <cong.wang@bytedance•com>,
Kevin Hao <haokexin@gmail•com>,
Aleksandr Nogikh <nogikh@google•com>,
Marco Elver <elver@google•com>,
netdev@vger•kernel.org,
Linux Kernel Mailing List <linux-kernel@vger•kernel.org>,
bpf@vger•kernel.org
Subject: Re: [PATCH net-next RFC 0/2] add elevated refcnt support for page pool
Date: Fri, 9 Jul 2021 09:42:30 +0300 [thread overview]
Message-ID: <YOfv1vHcZPBvyfaN@enceladus> (raw)
In-Reply-To: <14a92860-67cc-b2ac-efba-dd482f03204b@huawei.com>
On Fri, Jul 09, 2021 at 02:40:02PM +0800, Yunsheng Lin wrote:
> On 2021/7/9 12:15, Matteo Croce wrote:
> > On Wed, Jul 7, 2021 at 6:50 PM Marcin Wojtas <mw@semihalf•com> wrote:
> >>
> >> Hi,
> >>
> >>
> >> ??r., 7 lip 2021 o 01:20 Matteo Croce <mcroce@linux•microsoft.com> napisa??(a):
> >>>
> >>> On Tue, Jul 6, 2021 at 5:51 PM Russell King (Oracle)
> >>> <linux@armlinux•org.uk> wrote:
> >>>>
> >>>> On Fri, Jul 02, 2021 at 03:39:47PM +0200, Matteo Croce wrote:
> >>>>> On Wed, 30 Jun 2021 17:17:54 +0800
> >>>>> Yunsheng Lin <linyunsheng@huawei•com> wrote:
> >>>>>
> >>>>>> This patchset adds elevated refcnt support for page pool
> >>>>>> and enable skb's page frag recycling based on page pool
> >>>>>> in hns3 drvier.
> >>>>>>
> >>>>>> Yunsheng Lin (2):
> >>>>>> page_pool: add page recycling support based on elevated refcnt
> >>>>>> net: hns3: support skb's frag page recycling based on page pool
> >>>>>>
> >>>>>> drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 79 +++++++-
> >>>>>> drivers/net/ethernet/hisilicon/hns3/hns3_enet.h | 3 +
> >>>>>> drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c | 1 +
> >>>>>> drivers/net/ethernet/marvell/mvneta.c | 6 +-
> >>>>>> drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c | 2 +-
> >>>>>> include/linux/mm_types.h | 2 +-
> >>>>>> include/linux/skbuff.h | 4 +-
> >>>>>> include/net/page_pool.h | 30 ++-
> >>>>>> net/core/page_pool.c | 215
> >>>>>> +++++++++++++++++---- 9 files changed, 285 insertions(+), 57
> >>>>>> deletions(-)
> >>>>>>
> >>>>>
> >>>>> Interesting!
> >>>>> Unfortunately I'll not have access to my macchiatobin anytime soon, can
> >>>>> someone test the impact, if any, on mvpp2?
> >>>>
> >>>> I'll try to test. Please let me know what kind of testing you're
> >>>> looking for (I haven't been following these patches, sorry.)
> >>>>
> >>>
> >>> A drop test or L2 routing will be enough.
> >>> BTW I should have the macchiatobin back on friday.
> >>
> >> I have a 10G packet generator connected to 10G ports of CN913x-DB - I
> >> will stress mvpp2 in l2 forwarding early next week (I'm mostly AFK
> >> this until Monday).
> >>
> >
> > I managed to to a drop test on mvpp2. Maybe there is a slowdown but
> > it's below the measurement uncertainty.
> >
> > Perf top before:
> >
> > Overhead Shared O Symbol
> > 8.48% [kernel] [k] page_pool_put_page
> > 2.57% [kernel] [k] page_pool_refill_alloc_cache
> > 1.58% [kernel] [k] page_pool_alloc_pages
> > 0.75% [kernel] [k] page_pool_return_skb_page
> >
> > after:
> >
> > Overhead Shared O Symbol
> > 8.34% [kernel] [k] page_pool_put_page
> > 4.52% [kernel] [k] page_pool_return_skb_page
> > 4.42% [kernel] [k] page_pool_sub_bias
> > 3.16% [kernel] [k] page_pool_alloc_pages
> > 2.43% [kernel] [k] page_pool_refill_alloc_cache
>
> Hi, Matteo
> Thanks for the testing.
> it seems you have adapted the mvpp2 driver to use the new frag
> API for page pool, There is one missing optimization for XDP case,
> the page is always returned to the pool->ring regardless of the
> context of page_pool_put_page() for elevated refcnt case.
>
> Maybe adding back that optimization will close some gap of the above
> performance difference if the drop is happening in softirq context.
>
I think what Matteo did was a pure netstack test. We'll need testing on
both XDP and normal network cases to be able to figure out the exact
impact.
Thanks
/Ilias
> >
> > Regards,
> >
prev parent reply other threads:[~2021-07-09 6:42 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-30 9:17 [PATCH net-next RFC 0/2] add elevated refcnt support for page pool Yunsheng Lin
2021-06-30 9:17 ` [PATCH net-next RFC 1/2] page_pool: add page recycling support based on elevated refcnt Yunsheng Lin
2021-07-02 9:42 ` Jesper Dangaard Brouer
2021-07-02 10:15 ` Yunsheng Lin
2021-07-06 4:54 ` Ilias Apalodimas
2021-07-06 6:46 ` Yunsheng Lin
2021-07-06 8:18 ` Ilias Apalodimas
2021-07-06 20:45 ` Alexander Duyck
2021-07-07 3:05 ` Yunsheng Lin
2021-07-07 15:01 ` Alexander Duyck
2021-07-07 19:03 ` Ilias Apalodimas
2021-07-07 21:49 ` Alexander Duyck
2021-07-08 14:21 ` Ilias Apalodimas
2021-07-08 14:24 ` Alexander Duyck
2021-07-08 14:50 ` Ilias Apalodimas
2021-07-08 15:17 ` Ilias Apalodimas
2021-07-08 15:29 ` Alexander Duyck
2021-07-08 15:36 ` Ilias Apalodimas
2021-07-08 15:41 ` Alexander Duyck
2021-07-08 15:47 ` Ilias Apalodimas
2021-07-08 2:27 ` Yunsheng Lin
2021-07-08 15:36 ` Alexander Duyck
2021-07-09 6:26 ` Yunsheng Lin
2021-07-09 14:15 ` Alexander Duyck
2021-07-10 9:16 ` [Linuxarm] " Yunsheng Lin
2021-06-30 9:17 ` [PATCH net-next RFC 2/2] net: hns3: support skb's frag page recycling based on page pool Yunsheng Lin
2021-07-02 8:36 ` [PATCH net-next RFC 0/2] add elevated refcnt support for " Ilias Apalodimas
2021-07-02 13:39 ` Matteo Croce
2021-07-06 15:51 ` Russell King (Oracle)
2021-07-06 23:19 ` Matteo Croce
2021-07-07 16:50 ` Marcin Wojtas
2021-07-09 4:15 ` Matteo Croce
2021-07-09 6:40 ` Yunsheng Lin
2021-07-09 6:42 ` Ilias Apalodimas [this message]
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=YOfv1vHcZPBvyfaN@enceladus \
--to=ilias.apalodimas@linaro$(echo .)org \
--cc=akpm@linux-foundation$(echo .)org \
--cc=alobakin@pm$(echo .)me \
--cc=ast@kernel$(echo .)org \
--cc=bpf@vger$(echo .)kernel.org \
--cc=cong.wang@bytedance$(echo .)com \
--cc=daniel@iogearbox$(echo .)net \
--cc=davem@davemloft$(echo .)net \
--cc=elver@google$(echo .)com \
--cc=feng.tang@intel$(echo .)com \
--cc=fenghua.yu@intel$(echo .)com \
--cc=guro@fb$(echo .)com \
--cc=haokexin@gmail$(echo .)com \
--cc=hawk@kernel$(echo .)org \
--cc=hughd@google$(echo .)com \
--cc=jgg@ziepe$(echo .)ca \
--cc=john.fastabend@gmail$(echo .)com \
--cc=jonathan.lemon@gmail$(echo .)com \
--cc=kuba@kernel$(echo .)org \
--cc=linux-kernel@vger$(echo .)kernel.org \
--cc=linux@armlinux$(echo .)org.uk \
--cc=linuxarm@openeuler$(echo .)org \
--cc=linyunsheng@huawei$(echo .)com \
--cc=mcroce@linux$(echo .)microsoft.com \
--cc=mcroce@microsoft$(echo .)com \
--cc=mw@semihalf$(echo .)com \
--cc=netdev@vger$(echo .)kernel.org \
--cc=nogikh@google$(echo .)com \
--cc=peterx@redhat$(echo .)com \
--cc=peterz@infradead$(echo .)org \
--cc=salil.mehta@huawei$(echo .)com \
--cc=sven.auhagen@voleatech$(echo .)de \
--cc=thomas.petazzoni@bootlin$(echo .)com \
--cc=vbabka@suse$(echo .)cz \
--cc=wenxu@ucloud$(echo .)cn \
--cc=will@kernel$(echo .)org \
--cc=willemb@google$(echo .)com \
--cc=willy@infradead$(echo .)org \
--cc=yisen.zhuang@huawei$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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