On Fri, 12 Apr 2024 14:53:08 -0500 Daniel Jurgens wrote:
> Once the RTNL locking around the control buffer is removed there can be
> contention on the per queue RX interrupt coalescing data. Use a spin
> lock per queue.
Does not compile on Clang.
> + scoped_guard(spinlock, &vi->rq[i].intr_coal_lock) {
> + err = virtnet_send_rx_ctrl_coal_vq_cmd(vi, i,
> +
> vi->intr_coal_rx.max_usecs,
> +
> vi->intr_coal_rx.max_packets);
> + if (err)
> + return err;
> + }
Do you really think this needs a scoped guard and 4th indentation level,
instead of just:
..lock(..);
err = virtnet_send_rx_ctrl_coal_vq_cmd(vi, i,
vi->intr_coal_rx.max_usecs,
vi->intr_coal_rx.max_packets);
..unlock(..);
if (err)
return err;
> + scoped_guard(spinlock, &vi->rq[i].intr_coal_lock) {
> + vi->rq[i].intr_coal.max_usecs = ec->rx_coalesce_usecs;
> + vi->rq[i].intr_coal.max_packets =
> ec->rx_max_coalesced_frames;
> + }
:-|
--
pw-bot: cr