summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>2021-08-10 09:17:52 +0200
committerSebastian Andrzej Siewior <bigeasy@linutronix.de>2021-08-10 09:17:52 +0200
commite8e9b08d14a3d160db7e850aea5959c51b1325bd (patch)
treeebd532a9487312487c4e80047c6687ce4cd16489
parent13e82cf3ac1654d935270c4c1c8eb33a0ca53bcb (diff)
downloadlinux-rt-5.14-rc5-rt7-patches.tar.gz
[ANNOUNCE] v5.14-rc5-rt7v5.14-rc5-rt7-patches
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
-rw-r--r--patches/0001-io-wq-remove-GFP_ATOMIC-allocation-off-schedule-out-.patch34
-rw-r--r--patches/0002-io-wq-Don-t-mix-raw_spinlock_irq-spin_lock_irq.patch19
-rw-r--r--patches/Add_localversion_for_-RT_release.patch2
-rw-r--r--patches/net_Qdisc__use_a_seqlock_instead_seqcount.patch2
-rw-r--r--patches/series1
-rw-r--r--patches/timers__Move_clearing_of_base__timer_running_under_base__lock.patch60
6 files changed, 38 insertions, 80 deletions
diff --git a/patches/0001-io-wq-remove-GFP_ATOMIC-allocation-off-schedule-out-.patch b/patches/0001-io-wq-remove-GFP_ATOMIC-allocation-off-schedule-out-.patch
index bc9aae0e73e9..893a0b0163d2 100644
--- a/patches/0001-io-wq-remove-GFP_ATOMIC-allocation-off-schedule-out-.patch
+++ b/patches/0001-io-wq-remove-GFP_ATOMIC-allocation-off-schedule-out-.patch
@@ -52,8 +52,8 @@ Tested-by: Daniel Wagner <dwagner@suse.de>
Link: https://lore.kernel.org/r/a673a130-e0e4-5aa8-4165-f35d1262fc6a@kernel.dk
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
- fs/io-wq.c | 71 ++++++++++++++++++++++++++++++++++---------------------------
- 1 file changed, 40 insertions(+), 31 deletions(-)
+ fs/io-wq.c | 75 ++++++++++++++++++++++++++++++++++---------------------------
+ 1 file changed, 42 insertions(+), 33 deletions(-)
--- a/fs/io-wq.c
+++ b/fs/io-wq.c
@@ -68,7 +68,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
struct rcu_head rcu;
};
-@@ -261,42 +265,46 @@ static void io_wqe_inc_running(struct io
+@@ -270,50 +274,54 @@ static void io_wqe_inc_running(struct io
atomic_inc(&acct->nr_running);
}
@@ -83,21 +83,31 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
- struct create_worker_data *cwd;
+ struct io_worker *worker;
struct io_wq *wq;
+ struct io_wqe *wqe;
+ struct io_wqe_acct *acct;
- cwd = container_of(cb, struct create_worker_data, work);
-- wq = cwd->wqe->wq;
+- wqe = cwd->wqe;
+- wq = wqe->wq;
+- acct = &wqe->acct[cwd->index];
++ worker = container_of(cb, struct io_worker, create_work);
++ wqe = worker->wqe;
++ wq = worker->wq;
++ acct = &wqe->acct[worker->create_index];
+ raw_spin_lock_irq(&wqe->lock);
+ if (acct->nr_workers < acct->max_workers)
+ acct->nr_workers++;
+ raw_spin_unlock_irq(&wqe->lock);
- create_io_worker(wq, cwd->wqe, cwd->index);
- kfree(cwd);
-+ worker = container_of(cb, struct io_worker, create_work);
-+ wq = worker->wqe->wq;
-+ create_io_worker(wq, worker->wqe, worker->create_index);
++ create_io_worker(wq, wqe, worker->create_index);
+ clear_bit_unlock(0, &worker->create_state);
+ io_worker_release(worker);
}
-static void io_queue_worker_create(struct io_wqe *wqe, struct io_wqe_acct *acct)
-+static void io_queue_worker_create(struct io_wqe *wqe, struct io_worker *worker,
-+ struct io_wqe_acct *acct)
++static void io_queue_worker_create(struct io_wqe *wqe, struct io_worker
++ *worker, struct io_wqe_acct *acct)
{
- struct create_worker_data *cwd;
struct io_wq *wq = wqe->wq;
@@ -138,7 +148,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
fail:
atomic_dec(&acct->nr_running);
io_worker_ref_put(wq);
-@@ -314,7 +322,7 @@ static void io_wqe_dec_running(struct io
+@@ -331,7 +339,7 @@ static void io_wqe_dec_running(struct io
if (atomic_dec_and_test(&acct->nr_running) && io_wqe_run_queue(wqe)) {
atomic_inc(&acct->nr_running);
atomic_inc(&wqe->wq->worker_refs);
@@ -147,7 +157,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
}
}
-@@ -973,12 +981,12 @@ struct io_wq *io_wq_create(unsigned boun
+@@ -992,12 +1000,12 @@ struct io_wq *io_wq_create(unsigned boun
static bool io_task_work_match(struct callback_head *cb, void *data)
{
@@ -163,7 +173,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
}
void io_wq_exit_start(struct io_wq *wq)
-@@ -995,12 +1003,13 @@ static void io_wq_exit_workers(struct io
+@@ -1014,12 +1022,13 @@ static void io_wq_exit_workers(struct io
return;
while ((cb = task_work_cancel_match(wq->task, io_task_work_match, wq)) != NULL) {
diff --git a/patches/0002-io-wq-Don-t-mix-raw_spinlock_irq-spin_lock_irq.patch b/patches/0002-io-wq-Don-t-mix-raw_spinlock_irq-spin_lock_irq.patch
index 4b81fcfcf858..67f36e9fe4ca 100644
--- a/patches/0002-io-wq-Don-t-mix-raw_spinlock_irq-spin_lock_irq.patch
+++ b/patches/0002-io-wq-Don-t-mix-raw_spinlock_irq-spin_lock_irq.patch
@@ -5,12 +5,21 @@ Subject: [PATCH] io-wq: Don't mix raw_spinlock_irq() & spin_lock_irq().
https://lkml.kernel.org/r/7c946918-ae0d-6195-6a78-b019f9bc1fd3@kernel.dk
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
- fs/io-wq.c | 8 ++++----
- 1 file changed, 4 insertions(+), 4 deletions(-)
+ fs/io-wq.c | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
--- a/fs/io-wq.c
+++ b/fs/io-wq.c
-@@ -384,7 +384,7 @@ static void io_wait_on_hash(struct io_wq
+@@ -283,7 +283,7 @@ static void create_worker_cb(struct call
+
+ worker = container_of(cb, struct io_worker, create_work);
+ wqe = worker->wqe;
+- wq = worker->wq;
++ wq = worker->wqe->wq;
+ acct = &wqe->acct[worker->create_index];
+ raw_spin_lock_irq(&wqe->lock);
+ if (acct->nr_workers < acct->max_workers)
+@@ -401,7 +401,7 @@ static void io_wait_on_hash(struct io_wq
{
struct io_wq *wq = wqe->wq;
@@ -19,7 +28,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
if (list_empty(&wqe->wait.entry)) {
__add_wait_queue(&wq->hash->wait, &wqe->wait);
if (!test_bit(hash, &wq->hash->map)) {
-@@ -392,7 +392,7 @@ static void io_wait_on_hash(struct io_wq
+@@ -409,7 +409,7 @@ static void io_wait_on_hash(struct io_wq
list_del_init(&wqe->wait.entry);
}
}
@@ -28,7 +37,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
}
static struct io_wq_work *io_get_next_work(struct io_wqe *wqe)
-@@ -430,9 +430,9 @@ static struct io_wq_work *io_get_next_wo
+@@ -447,9 +447,9 @@ static struct io_wq_work *io_get_next_wo
}
if (stall_hash != -1U) {
diff --git a/patches/Add_localversion_for_-RT_release.patch b/patches/Add_localversion_for_-RT_release.patch
index 7b3d2414e699..e58a29adc4af 100644
--- a/patches/Add_localversion_for_-RT_release.patch
+++ b/patches/Add_localversion_for_-RT_release.patch
@@ -15,4 +15,4 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
--- /dev/null
+++ b/localversion-rt
@@ -0,0 +1 @@
-+-rt6
++-rt7
diff --git a/patches/net_Qdisc__use_a_seqlock_instead_seqcount.patch b/patches/net_Qdisc__use_a_seqlock_instead_seqcount.patch
index 6c410c172804..a0ee4e6fd3da 100644
--- a/patches/net_Qdisc__use_a_seqlock_instead_seqcount.patch
+++ b/patches/net_Qdisc__use_a_seqlock_instead_seqcount.patch
@@ -269,7 +269,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
.gso_skb = {
.next = (struct sk_buff *)&noop_qdisc.gso_skb,
@@ -916,9 +920,15 @@ struct Qdisc *qdisc_alloc(struct netdev_
- lockdep_set_class(&sch->busylock,
+ lockdep_set_class(&sch->seqlock,
dev->qdisc_tx_busylock ?: &qdisc_tx_busylock);
+#ifdef CONFIG_PREEMPT_RT
diff --git a/patches/series b/patches/series
index b0ca0ed108d2..3572a7de294a 100644
--- a/patches/series
+++ b/patches/series
@@ -34,7 +34,6 @@ printk__Enhance_the_condition_check_of_msleep_in_pr_flush.patch
# Need resend
###########################################################################
highmem__Dont_disable_preemption_on_RT_in_kmap_atomic.patch
-timers__Move_clearing_of_base__timer_running_under_base__lock.patch
###########################################################################
# mm bits polished by Mel and Vlastimil
diff --git a/patches/timers__Move_clearing_of_base__timer_running_under_base__lock.patch b/patches/timers__Move_clearing_of_base__timer_running_under_base__lock.patch
deleted file mode 100644
index b3b34a1d3162..000000000000
--- a/patches/timers__Move_clearing_of_base__timer_running_under_base__lock.patch
+++ /dev/null
@@ -1,60 +0,0 @@
-Subject: timers: Move clearing of base::timer_running under base::lock
-From: Thomas Gleixner <tglx@linutronix.de>
-Date: Sun Dec 6 22:40:07 2020 +0100
-
-From: Thomas Gleixner <tglx@linutronix.de>
-
-syzbot reported KCSAN data races vs. timer_base::timer_running being set to
-NULL without holding base::lock in expire_timers().
-
-This looks innocent and most reads are clearly not problematic but for a
-non-RT kernel it's completely irrelevant whether the store happens before
-or after taking the lock. For an RT kernel moving the store under the lock
-requires an extra unlock/lock pair in the case that there is a waiter for
-the timer. But that's not the end of the world and definitely not worth the
-trouble of adding boatloads of comments and annotations to the code. Famous
-last words...
-
-Reported-by: syzbot+aa7c2385d46c5eba0b89@syzkaller.appspotmail.com
-Reported-by: syzbot+abea4558531bae1ba9fe@syzkaller.appspotmail.com
-Link: https://lkml.kernel.org/r/87lfea7gw8.fsf@nanos.tec.linutronix.de
-Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
-Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
-Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
-Cc: stable-rt@vger.kernel.org
-
-
----
- kernel/time/timer.c | 6 ++++--
- 1 file changed, 4 insertions(+), 2 deletions(-)
----
---- a/kernel/time/timer.c
-+++ b/kernel/time/timer.c
-@@ -1265,8 +1265,10 @@ static inline void timer_base_unlock_exp
- static void timer_sync_wait_running(struct timer_base *base)
- {
- if (atomic_read(&base->timer_waiters)) {
-+ raw_spin_unlock_irq(&base->lock);
- spin_unlock(&base->expiry_lock);
- spin_lock(&base->expiry_lock);
-+ raw_spin_lock_irq(&base->lock);
- }
- }
-
-@@ -1457,14 +1459,14 @@ static void expire_timers(struct timer_b
- if (timer->flags & TIMER_IRQSAFE) {
- raw_spin_unlock(&base->lock);
- call_timer_fn(timer, fn, baseclk);
-- base->running_timer = NULL;
- raw_spin_lock(&base->lock);
-+ base->running_timer = NULL;
- } else {
- raw_spin_unlock_irq(&base->lock);
- call_timer_fn(timer, fn, baseclk);
-+ raw_spin_lock_irq(&base->lock);
- base->running_timer = NULL;
- timer_sync_wait_running(base);
-- raw_spin_lock_irq(&base->lock);
- }
- }
- }