Re: [PATCH net] net: fix raising a softirq on the current cpu with rps enabled

From: Jason Xing
Date: Sat Mar 25 2023 - 23:31:29 EST


On Sun, Mar 26, 2023 at 9:39 AM Hillf Danton <hdanton@xxxxxxxx> wrote:
>
> On Sat, Mar 25, 2023 at 8:26 AM Jason Xing <kerneljasonxing@xxxxxxxxx>
> >
> > @@ -4594,8 +4594,6 @@ static int napi_schedule_rps(struct softnet_data *sd)
> > if (sd !=3D mysd) {
> > sd->rps_ipi_next =3D mysd->rps_ipi_list;
> > mysd->rps_ipi_list =3D sd;
> > -
> > - __raise_softirq_irqoff(NET_RX_SOFTIRQ);
> > return 1;
> > }
>
> Nope, ipi should be sent. But no ipi can go without irq enabled.
>

Sorry, I didn't get it. IPI is sent in net_rx_action() and apparently
I didn't touch this part in this patch. Here is only about whether we
should raise an IRQ even if the skb will be enqueued into another cpu.

> So feel free to work out what sense made by disabling irq at the call site
> then directly send ipi instead.