From: Thomas Monjalon <thomas@monjalon.net>
To: Matt <zhouyates@gmail.com>
Cc: stable@dpdk.org, dev@dpdk.org, stephen@networkplumber.org,
Ferruh Yigit <ferruh.yigit@amd.com>
Subject: Re: [PATCH v3] kni: fix possible alloc_q starvation when mbufs are exhausted
Date: Sat, 11 Mar 2023 10:16:39 +0100 [thread overview]
Message-ID: <6880737.18pcnM708K@thomas> (raw)
In-Reply-To: <e7c17c4c-f6fe-3442-17f8-b682ff797b47@amd.com>
04/01/2023 15:34, Ferruh Yigit:
> On 1/4/2023 11:57 AM, Matt wrote:
> > Hi Ferruh,
> >
> > In my case, the traffic is not large, so I can't see the impact.
> > I also tested under high load(>2Mpps with 2 DPDK cores and 2 kernel threads)
> > and found no significant difference in performance either.
> > I think the reason should be that it will not
> > run to 'kni_fifo_count(kni->alloc_q) == 0' under high load.
> >
>
> I agree, additional check most likely hit on the low bandwidth,
> thanks for checking for performance impact.
>
> > On Tue, Jan 3, 2023 at 8:47 PM Ferruh Yigit <ferruh.yigit@amd.com
> > <mailto:ferruh.yigit@amd.com>> wrote:
> >
> > On 12/30/2022 4:23 AM, Yangchao Zhou wrote:
> > > In some scenarios, mbufs returned by rte_kni_rx_burst are not freed
> > > immediately. So kni_allocate_mbufs may be failed, but we don't know.
> > >
> > > Even worse, when alloc_q is completely exhausted, kni_net_tx in
> > > rte_kni.ko will drop all tx packets. kni_allocate_mbufs is never
> > > called again, even if the mbufs are eventually freed.
> > >
> > > In this patch, we try to allocate mbufs for alloc_q when it is empty.
> > >
> > > According to historical experience, the performance bottleneck of KNI
> > > is offen the usleep_range of kni thread in rte_kni.ko.
> > > The check of kni_fifo_count is trivial and the cost should be
> > acceptable.
> > >
> >
> > Hi Yangchao,
> >
> > Are you observing any performance impact with this change in you use
> > case?
> >
> >
> > > Fixes: 3e12a98fe397 ("kni: optimize Rx burst")
> > > Cc: stable@dpdk.org <mailto:stable@dpdk.org>
> > >
> > > Signed-off-by: Yangchao Zhou <zhouyates@gmail.com
> > <mailto:zhouyates@gmail.com>>
>
> Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>
Applied, thanks.
prev parent reply other threads:[~2023-03-11 9:16 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-09 5:13 [PATCH] " Yangchao Zhou
2022-11-09 6:04 ` [PATCH v2] " Yangchao Zhou
2022-11-09 16:39 ` Stephen Hemminger
2022-11-11 9:12 ` Matt
2022-12-09 16:15 ` Ferruh Yigit
2022-12-30 4:23 ` [PATCH v3] " Yangchao Zhou
2023-01-03 12:47 ` Ferruh Yigit
2023-01-04 11:57 ` Matt
2023-01-04 14:34 ` Ferruh Yigit
2023-03-11 9:16 ` Thomas Monjalon [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=6880737.18pcnM708K@thomas \
--to=thomas@monjalon.net \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@amd.com \
--cc=stable@dpdk.org \
--cc=stephen@networkplumber.org \
--cc=zhouyates@gmail.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;
as well as URLs for NNTP newsgroup(s).