All of lore.kernel.org
 help / color / mirror / Atom feed
* How can I make cgroup cpu quota and task priority work together without cpuset?
@ 2022-10-26 10:29 王志强
  0 siblings, 0 replies; only message in thread
From: 王志强 @ 2022-10-26 10:29 UTC (permalink / raw)
  To: linux-kernel


Hi~!


I am not sure whether this has been raised before:
I have two tasks with different priorities, and I set those two task into
 a cpu cgroup with cpu_quota equal to cpu_period, hence the two tasks 
would only use up 1 cpu core at most,  and the node has multi-cores.
But it turn out cpu cgroup dose not take process priority into 
consideration, what I got is that when the task with higher priority 
need cpu resources, it would only take 50% if the task with lower 
priority is scheduled on another cpu, while the expectation would be >90%.
The problem could be solved if I assign a cpu core statically to those two tasks via cpuset cgroup.....
Is there other solution for this?  

If those two tasks would be scheduled on same cpu anytime, not necessarily
 on the same cpu during each scheduling period, it would be enough.
I tried PR_SCHED_CORE prctl, but no luck.


I think this issue is typical when moving from VM to container,  an API 
in kernel which would bind a group of task together during scheduling 
would be nice, or better if cpu cgroup could take priority into account?




Thanks
David

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-10-26 10:30 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-26 10:29 How can I make cgroup cpu quota and task priority work together without cpuset? 王志强

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.