Skip to contentSkip to conversation

Cpuset: remove unnecessary NULL check comment fix

PATCH In review Paul Jackson 2 participants 3 messages Mar 19, 2006

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Cpuset: remove unnecessary NULL check comment fix

From: Paul Jackson <[email protected]>

Make the comments referring to the (ab)use of the top_cpuset during a tasks exit more explicit - hopefully clearer. This is now called "the_top_cpuset_hack", instead of the "Hack."

---

Andrew - this goes right after "cpuset-remove-unnecessary-NULL-check".

 kernel/cpuset.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)
kernel/cpuset.c +5 -4
@@ -2023,7 +2023,7 @@ void cpuset_fork(struct task_struct *chi
  * because tsk is already marked PF_EXITING, so attach_task() won't
  * mess with it, or task is a failed fork, never visible to attach_task.
  *
- * Hack:
+ * the_top_cpuset_hack:
  *
  *    Set the exiting tasks cpuset to the root cpuset (top_cpuset).
  *
@@ -2062,7 +2062,7 @@ void cpuset_exit(struct task_struct *tsk
 	struct cpuset *cs;
 
 	cs = tsk->cpuset;
-	tsk->cpuset = &top_cpuset;	/* Hack - see comment above */
+	tsk->cpuset = &top_cpuset;	/* the_top_cpuset_hack - see above */
 
 	if (notify_on_release(cs)) {
 		char *pathbuf = NULL;
@@ -2375,8 +2375,9 @@ void __cpuset_memory_pressure_bump(void)
  *  - No need to task_lock(tsk) on this tsk->cpuset reference, as it
  *    doesn't really matter if tsk->cpuset changes after we read it,
  *    and we take manage_mutex, keeping attach_task() from changing it
- *    anyway.  No need to check that tsk->cpuset != NULL, thanks to the
- *    cpuset_exit() Hack.
+ *    anyway.  No need to check that tsk->cpuset != NULL, thanks to
+ *    the_top_cpuset_hack in cpuset_exit(), which sets an exiting tasks
+ *    cpuset to top_cpuset.
  */
 
 static int proc_cpuset_show(struct seq_file *m, void *v)
Signature · 3 lines
                          I won't rest till it's the best ...
                          Programmer, Linux Scalability
                          Paul Jackson <[email protected]> 1.650.933.1373
#1 lore raw
Quoted 5 lines · Paul Jackson

From: Paul Jackson <[email protected]>

Make the comments referring to the (ab)use of the top_cpuset during a tasks exit more explicit - hopefully clearer. This is now called "the_top_cpuset_hack", instead of the "Hack."

Ok. Incremental patch that fixes comments. Thanks this looks less confusing to me.

Eric

#2 lore raw
Quoted 2 lines · Eric

Ok. Incremental patch that fixes comments. Thanks this looks less confusing to me.

Good. Thanks for the review. Glad it helps.

Signature · 3 lines
                  I won't rest till it's the best ...
                  Programmer, Linux Scalability
                  Paul Jackson <[email protected]> 1.925.600.0401