Skip to contentSkip to conversation

sched/rt: Decrease number of calls of push_rt_task() in push_rt_tasks()

PATCH Kirill Tkhai 2 participants 2 messages Feb 5, 2013

lore
Share & tools
lore
#0 lore raw
Quoted 21 lines · Kirill Tkhai
Quoted 18 lines

31.01.2013, 20:08, "Steven Rostedt" <[email protected]>:

Quoted 5 lines · Kirill Tkhai
Quoted 4 lines

The patch aims to decrease the number of calls of push_rt_task() in push_rt_tasks().

Quoted 7 lines
Quoted 4 lines

It's not necessary to push more than 'num_online_cpus() - 1' tasks. If just pushed task doesn't leave its new CPU during our local call of push_rt_tasks() than we won't push another task to the CPU. If it leave or change priority than it will pull new task by itself.

I'm curious. Have you hit situations where this was an issue? Or was this just discovered by code review?

No, I did't hit this situation. It's impossible to hook every situation.

Quoted 7 lines
Quoted 3 lines

Thanks for your explanation.

Kirill

Suppose we have a large number of cpus(say 4096), with the last one running a low-priority task on it. Is it possible with this patch we will never reach the last cpu in case that previous cpu has complete the pulled task?

Yes. But this patch is about several pushable tasks on the same cpu.

Kirill

--

#1 lore raw
Quoted 9 lines · Kirill Tkhai
Quoted 4 lines

Suppose we have a large number of cpus(say 4096), with the last one running a low-priority task on it. Is it possible with this patch we will never reach the last cpu in case that previous cpu has complete the pulled task?

Yes. But this patch is about several pushable tasks on the same cpu.

Kirill

Maybe I haven't make myself understood, but in that case, there will be a higher-priority task in the runqueue of the pushing cpu, and a lower-priority task running in the last cpu which could not be preempt by push_rt_task(), I don't think it's acceptable.

Hans