virtualization.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
From: Bui Quang Minh <minhquangbui99@gmail.com>
To: Jason Wang <jasowang@redhat.com>
Cc: netdev@vger.kernel.org, "Michael S. Tsirkin" <mst@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>,
	"Jakub Kicinski" <kuba@kernel.org>,
	"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
Subject: Re: [PATCH net 1/3] virtio-net: make refill work a per receive queue work
Date: Wed, 24 Dec 2025 23:43:21 +0700	[thread overview]
Message-ID: <0c94aed3-bef9-4ae8-b9fa-bf2db113eee8@gmail.com> (raw)
In-Reply-To: <CACGkMEvXkPiTGxZ6nuC72-VGdLHVXzrGa9bAF=TcP8nqPjeZ_w@mail.gmail.com>

On 12/24/25 07:52, Jason Wang wrote:
> On Tue, Dec 23, 2025 at 11:27 PM Bui Quang Minh
> <minhquangbui99@gmail.com> wrote:
>> Currently, the refill work is a global delayed work for all the receive
>> queues. This commit makes the refill work a per receive queue so that we
>> can manage them separately and avoid further mistakes. It also helps the
>> successfully refilled queue avoid the napi_disable in the global delayed
>> refill work like before.
>>
>> Signed-off-by: Bui Quang Minh <minhquangbui99@gmail.com>
>> ---
> I may miss something but I think this patch is sufficient to fix the problem?
>
> Thanks
>

Yes, this fixes the reproducer in virtnet_rx_resume[_all] but the second 
patch also fixes a bug variant in virtnet_open. After the first patch, 
the enable_delayed_refill is still called before napi_enable. However, 
the only possible delayed refill schedule is in virtnet_set_queues and 
it can't happen between that window because during 
virtnet_rx_resume[_all], we still holds the rtnl_lock. So leaving the 
enable_delayed_refill before napi_enable does not cause an issue but it 
feels not correct to me. But moving enable_delayed_refill after 
napi_enable requires the new pending bool in the third patch.

Thanks,
Quang Minh.

  parent reply	other threads:[~2025-12-24 16:43 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-23 15:25 [PATCH net 0/3] virtio-net: fix the deadlock when disabling rx NAPI Bui Quang Minh
2025-12-23 15:25 ` [PATCH net 1/3] virtio-net: make refill work a per receive queue work Bui Quang Minh
2025-12-24  0:52   ` Jason Wang
2025-12-24  1:37     ` Xuan Zhuo
2025-12-24  1:47       ` Michael S. Tsirkin
2025-12-24 16:49         ` Bui Quang Minh
2025-12-25 15:55           ` Bui Quang Minh
2025-12-25 16:27             ` Michael S. Tsirkin
2025-12-25  7:33         ` Jason Wang
2025-12-25 16:27           ` Michael S. Tsirkin
2025-12-26  1:31             ` Jason Wang
2025-12-26  7:37               ` Michael S. Tsirkin
2025-12-29  2:57                 ` Jason Wang
2025-12-30 16:28                 ` Bui Quang Minh
2025-12-30 16:44                   ` Michael S. Tsirkin
2025-12-31  7:30                   ` Jason Wang
2025-12-31 15:25                     ` Bui Quang Minh
2025-12-24 16:43     ` Bui Quang Minh [this message]
2025-12-24  1:34   ` Michael S. Tsirkin
2025-12-24 10:19   ` Michael S. Tsirkin
2025-12-24 17:03     ` Bui Quang Minh
2025-12-23 15:25 ` [PATCH net 2/3] virtio-net: ensure rx NAPI is enabled before enabling refill work Bui Quang Minh
2025-12-24  1:45   ` Michael S. Tsirkin
2025-12-24 17:49     ` Bui Quang Minh
2025-12-24 10:20   ` Michael S. Tsirkin
2025-12-23 15:25 ` [PATCH net 3/3] virtio-net: schedule the pending refill work after being enabled Bui Quang Minh
2025-12-24 10:17   ` Michael S. Tsirkin

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=0c94aed3-bef9-4ae8-b9fa-bf2db113eee8@gmail.com \
    --to=minhquangbui99@gmail.com \
    --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=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mst@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=sdf@fomichev.me \
    --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 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).