Re: [PATCH net-next v1 2/5] net: sched: Introduce helpers for qevent blocks
From: Cong Wang <hidden>
Date: 2020-07-09 19:37:27
From: Cong Wang <hidden>
Date: 2020-07-09 19:37:27
On Wed, Jul 8, 2020 at 5:13 PM Petr Machata [off-list ref] wrote:
Petr Machata [off-list ref] writes:quoted
Cong Wang [off-list ref] writes: I'll think about it some more. For now I will at least fix the lack of locking.I guess I could store smp_processor_id() that acquired the lock in struct qdisc_skb_head. Do a trylock instead of lock, and on fail check the stored value. I'll need to be careful about the race between unsuccessful trylock and the test, and about making sure CPU ID doesn't change after it is read. I'll probe this tomorrow.
Like __netif_tx_lock(), right? Seems doable. Thanks.