mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-25 00:11:13 +00:00
12f12df569
Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.55 Added the following default ksym to target/linux/generic/config-6.6: CONFIG_PROC_MEM_ALWAYS_FORCE=y # CONFIG_PROC_MEM_FORCE_PTRACE is not set # CONFIG_PROC_MEM_NO_FORCE is not set Removed upstreamed: generic/backport-6.6/780-23-v6.12-r8169-Fix-spelling-mistake-tx_underun-tx_underrun.patch[1] generic/backport-6.6/780-25-v6.12-r8169-add-tally-counter-fields-added-with-RTL8125.patch[2] generic/pending-6.6/684-gso-fix-gso-fraglist-segmentation-after-pull-from-fr.patch[3] lantiq/patches-6.6/0025-v6.12-net-ethernet-lantiq_etop-fix-memory-disclosure.patch[4] Manually rebased: bcm27xx/patches-6.6/950-0086-Main-bcm2708-bcm2709-linux-port.patch bcm27xx/patches-6.6/950-0998-i2c-designware-Add-support-for-bus-clear-feature.patch All other patches automatically rebased. 1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.56&id=f02fcb7283b1c25f7e3ae07d7a2c830e06eb1a62 2. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.56&id=1c723d785adb711496bc64c24240f952f4faaabf 3. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.56&id=af3122f5fdc0d00581d6e598a668df6bf54c9daa 4. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.56&id=e66e38d07b31e177ca430758ed97fbc79f27d966 Build system: x86/64 Build-tested: x86/64/AMD Cezanne, flogic/xiaomi_redmi-router-ax6000-ubootmod, ramips/tplink_archer-a6-v3 Run-tested: x86/64/AMD Cezanne, flogic/xiaomi_redmi-router-ax6000-ubootmod, ramips/tplink_archer-a6-v3 Signed-off-by: John Audia <therealgraysky@proton.me> Link: https://github.com/openwrt/openwrt/pull/16655 Signed-off-by: Nick Hainke <vincent@systemli.org>
76 lines
2.7 KiB
Diff
76 lines
2.7 KiB
Diff
From 56364c910691f6d10ba88c964c9041b9ab777bd6 Mon Sep 17 00:00:00 2001
|
|
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
|
Date: Mon, 25 Mar 2024 08:40:28 +0100
|
|
Subject: [PATCH 1/4] net: Remove conditional threaded-NAPI wakeup based on
|
|
task state.
|
|
|
|
A NAPI thread is scheduled by first setting NAPI_STATE_SCHED bit. If
|
|
successful (the bit was not yet set) then the NAPI_STATE_SCHED_THREADED
|
|
is set but only if thread's state is not TASK_INTERRUPTIBLE (is
|
|
TASK_RUNNING) followed by task wakeup.
|
|
|
|
If the task is idle (TASK_INTERRUPTIBLE) then the
|
|
NAPI_STATE_SCHED_THREADED bit is not set. The thread is no relying on
|
|
the bit but always leaving the wait-loop after returning from schedule()
|
|
because there must have been a wakeup.
|
|
|
|
The smpboot-threads implementation for per-CPU threads requires an
|
|
explicit condition and does not support "if we get out of schedule()
|
|
then there must be something to do".
|
|
|
|
Removing this optimisation simplifies the following integration.
|
|
|
|
Set NAPI_STATE_SCHED_THREADED unconditionally on wakeup and rely on it
|
|
in the wait path by removing the `woken' condition.
|
|
|
|
Acked-by: Jakub Kicinski <kuba@kernel.org>
|
|
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
|
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
|
---
|
|
net/core/dev.c | 14 ++------------
|
|
1 file changed, 2 insertions(+), 12 deletions(-)
|
|
|
|
--- a/net/core/dev.c
|
|
+++ b/net/core/dev.c
|
|
@@ -4477,13 +4477,7 @@ static inline void ____napi_schedule(str
|
|
*/
|
|
thread = READ_ONCE(napi->thread);
|
|
if (thread) {
|
|
- /* Avoid doing set_bit() if the thread is in
|
|
- * INTERRUPTIBLE state, cause napi_thread_wait()
|
|
- * makes sure to proceed with napi polling
|
|
- * if the thread is explicitly woken from here.
|
|
- */
|
|
- if (READ_ONCE(thread->__state) != TASK_INTERRUPTIBLE)
|
|
- set_bit(NAPI_STATE_SCHED_THREADED, &napi->state);
|
|
+ set_bit(NAPI_STATE_SCHED_THREADED, &napi->state);
|
|
wake_up_process(thread);
|
|
return;
|
|
}
|
|
@@ -6639,8 +6633,6 @@ static int napi_poll(struct napi_struct
|
|
|
|
static int napi_thread_wait(struct napi_struct *napi)
|
|
{
|
|
- bool woken = false;
|
|
-
|
|
set_current_state(TASK_INTERRUPTIBLE);
|
|
|
|
while (!kthread_should_stop()) {
|
|
@@ -6649,15 +6641,13 @@ static int napi_thread_wait(struct napi_
|
|
* Testing SCHED bit is not enough because SCHED bit might be
|
|
* set by some other busy poll thread or by napi_disable().
|
|
*/
|
|
- if (test_bit(NAPI_STATE_SCHED_THREADED, &napi->state) || woken) {
|
|
+ if (test_bit(NAPI_STATE_SCHED_THREADED, &napi->state)) {
|
|
WARN_ON(!list_empty(&napi->poll_list));
|
|
__set_current_state(TASK_RUNNING);
|
|
return 0;
|
|
}
|
|
|
|
schedule();
|
|
- /* woken being true indicates this thread owns this napi. */
|
|
- woken = true;
|
|
set_current_state(TASK_INTERRUPTIBLE);
|
|
}
|
|
__set_current_state(TASK_RUNNING);
|