diff options
Diffstat (limited to 'debian/patches-rt/net-Qdisc-use-a-seqlock-instead-seqcount.patch')
-rw-r--r-- | debian/patches-rt/net-Qdisc-use-a-seqlock-instead-seqcount.patch | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/debian/patches-rt/net-Qdisc-use-a-seqlock-instead-seqcount.patch b/debian/patches-rt/net-Qdisc-use-a-seqlock-instead-seqcount.patch index 0d1049d93..93d98da5d 100644 --- a/debian/patches-rt/net-Qdisc-use-a-seqlock-instead-seqcount.patch +++ b/debian/patches-rt/net-Qdisc-use-a-seqlock-instead-seqcount.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Wed, 14 Sep 2016 17:36:35 +0200 Subject: [PATCH] net/Qdisc: use a seqlock instead seqcount -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.0/older/patches-5.0.10-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2-rt1.tar.xz The seqcount disables preemption on -RT while it is held which can't remove. Also we don't want the reader to spin for ages if the writer is @@ -111,8 +111,8 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> +#include <net/net_seq_lock.h> #include <linux/refcount.h> #include <linux/workqueue.h> - #include <net/gen_stats.h> -@@ -104,7 +105,7 @@ struct Qdisc { + #include <linux/mutex.h> +@@ -102,7 +103,7 @@ struct Qdisc { struct sk_buff_head gso_skb ____cacheline_aligned_in_smp; struct qdisc_skb_head q; struct gnet_stats_basic_packed bstats; @@ -121,7 +121,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> struct gnet_stats_queue qstats; unsigned long state; struct Qdisc *next_sched; -@@ -139,7 +140,11 @@ static inline bool qdisc_is_running(stru +@@ -140,7 +141,11 @@ static inline bool qdisc_is_running(stru { if (qdisc->flags & TCQ_F_NOLOCK) return spin_is_locked(&qdisc->seqlock); @@ -132,8 +132,8 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> +#endif } - static inline bool qdisc_run_begin(struct Qdisc *qdisc) -@@ -150,17 +155,27 @@ static inline bool qdisc_run_begin(struc + static inline bool qdisc_is_percpu_stats(const struct Qdisc *q) +@@ -164,17 +169,27 @@ static inline bool qdisc_run_begin(struc } else if (qdisc_is_running(qdisc)) { return false; } @@ -161,7 +161,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> if (qdisc->flags & TCQ_F_NOLOCK) spin_unlock(&qdisc->seqlock); } -@@ -477,7 +492,7 @@ static inline spinlock_t *qdisc_root_sle +@@ -554,7 +569,7 @@ static inline spinlock_t *qdisc_root_sle return qdisc_lock(root); } @@ -172,7 +172,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> --- a/net/core/gen_estimator.c +++ b/net/core/gen_estimator.c -@@ -46,7 +46,7 @@ +@@ -42,7 +42,7 @@ struct net_rate_estimator { struct gnet_stats_basic_packed *bstats; spinlock_t *stats_lock; @@ -181,7 +181,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> struct gnet_stats_basic_cpu __percpu *cpu_bstats; u8 ewma_log; u8 intvl_log; /* period : (250ms << intvl_log) */ -@@ -129,7 +129,7 @@ int gen_new_estimator(struct gnet_stats_ +@@ -125,7 +125,7 @@ int gen_new_estimator(struct gnet_stats_ struct gnet_stats_basic_cpu __percpu *cpu_bstats, struct net_rate_estimator __rcu **rate_est, spinlock_t *lock, @@ -190,7 +190,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> struct nlattr *opt) { struct gnet_estimator *parm = nla_data(opt); -@@ -227,7 +227,7 @@ int gen_replace_estimator(struct gnet_st +@@ -223,7 +223,7 @@ int gen_replace_estimator(struct gnet_st struct gnet_stats_basic_cpu __percpu *cpu_bstats, struct net_rate_estimator __rcu **rate_est, spinlock_t *lock, @@ -201,7 +201,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> lock, running, opt); --- a/net/core/gen_stats.c +++ b/net/core/gen_stats.c -@@ -142,7 +142,7 @@ static void +@@ -138,7 +138,7 @@ static void } void @@ -210,7 +210,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> struct gnet_stats_basic_packed *bstats, struct gnet_stats_basic_cpu __percpu *cpu, struct gnet_stats_basic_packed *b) -@@ -155,15 +155,15 @@ void +@@ -151,15 +151,15 @@ void } do { if (running) @@ -229,7 +229,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> struct gnet_dump *d, struct gnet_stats_basic_cpu __percpu *cpu, struct gnet_stats_basic_packed *b, -@@ -204,7 +204,7 @@ static int +@@ -200,7 +200,7 @@ static int * if the room in the socket buffer was not sufficient. */ int @@ -238,7 +238,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> struct gnet_dump *d, struct gnet_stats_basic_cpu __percpu *cpu, struct gnet_stats_basic_packed *b) -@@ -228,7 +228,7 @@ EXPORT_SYMBOL(gnet_stats_copy_basic); +@@ -224,7 +224,7 @@ EXPORT_SYMBOL(gnet_stats_copy_basic); * if the room in the socket buffer was not sufficient. */ int @@ -249,7 +249,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> struct gnet_stats_basic_packed *b) --- a/net/sched/sch_api.c +++ b/net/sched/sch_api.c -@@ -1242,7 +1242,7 @@ static struct Qdisc *qdisc_create(struct +@@ -1248,7 +1248,7 @@ static struct Qdisc *qdisc_create(struct rcu_assign_pointer(sch->stab, stab); } if (tca[TCA_RATE]) { @@ -260,7 +260,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> if (sch->flags & TCQ_F_MQROOT) { --- a/net/sched/sch_generic.c +++ b/net/sched/sch_generic.c -@@ -570,7 +570,11 @@ struct Qdisc noop_qdisc = { +@@ -552,7 +552,11 @@ struct Qdisc noop_qdisc = { .ops = &noop_qdisc_ops, .q.lock = __SPIN_LOCK_UNLOCKED(noop_qdisc.q.lock), .dev_queue = &noop_netdev_queue, @@ -272,7 +272,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> .busylock = __SPIN_LOCK_UNLOCKED(noop_qdisc.busylock), .gso_skb = { .next = (struct sk_buff *)&noop_qdisc.gso_skb, -@@ -871,9 +875,17 @@ struct Qdisc *qdisc_alloc(struct netdev_ +@@ -850,9 +854,17 @@ struct Qdisc *qdisc_alloc(struct netdev_ lockdep_set_class(&sch->busylock, dev->qdisc_tx_busylock ?: &qdisc_tx_busylock); |