On Thu, Mar 5, 2026 at 5:11 PM Lorenzo Bianconi <[email protected]> wrote:
> > On Thu, Mar 5, 2026 at 5:00 PM Lorenzo Bianconi < > [email protected]> > > wrote: > > > > > > The pinctrl would go to sleep if the lock wasn't available without > > > > checking if there is any other update. However, we still might be > > > > able to process packets without the lock (some packet processing > > > > still requires a lock). This improves the pinctrl throughput a bit. > > > > > > > > Fixes: d71c45199341 ("pinctrl: Use ovs_mutex_trylock() in the pinctrl > > > thread.") > > > > Signed-off-by: Ales Musil <[email protected]> > > > > > > Acked-by: Lorenzo Bianconi <[email protected]> > > > > > > Just for my curiosity, do you have any numbers to check the > improvement? > > > > > > > Thank you Lorenzo, > > > > nothing concrete unfortunately, there are other things that slow the > > processing > > down even if we take the sleep out of the picture. I'm planning to work > on > > those bits next, if everything goes well we might end up lockless in the > > pinctrl. > > nice :) > > > > > > > > Regards, > > > Lorenzo > > > > > > > --- > > > > controller/pinctrl.c | 33 ++++++++++++++++----------------- > > > > 1 file changed, 16 insertions(+), 17 deletions(-) > > > > > > > > diff --git a/controller/pinctrl.c b/controller/pinctrl.c > > > > index 775d37601..35c42942f 100644 > > > > --- a/controller/pinctrl.c > > > > +++ b/controller/pinctrl.c > > > > @@ -4026,26 +4026,25 @@ pinctrl_handler(void *arg_) > > > > } > > > > > > > > if (lock_failed) { > > > > - /* Wait for 5 msecs before waking to avoid degrading the > > > > - * lock to a spinlock. */ > > > > + /* Wait for 5 msecs before waking in case there isn't > > > anything > > > > + * else to process. */ > > > > poll_timer_wait(5); > > > > - } else { > > > > - rconn_run_wait(swconn); > > > > - rconn_recv_wait(swconn); > > > > - if (rconn_is_connected(swconn)) { > > > > - send_garp_rarp_wait(send_garp_rarp_time); > > > > - send_arp_nd_wait(send_arp_nd_time); > > > > - ipv6_ra_wait(send_ipv6_ra_time); > > > > - ip_mcast_querier_wait(send_mcast_query_time); > > > > - svc_monitors_wait(svc_monitors_next_run_time); > > > > - ipv6_prefixd_wait(send_prefixd_time); > > > > - bfd_monitor_wait(bfd_time); > > > > - } > > > > - seq_wait(pinctrl_handler_seq, new_seq); > > > > - > > > > - latch_wait(&pctrl->pinctrl_thread_exit); > > > > } > > > > > > > > + rconn_run_wait(swconn); > > > > + rconn_recv_wait(swconn); > > > > + if (rconn_is_connected(swconn)) { > > > > + send_garp_rarp_wait(send_garp_rarp_time); > > > > + send_arp_nd_wait(send_arp_nd_time); > > > > + ipv6_ra_wait(send_ipv6_ra_time); > > > > + ip_mcast_querier_wait(send_mcast_query_time); > > > > + svc_monitors_wait(svc_monitors_next_run_time); > > > > + ipv6_prefixd_wait(send_prefixd_time); > > > > + bfd_monitor_wait(bfd_time); > > > > + } > > > > + seq_wait(pinctrl_handler_seq, new_seq); > > > > + latch_wait(&pctrl->pinctrl_thread_exit); > > > > + > > > > ovsrcu_quiesce_start(); > > > > poll_block(); > > > > } > > > > -- > > > > 2.53.0 > > > > > > > > _______________________________________________ > > > > dev mailing list > > > > [email protected] > > > > https://mail.openvswitch.org/mailman/listinfo/ovs-dev > > > > > > > > > > > Regards, > > Ales > Thank you Lorenzo, applied to main and backported all the way down to 25.03. Regards, Ales _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
