hc
2023-11-06 e3e12f52b214121840b44c91de5b3e5af5d3eb84
kernel/net/sched/sch_generic.c
....@@ -576,7 +576,11 @@
576576 .ops = &noop_qdisc_ops,
577577 .q.lock = __SPIN_LOCK_UNLOCKED(noop_qdisc.q.lock),
578578 .dev_queue = &noop_netdev_queue,
579
+#ifdef CONFIG_PREEMPT_RT_BASE
580
+ .running = __SEQLOCK_UNLOCKED(noop_qdisc.running),
581
+#else
579582 .running = SEQCNT_ZERO(noop_qdisc.running),
583
+#endif
580584 .busylock = __SPIN_LOCK_UNLOCKED(noop_qdisc.busylock),
581585 .gso_skb = {
582586 .next = (struct sk_buff *)&noop_qdisc.gso_skb,
....@@ -877,9 +881,17 @@
877881 lockdep_set_class(&sch->busylock,
878882 dev->qdisc_tx_busylock ?: &qdisc_tx_busylock);
879883
884
+#ifdef CONFIG_PREEMPT_RT_BASE
885
+ seqlock_init(&sch->running);
886
+ lockdep_set_class(&sch->running.seqcount,
887
+ dev->qdisc_running_key ?: &qdisc_running_key);
888
+ lockdep_set_class(&sch->running.lock,
889
+ dev->qdisc_running_key ?: &qdisc_running_key);
890
+#else
880891 seqcount_init(&sch->running);
881892 lockdep_set_class(&sch->running,
882893 dev->qdisc_running_key ?: &qdisc_running_key);
894
+#endif
883895
884896 sch->ops = ops;
885897 sch->flags = ops->static_flags;
....@@ -1253,7 +1265,7 @@
12531265 /* Wait for outstanding qdisc_run calls. */
12541266 list_for_each_entry(dev, head, close_list) {
12551267 while (some_qdisc_is_busy(dev))
1256
- yield();
1268
+ msleep(1);
12571269 /* The new qdisc is assigned at this point so we can safely
12581270 * unwind stale skb lists and qdisc statistics
12591271 */