From bdfce9c8c534c020794a4764d26fd9f0db2dd2e6 Mon Sep 17 00:00:00 2001 From: Satya Durga Srinivasu Prabhala Date: Tue, 8 Jan 2019 15:38:32 -0800 Subject: [PATCH] Revert "Revert "ANDROID: Revert "Mark HI and TASKLET softirq synchronous""" This reverts commit d6592588edada6ae0430d320c8e129e5389d1aaa, as the merge conflicts have been resolved. Bug: 168521633 Change-Id: Ic967977b4d409ea9103ff4ec5d4fa6709fa8146d Signed-off-by: Satya Durga Srinivasu Prabhala [elavila: port to mainline, resolve conflicts, add commit text] Signed-off-by: J. Avila [ashayj@codeaurora.org: resolve conflicts] Signed-off-by: Ashay Jaiswal Signed-off-by: Shaleen Agrawal --- kernel/softirq.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/kernel/softirq.c b/kernel/softirq.c index f45fed9fbd57..a0fd37ba67f1 100644 --- a/kernel/softirq.c +++ b/kernel/softirq.c @@ -92,11 +92,9 @@ static void wakeup_softirqd(void) /* * If ksoftirqd is scheduled, we do not want to process pending softirqs - * right now. Let ksoftirqd handle this at its own rate, to get fairness, - * unless we're doing some of the synchronous softirqs. ++ * right now. Let ksoftirqd handle this at its own rate, to get fairness. */ -#define SOFTIRQ_NOW_MASK ((1 << HI_SOFTIRQ) | (1 << TASKLET_SOFTIRQ)) -static bool ksoftirqd_running(unsigned long pending) +static bool ksoftirqd_running(void) { struct task_struct *tsk = __this_cpu_read(ksoftirqd); @@ -246,7 +244,7 @@ void __local_bh_enable_ip(unsigned long ip, unsigned int cnt) goto out; pending = local_softirq_pending(); - if (!pending || ksoftirqd_running(pending)) + if (!pending || ksoftirqd_running()) goto out; /* @@ -429,7 +427,7 @@ static inline bool should_wake_ksoftirqd(void) static inline void invoke_softirq(void) { - if (ksoftirqd_running(local_softirq_pending())) + if (ksoftirqd_running()) return; if (!force_irqthreads() || !__this_cpu_read(ksoftirqd)) { @@ -465,7 +463,7 @@ asmlinkage __visible void do_softirq(void) pending = local_softirq_pending(); - if (pending && !ksoftirqd_running(pending)) + if (pending && !ksoftirqd_running()) do_softirq_own_stack(); local_irq_restore(flags);