Revert "ANDROID: softirq: defer softirq processing to ksoftirqd if CPU is busy with RT"
This reverts commit 0578248bed as the
softirq code is rewritten in 5.11-rc1 and massive merge conflicts are
happening.
If this change is still needed, please work with upstream to get the
patches accepted so they can then come into this tree automatically.
Bug: 168521633
Cc: Pavankumar Kondeti <pkondeti@codeaurora.org>
Cc: Satya Durga Srinivasu Prabhala <satyap@codeaurora.org>
Cc: J. Avila <elavila@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I421cc2ca29b635d7ac39d52aa486e20cbdd8ca45
This commit is contained in:
@@ -262,16 +262,6 @@ static inline bool lockdep_softirq_start(void) { return false; }
|
||||
static inline void lockdep_softirq_end(bool in_hardirq) { }
|
||||
#endif
|
||||
|
||||
#define softirq_deferred_for_rt(pending) \
|
||||
({ \
|
||||
__u32 deferred = 0; \
|
||||
if (cpupri_check_rt()) { \
|
||||
deferred = pending & LONG_SOFTIRQ_MASK; \
|
||||
pending &= ~LONG_SOFTIRQ_MASK; \
|
||||
} \
|
||||
deferred; \
|
||||
})
|
||||
|
||||
asmlinkage __visible void __softirq_entry __do_softirq(void)
|
||||
{
|
||||
unsigned long end = jiffies + MAX_SOFTIRQ_TIME;
|
||||
@@ -279,7 +269,6 @@ asmlinkage __visible void __softirq_entry __do_softirq(void)
|
||||
int max_restart = MAX_SOFTIRQ_RESTART;
|
||||
struct softirq_action *h;
|
||||
bool in_hardirq;
|
||||
__u32 deferred;
|
||||
__u32 pending;
|
||||
int softirq_bit;
|
||||
|
||||
@@ -291,14 +280,14 @@ asmlinkage __visible void __softirq_entry __do_softirq(void)
|
||||
current->flags &= ~PF_MEMALLOC;
|
||||
|
||||
pending = local_softirq_pending();
|
||||
deferred = softirq_deferred_for_rt(pending);
|
||||
account_irq_enter_time(current);
|
||||
|
||||
__local_bh_disable_ip(_RET_IP_, SOFTIRQ_OFFSET);
|
||||
in_hardirq = lockdep_softirq_start();
|
||||
|
||||
restart:
|
||||
/* Reset the pending bitmask before enabling irqs */
|
||||
set_softirq_pending(deferred);
|
||||
set_softirq_pending(0);
|
||||
__this_cpu_write(active_softirqs, pending);
|
||||
|
||||
local_irq_enable();
|
||||
@@ -335,18 +324,14 @@ restart:
|
||||
local_irq_disable();
|
||||
|
||||
pending = local_softirq_pending();
|
||||
deferred = softirq_deferred_for_rt(pending);
|
||||
|
||||
if (pending) {
|
||||
if (time_before(jiffies, end) && !need_resched() &&
|
||||
--max_restart)
|
||||
goto restart;
|
||||
|
||||
wakeup_softirqd();
|
||||
}
|
||||
|
||||
#ifdef CONFIG_RT_SOFTINT_OPTIMIZATION
|
||||
if (pending | deferred)
|
||||
wakeup_softirqd();
|
||||
#endif
|
||||
lockdep_softirq_end(in_hardirq);
|
||||
account_irq_exit_time(current);
|
||||
__local_bh_enable(SOFTIRQ_OFFSET);
|
||||
|
||||
Reference in New Issue
Block a user