[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20200817105619.6395e654@oasis.local.home>
Date: Mon, 17 Aug 2020 10:56:19 -0400
From: Steven Rostedt <rostedt@...dmis.org>
To: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
Cc: LKML <linux-kernel@...r.kernel.org>,
linux-rt-users <linux-rt-users@...r.kernel.org>,
Thomas Gleixner <tglx@...utronix.de>,
Carsten Emde <C.Emde@...dl.org>,
John Kacur <jkacur@...hat.com>, Daniel Wagner <wagi@...om.org>,
Tom Zanussi <zanussi@...nel.org>,
"Srivatsa S. Bhat" <srivatsa@...il.mit.edu>
Subject: Re: Question on 5.4.55 merge into 5.4-rt
On Mon, 17 Aug 2020 15:41:09 +0200
Sebastian Andrzej Siewior <bigeasy@...utronix.de> wrote:
> On 2020-08-14 18:54:21 [-0400], Steven Rostedt wrote:
> >
> > When merging 5.4.55 into 5.4-rt I hit the following conflict:
> …
> >
> > Where we are doing something slightly different. Placing the skb on the
> > sd->tofree_queue and raising NET_RX_SOFTIQ instead.
> >
> > Now that the vanilla stable 5.4 kernel doesn't call kfree_skb() from
> > irqs_disabled, can I safely revert this entire change?
>
> Not if you mean dropping skbufhead-raw-lock.patch.
Yeah, I realized I worded that incorrectly. No, I meant only reverting
the portion of that patch I showed:
@@ -5229,7 +5234,7 @@ static void flush_backlog(struct work_struct *work)
skb_queue_walk_safe(&sd->input_pkt_queue, skb, tmp) {
if (skb->dev->reg_state == NETREG_UNREGISTERING) {
__skb_unlink(skb, &sd->input_pkt_queue);
- kfree_skb(skb);
+ __skb_queue_tail(&sd->tofree_queue, skb);
input_queue_head_incr(sd);
}
}
@@ -5239,11 +5244,14 @@ static void flush_backlog(struct work_struct *work)
skb_queue_walk_safe(&sd->process_queue, skb, tmp) {
if (skb->dev->reg_state == NETREG_UNREGISTERING) {
__skb_unlink(skb, &sd->process_queue);
- kfree_skb(skb);
+ __skb_queue_tail(&sd->tofree_queue, skb);
input_queue_head_incr(sd);
}
}
+ if (!skb_queue_empty(&sd->tofree_queue))
+ raise_softirq_irqoff(NET_RX_SOFTIRQ);
local_bh_enable();
+
}
>
> We can drop `tofree_queue' and everything related to it. We need to
> keep the `raw_lock' and the `rps_lock()' hunks for
> `sd->input_pkt_queue'. The other queue, `sd->process_queue', is
> protected by local_bh_disable() so these hunks can be dropped in the
> more recent RT versions with the re-written softirq code
> (v5.0.19-rt10+).
>
> > Is it safe to call kfree_skb() from local_bh_disable()?
>
> of course it is.
Then all looks good.
Thanks, I'll push this out to the repos today.
-- Steve
Powered by blists - more mailing lists