public inbox for cgroups@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/2] sched, cgroup/cpuset: Keep user set cpus affinity
@ 2022-08-01 15:41 Waiman Long
       [not found] ` <20220801154124.2011987-1-longman-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
  0 siblings, 1 reply; 7+ messages in thread
From: Waiman Long @ 2022-08-01 15:41 UTC (permalink / raw)
  To: Ingo Molnar, Peter Zijlstra, Juri Lelli, Vincent Guittot,
	Dietmar Eggemann, Steven Rostedt, Ben Segall, Mel Gorman,
	Daniel Bristot de Oliveira, Valentin Schneider, Tejun Heo,
	Zefan Li, Johannes Weiner, Will Deacon
  Cc: cgroups-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA, Waiman Long

v2:
 - Rework the v1 patch by extending the semantics of user_cpus_ptr to
   store user set cpus affinity and keeping to it as much as possible.

The user_cpus_ptr field is added by commit b90ca8badbd1 ("sched:
Introduce task_struct::user_cpus_ptr to track requested affinity")
which uses it narrowly to allow keeping cpus affinity intact with
asymmetric cpu setup.

This patchset extends user_cpus_ptr to store user set cpus affinity
via sched_setaffinity() API. With that information avaiable, it will
enable cpuset to keep cpus afinity as close to what the user wants as
possible within the cpu list constraint of the current cpuset.

Waiman Long (2):
  sched: Use user_cpus_ptr for saving user provided cpumask in
    sched_setaffinity()
  cgroup/cpuset: Keep user set cpus affinity

 include/linux/sched.h  |  1 +
 kernel/cgroup/cpuset.c | 24 ++++++++++++--
 kernel/sched/core.c    | 71 ++++++++++++++++++++++++++++++------------
 kernel/sched/sched.h   |  1 -
 4 files changed, 74 insertions(+), 23 deletions(-)

-- 
2.31.1


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-08-09 20:15 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-01 15:41 [PATCH v2 0/2] sched, cgroup/cpuset: Keep user set cpus affinity Waiman Long
     [not found] ` <20220801154124.2011987-1-longman-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2022-08-01 15:41   ` [PATCH v2 1/2] sched: Use user_cpus_ptr for saving user provided cpumask in sched_setaffinity() Waiman Long
     [not found]     ` <20220801154124.2011987-2-longman-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2022-08-01 16:45       ` Will Deacon
2022-08-01 17:15         ` Waiman Long
2022-08-01 15:41   ` [PATCH v2 2/2] cgroup/cpuset: Keep user set cpus affinity Waiman Long
     [not found]     ` <20220801154124.2011987-3-longman-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2022-08-09 19:55       ` Tejun Heo
     [not found]         ` <YvK7qVkmzbA12Eut-NiLfg/pYEd1N0TnZuCh8vA@public.gmane.org>
2022-08-09 20:15           ` Waiman Long

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox