* [PATCH v2] cgroup/cpuset: Remove stale text
@ 2024-12-04 11:04 Costa Shulyupin
2024-12-05 3:24 ` Waiman Long
2024-12-11 6:39 ` Tejun Heo
0 siblings, 2 replies; 3+ messages in thread
From: Costa Shulyupin @ 2024-12-04 11:04 UTC (permalink / raw)
To: Waiman Long, Tejun Heo, Johannes Weiner, Michal Koutný,
cgroups, linux-kernel
Cc: 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.
Co-developed-by: Michal Koutný <mkoutny@suse.com>
Co-developed-by: Waiman Long <longman@redhat.com>
Signed-off-by: Costa Shulyupin <costa.shul@redhat.com>
---
v2: Address comments
---
kernel/cgroup/cpuset.c | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/kernel/cgroup/cpuset.c b/kernel/cgroup/cpuset.c
index d5d2b4036314..ee62207fee9f 100644
--- a/kernel/cgroup/cpuset.c
+++ b/kernel/cgroup/cpuset.c
@@ -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);
--
2.47.0
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2] cgroup/cpuset: Remove stale text
2024-12-04 11:04 [PATCH v2] cgroup/cpuset: Remove stale text Costa Shulyupin
@ 2024-12-05 3:24 ` Waiman Long
2024-12-11 6:39 ` Tejun Heo
1 sibling, 0 replies; 3+ messages in thread
From: Waiman Long @ 2024-12-05 3:24 UTC (permalink / raw)
To: Costa Shulyupin, Tejun Heo, Johannes Weiner, Michal Koutný,
cgroups, linux-kernel
On 12/4/24 6:04 AM, Costa Shulyupin wrote:
> 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.
>
> Co-developed-by: Michal Koutný <mkoutny@suse.com>
> Co-developed-by: Waiman Long <longman@redhat.com>
> Signed-off-by: Costa Shulyupin <costa.shul@redhat.com>
>
> ---
> v2: Address comments
>
> ---
> kernel/cgroup/cpuset.c | 9 ++-------
> 1 file changed, 2 insertions(+), 7 deletions(-)
>
> diff --git a/kernel/cgroup/cpuset.c b/kernel/cgroup/cpuset.c
> index d5d2b4036314..ee62207fee9f 100644
> --- a/kernel/cgroup/cpuset.c
> +++ b/kernel/cgroup/cpuset.c
> @@ -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);
LGTM
Acked-by: Waiman Long <longman@redhat.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2] cgroup/cpuset: Remove stale text
2024-12-04 11:04 [PATCH v2] cgroup/cpuset: Remove stale text Costa Shulyupin
2024-12-05 3:24 ` Waiman Long
@ 2024-12-11 6:39 ` Tejun Heo
1 sibling, 0 replies; 3+ messages in thread
From: Tejun Heo @ 2024-12-11 6:39 UTC (permalink / raw)
To: Costa Shulyupin
Cc: Waiman Long, Johannes Weiner, Michal Koutný, cgroups, linux-kernel
On Wed, Dec 04, 2024 at 01:04:41PM +0200, Costa Shulyupin wrote:
> 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.
>
> Co-developed-by: Michal Koutný <mkoutny@suse.com>
> Co-developed-by: Waiman Long <longman@redhat.com>
> Signed-off-by: Costa Shulyupin <costa.shul@redhat.com>
Applied to cgroup/for-6.13-fixes.
Thanks.
--
tejun
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-12-11 6:39 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-12-04 11:04 [PATCH v2] cgroup/cpuset: Remove stale text Costa Shulyupin
2024-12-05 3:24 ` Waiman Long
2024-12-11 6:39 ` Tejun Heo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®