[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <fe14905b3ba8501d0120c29483fc2780a2b86517.camel@marvell.com>
Date: Wed, 4 Mar 2020 16:13:32 +0000
From: Alex Belits <abelits@...vell.com>
To: "frederic@...nel.org" <frederic@...nel.org>,
"rostedt@...dmis.org" <rostedt@...dmis.org>
CC: "mingo@...nel.org" <mingo@...nel.org>,
"peterz@...radead.org" <peterz@...radead.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Prasun Kapoor <pkapoor@...vell.com>,
"tglx@...utronix.de" <tglx@...utronix.de>,
"linux-api@...r.kernel.org" <linux-api@...r.kernel.org>,
"linux-mm@...r.kernel.org" <linux-mm@...r.kernel.org>,
"linux-arch@...r.kernel.org" <linux-arch@...r.kernel.org>
Subject: [PATCH 09/12] task_isolation: net: don't flush backlog on CPUs
running isolated tasks
From: Yuri Norov <ynorov@...vell.com>
If CPU runs isolated task, there's no any backlog on it, and
so we don't need to flush it. Currently flush_all_backlogs()
enqueues corresponding work on all CPUs including ones that run
isolated tasks. It leads to breaking task isolation for nothing.
In this patch, backlog flushing is enqueued only on non-isolated CPUs.
Signed-off-by: Alex Belits <abelits@...vell.com>
---
net/core/dev.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/net/core/dev.c b/net/core/dev.c
index c6c985fe7b1b..6d32abb1f06d 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -74,6 +74,7 @@
#include <linux/cpu.h>
#include <linux/types.h>
#include <linux/kernel.h>
+#include <linux/isolation.h>
#include <linux/hash.h>
#include <linux/slab.h>
#include <linux/sched.h>
@@ -5518,9 +5519,12 @@ static void flush_all_backlogs(void)
get_online_cpus();
- for_each_online_cpu(cpu)
+ for_each_online_cpu(cpu) {
+ if (task_isolation_on_cpu(cpu))
+ continue;
queue_work_on(cpu, system_highpri_wq,
per_cpu_ptr(&flush_works, cpu));
+ }
for_each_online_cpu(cpu)
flush_work(per_cpu_ptr(&flush_works, cpu));
--
2.20.1
Powered by blists - more mailing lists