Skip to contentSkip to conversation

cgroup/cpuset: Remove stale text

PATCH Applied Costa Shulyupin 3 participants 3 messages Dec 4, 2024 – Dec 11, 2024

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 cgroup/cpuset: Remove stale text

Task's cpuset pointer was removed by
commit 8793d854edbc ("Task Control Groups: make cpusets a client of cgroups")

Paragraph "The task_lock() exception ...." was removed by commit 2df167a300d7 ("cgroups: update comments in cpuset.c")

Remove stale text:

We also require taking task_lock() when dereferencing a
task's cpuset pointer. See "The task_lock() exception", at the end of this comment.

Accessing a task's cpuset should be done in accordance with the guidelines for accessing subsystem state in kernel/cgroup.c

and reformat.

---
v2: Address comments

---
 kernel/cgroup/cpuset.c | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)
kernel/cgroup/cpuset.c +2 -7
index d5d2b4036314..ee62207fee9f 100644
@@ -207,10 +207,8 @@ static struct cpuset top_cpuset = {
 
 /*
  * There are two global locks guarding cpuset structures - cpuset_mutex and
- * callback_lock. We also require taking task_lock() when dereferencing a
- * task's cpuset pointer. See "The task_lock() exception", at the end of this
- * comment.  The cpuset code uses only cpuset_mutex. Other kernel subsystems
- * can use cpuset_lock()/cpuset_unlock() to prevent change to cpuset
+ * callback_lock. The cpuset code uses only cpuset_mutex. Other kernel
+ * subsystems can use cpuset_lock()/cpuset_unlock() to prevent change to cpuset
  * structures. Note that cpuset_mutex needs to be a mutex as it is used in
  * paths that rely on priority inheritance (e.g. scheduler - on RT) for
  * correctness.
@@ -239,9 +237,6 @@ static struct cpuset top_cpuset = {
  * The cpuset_common_seq_show() handlers only hold callback_lock across
  * small pieces of code, such as when reading out possibly multi-word
  * cpumasks and nodemasks.
- *
- * Accessing a task's cpuset should be done in accordance with the
- * guidelines for accessing subsystem state in kernel/cgroup.c
  */
 
 static DEFINE_MUTEX(cpuset_mutex);
Signature · 1 line
2.47.0
Acked-by on v2 1/1
#1 lore raw
Quoted 46 lines · Costa Shulyupin

Task's cpuset pointer was removed by
commit 8793d854edbc ("Task Control Groups: make cpusets a client of cgroups")

Paragraph "The task_lock() exception ...." was removed by commit 2df167a300d7 ("cgroups: update comments in cpuset.c")

Remove stale text:

We also require taking task_lock() when dereferencing a
task's cpuset pointer. See "The task_lock() exception", at the end of this comment.

Accessing a task's cpuset should be done in accordance with the guidelines for accessing subsystem state in kernel/cgroup.c

and reformat.

---
v2: Address comments

---
  kernel/cgroup/cpuset.c | 9 ++-------
  1 file changed, 2 insertions(+), 7 deletions(-)
kernel/cgroup/cpuset.c +2 -4
index d5d2b4036314..ee62207fee9f 100644
@@ -207,10 +207,8 @@ static struct cpuset top_cpuset = {
 
  /*
   * There are two global locks guarding cpuset structures - cpuset_mutex and
- * callback_lock. We also require taking task_lock() when dereferencing a
- * task's cpuset pointer. See "The task_lock() exception", at the end of this
- * comment.  The cpuset code uses only cpuset_mutex. Other kernel subsystems
- * can use cpuset_lock()/cpuset_unlock() to prevent change to cpuset
+ * callback_lock. The cpuset code uses only cpuset_mutex. Other kernel
+ * subsystems can use cpuset_lock()/cpuset_unlock() to prevent change to cpuset
   * structures. Note that cpuset_mutex needs to be a mutex as it is used in
   * paths that rely on priority inheritance (e.g. scheduler - on RT) for
   * correctness.

kernel/cgroup/cpuset.c static struct cpuset top_cpuset = { · line 242

Quoted 9 lines
kernel/cgroup/cpuset.c +0 -3
@@ -239,9 +237,6 @@ static struct cpuset top_cpuset = {
   * The cpuset_common_seq_show() handlers only hold callback_lock across
   * small pieces of code, such as when reading out possibly multi-word
   * cpumasks and nodemasks.
- *
- * Accessing a task's cpuset should be done in accordance with the
- * guidelines for accessing subsystem state in kernel/cgroup.c
   */
 
  static DEFINE_MUTEX(cpuset_mutex);

LGTM

maintainer Applied
#2 lore raw
In reply to Costa Shulyupin
Quoted 12 lines · Costa Shulyupin

Task's cpuset pointer was removed by
commit 8793d854edbc ("Task Control Groups: make cpusets a client of cgroups")

Paragraph "The task_lock() exception ...." was removed by commit 2df167a300d7 ("cgroups: update comments in cpuset.c")

Remove stale text:

We also require taking task_lock() when dereferencing a
task's cpuset pointer. See "The task_lock() exception", at the end of this comment.

Quoted 8 lines

Accessing a task's cpuset should be done in accordance with the guidelines for accessing subsystem state in kernel/cgroup.c

and reformat.

Applied to cgroup/for-6.13-fixes.

Thanks.

Signature · 1 line
tejun