From: Paolo Abeni <pabeni@redhat.com>
To: Heng Qi <hengqi@linux.alibaba.com>,
virtualization@lists.linux-foundation.org,
netdev@vger.kernel.org
Cc: jasowang@redhat.com, mst@redhat.com, kuba@kernel.org,
edumazet@google.com, davem@davemloft.net, hawk@kernel.org,
john.fastabend@gmail.com, ast@kernel.org, horms@kernel.org,
xuanzhuo@linux.alibaba.com, yinjun.zhang@corigine.com
Subject: Re: [PATCH net-next v5 4/4] virtio-net: support rx netdim
Date: Thu, 30 Nov 2023 10:33:31 +0100 [thread overview]
Message-ID: <8d2ee27f10a7a6c9414f10e8c0155c090b5f11e3.camel@redhat.com> (raw)
In-Reply-To: <12c0a070d31f29e394b78a8abb4c009274b8a88c.1701050450.git.hengqi@linux.alibaba.com>
On Mon, 2023-11-27 at 10:55 +0800, Heng Qi wrote:
> @@ -4738,11 +4881,14 @@ static void remove_vq_common(struct virtnet_info *vi)
> static void virtnet_remove(struct virtio_device *vdev)
> {
> struct virtnet_info *vi = vdev->priv;
> + int i;
>
> virtnet_cpu_notif_remove(vi);
>
> /* Make sure no work handler is accessing the device. */
> flush_work(&vi->config_work);
> + for (i = 0; i < vi->max_queue_pairs; i++)
> + cancel_work(&vi->rq[i].dim.work);
If the dim work is still running here, what prevents it from completing
after the following unregister/free netdev?
It looks like you want need to call cancel_work_sync here?
Additionally the later remove_vq_common() will needless call
cancel_work() again; possibly is better to consolidate a single (sync)
call there.
Cheers,
Paolo
next prev parent reply other threads:[~2023-11-30 9:33 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-27 2:55 [PATCH net-next v5 0/4] virtio-net: support dynamic coalescing moderation Heng Qi
2023-11-27 2:55 ` [PATCH net-next v5 1/4] virtio-net: returns whether napi is complete Heng Qi
2023-11-27 2:55 ` [PATCH net-next v5 2/4] virtio-net: separate rx/tx coalescing moderation cmds Heng Qi
2023-11-27 2:55 ` [PATCH net-next v5 3/4] virtio-net: extract virtqueue coalescig cmd for reuse Heng Qi
2023-11-27 2:55 ` [PATCH net-next v5 4/4] virtio-net: support rx netdim Heng Qi
2023-11-30 9:33 ` Paolo Abeni [this message]
2023-11-30 12:09 ` Heng Qi
2023-11-30 12:23 ` Paolo Abeni
2023-11-30 12:42 ` Heng Qi
2023-12-01 2:11 ` Yinjun Zhang
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=8d2ee27f10a7a6c9414f10e8c0155c090b5f11e3.camel@redhat.com \
--to=pabeni@redhat.com \
--cc=ast@kernel.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=hawk@kernel.org \
--cc=hengqi@linux.alibaba.com \
--cc=horms@kernel.org \
--cc=jasowang@redhat.com \
--cc=john.fastabend@gmail.com \
--cc=kuba@kernel.org \
--cc=mst@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=virtualization@lists.linux-foundation.org \
--cc=xuanzhuo@linux.alibaba.com \
--cc=yinjun.zhang@corigine.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).