Revert "Revert "ANDROID: Revert "softirq: Let ksoftirqd do its job"""
This reverts commit c646ea5a5f
, as the
merge conflicts have been resolved.
Bug: 168521633
Change-Id: Ide895e808fd0786b6690334d62d250f73584508e
Signed-off-by: Lingutla Chandrasekhar <clingutla@codeaurora.org>
[satyap@codeaurora.org: Fix trivial merge conflicts]
Signed-off-by: Satya Durga Srinivasu Prabhala <satyap@codeaurora.org>
[elavila: Port to mainline]
Signed-off-by: J. Avila <elavila@google.com>
Signed-off-by: Shaleen Agrawal <shalagra@codeaurora.org>
This commit is contained in:
parent
bdfce9c8c5
commit
0e25c12f4e
@ -90,19 +90,6 @@ static void wakeup_softirqd(void)
|
||||
wake_up_process(tsk);
|
||||
}
|
||||
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
static bool ksoftirqd_running(void)
|
||||
{
|
||||
struct task_struct *tsk = __this_cpu_read(ksoftirqd);
|
||||
|
||||
if (pending & SOFTIRQ_NOW_MASK)
|
||||
return false;
|
||||
return tsk && task_is_running(tsk) && !__kthread_should_park(tsk);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_TRACE_IRQFLAGS
|
||||
DEFINE_PER_CPU(int, hardirqs_enabled);
|
||||
DEFINE_PER_CPU(int, hardirq_context);
|
||||
@ -244,7 +231,7 @@ void __local_bh_enable_ip(unsigned long ip, unsigned int cnt)
|
||||
goto out;
|
||||
|
||||
pending = local_softirq_pending();
|
||||
if (!pending || ksoftirqd_running())
|
||||
if (!pending)
|
||||
goto out;
|
||||
|
||||
/*
|
||||
@ -427,9 +414,6 @@ static inline bool should_wake_ksoftirqd(void)
|
||||
|
||||
static inline void invoke_softirq(void)
|
||||
{
|
||||
if (ksoftirqd_running())
|
||||
return;
|
||||
|
||||
if (!force_irqthreads() || !__this_cpu_read(ksoftirqd)) {
|
||||
#ifdef CONFIG_HAVE_IRQ_EXIT_ON_IRQ_STACK
|
||||
/*
|
||||
@ -463,7 +447,7 @@ asmlinkage __visible void do_softirq(void)
|
||||
|
||||
pending = local_softirq_pending();
|
||||
|
||||
if (pending && !ksoftirqd_running())
|
||||
if (pending)
|
||||
do_softirq_own_stack();
|
||||
|
||||
local_irq_restore(flags);
|
||||
|
Loading…
Reference in New Issue
Block a user