[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <e1e824ba-78dc-4a65-912d-4ef7f4175a51@linux.alibaba.com>
Date: Thu, 23 Nov 2023 16:34:40 +0800
From: Heng Qi <hengqi@...ux.alibaba.com>
To: Yinjun Zhang <yinjun.zhang@...igine.com>
Cc: ast@...nel.org, davem@...emloft.net, edumazet@...gle.com,
hawk@...nel.org, horms@...nel.org, jasowang@...hat.com,
john.fastabend@...il.com, kuba@...nel.org, mst@...hat.com,
netdev@...r.kernel.org, pabeni@...hat.com,
virtualization@...ts.linux-foundation.org, xuanzhuo@...ux.alibaba.com
Subject: Re: [PATCH net-next v4 4/4] virtio-net: support rx netdim
在 2023/11/22 下午5:29, Yinjun Zhang 写道:
> On Mon, 20 Nov 2023 20:37:34 +0800, Heng Qi wrote:
> <...>
>> @@ -2179,6 +2220,7 @@ static void virtnet_disable_queue_pair(struct virtnet_info *vi, int qp_index)
>> virtnet_napi_tx_disable(&vi->sq[qp_index].napi);
>> napi_disable(&vi->rq[qp_index].napi);
>> xdp_rxq_info_unreg(&vi->rq[qp_index].xdp_rxq);
>> + cancel_work_sync(&vi->rq[qp_index].dim.work);
> I'm not sure, but please check if here may cause deadlock:
> rtnl_lock held ->
> .ndo_stop ->
> virtnet_disable_queue_pair() ->
> cancel_work_sync() ->
> virtnet_rx_dim_work() ->
> rtnl_lock()
Good catch!
I tried using cancel_work() which solves the problem. Additionally I
tested the
scenario of ctrl cmd/.remove/.ndo_stop()/dim_work when there is a lot of
concurrency,
and this can work very well.
Thanks!
>
>> }
>>
>> static int virtnet_enable_queue_pair(struct virtnet_info *vi, int qp_index)
> <...>
Powered by blists - more mailing lists