lkml.org 
[lkml]   [2022]   [Nov]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] sched/rt: Use cpu_active_mask to prevent rto_push_irq_work's dead loop
On Fri, 18 Nov 2022 20:08:54 +0800
Xuewen Yan <xuewen.yan94@gmail.com> wrote:

> Let's consider this scenario:
> the online_cpu_mask is 0x03(cpu0/1),the active_cpu_mask is
> 0x01(cpu0),the rto cpu is cpu0,
> the rto_mask is 0x01, and the irq cpu is cpu0, as a result, the first
> loop, the rto_cpu would be -1,
> but the loop < rto_loop_next, on next loop, because of the rto_cpu is
> -1, so the next rto cpu would
> be cpu0 still, as a result, the cpu0 would push rt tasks to
> cpu1(inactive cpu) while running in the irq_work.
>
> So we should judge whether the current cpu(the only one active cpu) is
> the next loop's cpu.

Wait, I'm confused by what you are trying to do here.

The rto_next_cpu() only sends an IPI to the next CPU that has more than
one RT task queued on it, where the RT tasks can migrate.

If we send CPU0 an IPI, let CPU0 figure out to only push to the active
mask. Why are trying to prevent sending the IPI to an active CPU?

Will the first part of your patch that modifies the cpupri() not keep
it from pushing to the non active CPU?

-- Steve

\
 
 \ /
  Last update: 2022-11-20 20:28    [W:0.180 / U:0.060 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site