From: Jakub Kicinski <kuba@kernel.org>
To: Bui Quang Minh <minhquangbui99@gmail.com>
Cc: netdev@vger.kernel.org, "Michael S. Tsirkin" <mst@redhat.com>,
"Jason Wang" <jasowang@redhat.com>,
"Xuan Zhuo" <xuanzhuo@linux.alibaba.com>,
"Eugenio Pérez" <eperezma@redhat.com>,
"Andrew Lunn" <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
"Eric Dumazet" <edumazet@google.com>,
"Paolo Abeni" <pabeni@redhat.com>,
"Alexei Starovoitov" <ast@kernel.org>,
"Daniel Borkmann" <daniel@iogearbox.net>,
"Jesper Dangaard Brouer" <hawk@kernel.org>,
"John Fastabend" <john.fastabend@gmail.com>,
"Stanislav Fomichev" <sdf@fomichev.me>,
virtualization@lists.linux.dev, linux-kernel@vger.kernel.org,
bpf@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH net v3 1/3] virtio-net: don't schedule delayed refill worker
Date: Sat, 10 Jan 2026 11:10:53 -0800 [thread overview]
Message-ID: <20260110111053.08107da2@kernel.org> (raw)
In-Reply-To: <2542db74-0e72-421d-932a-b1667fb16e56@gmail.com>
On Sat, 10 Jan 2026 15:23:36 +0700 Bui Quang Minh wrote:
> >> @@ -3230,9 +3230,10 @@ static int virtnet_open(struct net_device *dev)
> >>
> >> for (i = 0; i < vi->max_queue_pairs; i++) {
> >> if (i < vi->curr_queue_pairs)
> >> - /* Make sure we have some buffers: if oom use wq. */
> >> - if (!try_fill_recv(vi, &vi->rq[i], GFP_KERNEL))
> >> - schedule_delayed_work(&vi->refill, 0);
> >> + /* Pre-fill rq agressively, to make sure we are ready to
> >> + * get packets immediately.
> >> + */
> >> + try_fill_recv(vi, &vi->rq[i], GFP_KERNEL);
> > We should enforce _some_ minimal fill level at the time of open().
> > If the ring is completely empty no traffic will ever flow, right?
> > Perhaps I missed scheduling the NAPI somewhere..
>
> The NAPI is enabled and scheduled in virtnet_napi_enable(). The code
> path is like this
>
> virtnet_enable_queue_pair
> -> virtnet_napi_enable
> -> virtnet_napi_do_enable
> -> virtqueue_napi_schedule
>
> The same happens in __virtnet_rx_resume().
I see. Alright, let me fix the nits while applying, no need to respin.
Kinda want this in the tree for a few days before shipping off to Linus.
next prev parent reply other threads:[~2026-01-10 19:10 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-06 15:04 [PATCH net v3 0/3] virtio-net: fix the deadlock when disabling rx NAPI Bui Quang Minh
2026-01-06 15:04 ` [PATCH net v3 1/3] virtio-net: don't schedule delayed refill worker Bui Quang Minh
2026-01-06 15:29 ` Michael S. Tsirkin
2026-01-06 15:39 ` Bui Quang Minh
2026-01-10 2:12 ` Jakub Kicinski
2026-01-10 8:23 ` Bui Quang Minh
2026-01-10 19:10 ` Jakub Kicinski [this message]
2026-01-10 10:14 ` Michael S. Tsirkin
2026-01-06 15:04 ` [PATCH net v3 2/3] virtio-net: remove unused " Bui Quang Minh
2026-01-06 15:04 ` [PATCH net v3 3/3] virtio-net: clean up __virtnet_rx_pause/resume Bui Quang Minh
2026-01-12 20:56 ` [PATCH net v3 0/3] virtio-net: fix the deadlock when disabling rx NAPI 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=20260110111053.08107da2@kernel.org \
--to=kuba@kernel.org \
--cc=andrew+netdev@lunn.ch \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=eperezma@redhat.com \
--cc=hawk@kernel.org \
--cc=jasowang@redhat.com \
--cc=john.fastabend@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=minhquangbui99@gmail.com \
--cc=mst@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=sdf@fomichev.me \
--cc=stable@vger.kernel.org \
--cc=virtualization@lists.linux.dev \
--cc=xuanzhuo@linux.alibaba.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.