public inbox for [email protected]
 help / color / mirror / Atom feed
* [PATCH v4 0/2] refactor sqthread cpu binding logic
@ 2021-09-01 12:43 Hao Xu
  2021-09-01 12:43 ` [PATCH 1/2] cpuset: add a helper to check if cpu in cpuset of current task Hao Xu
                   ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: Hao Xu @ 2021-09-01 12:43 UTC (permalink / raw)
  To: Jens Axboe, Zefan Li, Tejun Heo, Johannes Weiner, Pavel Begunkov
  Cc: io-uring, cgroups, Joseph Qi

This patchset is to enhance sqthread cpu binding logic, we didn't
consider cgroup setting before. In container environment, theoretically
sqthread is in its container's task group, it shouldn't occupy cpu out
of its container. Otherwise it may cause some problems, for example:
resource balancer may controll cpu resource allocation by a container's
current cpu usage, here sqthread should be counted in.

v1-->v2
 - add helper to do cpu in current-cpuset test

v2-->v3
 - split it to 2 patches, first as prep one, second as comsumer
 - remove warnning, since cpuset may change anytime, we cannot catch
   all cases, so make the behaviour consistent.

v3-->v4
 - remove sqthread cpu binding helper since the logic is now very simple

Hao Xu (2):
  cpuset: add a helper to check if cpu in cpuset of current task
  io_uring: consider cgroup setting when binding sqpoll cpu

 fs/io_uring.c          | 11 ++++++-----
 include/linux/cpuset.h |  7 +++++++
 kernel/cgroup/cpuset.c | 11 +++++++++++
 3 files changed, 24 insertions(+), 5 deletions(-)

-- 
2.24.4


^ permalink raw reply	[flat|nested] 14+ messages in thread
* [PATCH v3 0/2] refactor sqthread cpu binding logic
@ 2021-09-01 10:18 Hao Xu
  2021-09-01 10:18 ` [PATCH 2/2] io_uring: consider cgroup setting when binding sqpoll cpu Hao Xu
  0 siblings, 1 reply; 14+ messages in thread
From: Hao Xu @ 2021-09-01 10:18 UTC (permalink / raw)
  To: Jens Axboe, Zefan Li, Tejun Heo, Johannes Weiner, Pavel Begunkov
  Cc: io-uring, cgroups, Joseph Qi

This patchset is to enhance sqthread cpu binding logic, we didn't
consider cgroup setting before. In container environment, theoretically
sqthread is in its container's task group, it shouldn't occupy cpu out
of its container. Otherwise it may cause some problems, for example:
resource balancer may controll cpu resource allocation by a container's
current cpu usage, here sqthread should be counted in.

v1-->v2
 - add helper to do cpu in current-cpuset test

v2-->v3
 - split it to 2 patches, first as prep one, second as comsumer
 - remove warnning, since cpuset may change anytime, we cannot catch
   all cases, so make the behaviour consistent.

Hao Xu (2):
  cpuset: add a helper to check if cpu in cpuset of current task
  io_uring: consider cgroup setting when binding sqpoll cpu

 fs/io_uring.c          | 19 ++++++++++++++-----
 include/linux/cpuset.h |  7 +++++++
 kernel/cgroup/cpuset.c | 11 +++++++++++
 3 files changed, 32 insertions(+), 5 deletions(-)

-- 
2.24.4


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

end of thread, other threads:[~2021-09-09 12:40 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-09-01 12:43 [PATCH v4 0/2] refactor sqthread cpu binding logic Hao Xu
2021-09-01 12:43 ` [PATCH 1/2] cpuset: add a helper to check if cpu in cpuset of current task Hao Xu
2021-09-01 12:43 ` [PATCH 2/2] io_uring: consider cgroup setting when binding sqpoll cpu Hao Xu
2021-09-01 16:41   ` Tejun Heo
2021-09-01 16:42     ` Tejun Heo
2021-09-03 15:04     ` Hao Xu
2021-09-07 16:54       ` Tejun Heo
2021-09-07 19:28         ` Hao Xu
2021-09-02 16:48 ` [PATCH v4 0/2] refactor sqthread cpu binding logic Michal Koutný
2021-09-02 18:00   ` Jens Axboe
2021-09-09 12:34     ` Michal Koutný
2021-09-03 14:43   ` Hao Xu
  -- strict thread matches above, loose matches on Subject: below --
2021-09-01 10:18 [PATCH v3 " Hao Xu
2021-09-01 10:18 ` [PATCH 2/2] io_uring: consider cgroup setting when binding sqpoll cpu Hao Xu
2021-09-01 12:31   ` Hao Xu

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