From: wangzengyuan <wangzengyuan@huawei.com>
To: "dev@dpdk.org" <dev@dpdk.org>
Cc: "maxime.coquelin@redhat.com" <maxime.coquelin@redhat.com>,
"chenbo.xia@intel.com" <chenbo.xia@intel.com>,
"zhangxu (BA)" <jesse.zhangxu@huawei.com>,
luyicai <luyicai@huawei.com>,
wangyunjian <wangyunjian@huawei.com>
Subject: dpdk: Inquiry about vring cleanup during packets transmission
Date: Sat, 27 May 2023 07:08:09 +0000 [thread overview]
Message-ID: <cbb8e8c33fcd4661a844a9993d29f9fa@huawei.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 1006 bytes --]
Hi,
I am writing to inquire about the vring cleanup process during packets transmission.
In the virtio_xmit_pkts function, there is the following code:
nb_used = virtqueue_nused(vq);
if (likely(nb_used > vq->vq_nentries - vq->vq_free_thresh))
virtio_xmit_cleanup(vq, nb_used);
In other words, cleaning is performed when the number of items used in the vring exceeds (vq->vq_nentries - vq->vq_free_thresh). In the case of an vring size of 4096, at least (4096-32) items need to be cleaned at once, which will take a considerable amount of time.
I'm curious why not clean up fewer items each time to avoid taking up too much CPU time in one transmission. Because during the debugging process, I found that cleaning up thousands of items at once takes up a considerable amount of time.
As I am not familiar with this process, I would appreciate it if you could provide me with some information on what its purpose is.
Best regards,
Zengyuan Wang
[-- Attachment #2: Type: text/html, Size: 4241 bytes --]
next reply other threads:[~2023-05-30 15:41 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-27 7:08 wangzengyuan [this message]
2023-05-30 9:48 ` Maxime Coquelin
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=cbb8e8c33fcd4661a844a9993d29f9fa@huawei.com \
--to=wangzengyuan@huawei.com \
--cc=chenbo.xia@intel.com \
--cc=dev@dpdk.org \
--cc=jesse.zhangxu@huawei.com \
--cc=luyicai@huawei.com \
--cc=maxime.coquelin@redhat.com \
--cc=wangyunjian@huawei.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).