ANDROID: softirq: Refine RT defer softirq

Do not defer softirq processing when RT throttling.
Otherwise softirq process would be deferred indefinitely.

Bug: 234597245
Test: Trigger RT Throttling and check RT & softirq behavior
Fixes: "ANDROID: softirq: defer softirq processing to ksoftirqd if CPU is busy with RT"

Signed-off-by: Luke Chang <lukechang@google.com>
Change-Id: I76df270c39ce8c0633b914c3354a27d6e559ec94
(cherry picked from commit e913814ab623277ce87528d2957709f2ad748641)
This commit is contained in:
Luke Chang
2022-06-07 13:35:50 +00:00
committed by Treehugger Robot
parent 25d0badbe3
commit 8d01f8468b

View File

@@ -366,6 +366,7 @@ bool cpupri_check_rt(void)
{
int cpu = raw_smp_processor_id();
return cpu_rq(cpu)->rd->cpupri.cpu_to_pri[cpu] > CPUPRI_NORMAL;
return (cpu_rq(cpu)->rd->cpupri.cpu_to_pri[cpu] > CPUPRI_NORMAL) &&
(cpu_rq(cpu)->rt.rt_throttled == 0);
}
#endif