Skip to contentSkip to conversation

sched/headers: Clean up <linux/sched.h>

PATCH-next New Christopher Diaz Riveros 4 participants 9 messages Feb 15, 2018 – Feb 21, 2018

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

Trivial clean up making comments fit in 80 columns and keeping the same comment style.

---
 include/linux/sched.h | 54 +++++++++++++++++++++++++++++++++------------------
 1 file changed, 35 insertions(+), 19 deletions(-)
include/linux/sched.h +35 -19
index b161ef8a902e..c752a0d48944 100644
@@ -183,7 +183,7 @@ extern void io_schedule_finish(int token);
 extern long io_schedule_timeout(long timeout);
 extern void io_schedule(void);
 
-/**
+/*
  * struct prev_cputime - snapshot of system and user cputime
  * @utime: time spent in user mode
  * @stime: time spent in system mode
@@ -200,7 +200,7 @@ struct prev_cputime {
 #endif
 };
 
-/**
+/*
  * struct task_cputime - collected CPU time counts
  * @utime:		time spent in user mode, in nanoseconds
  * @stime:		time spent in kernel mode, in nanoseconds
@@ -437,20 +437,28 @@ struct sched_dl_entity {
 	 * during sched_setattr(), they will remain the same until
 	 * the next sched_setattr().
 	 */
-	u64				dl_runtime;	/* Maximum runtime for each instance	*/
-	u64				dl_deadline;	/* Relative deadline of each instance	*/
-	u64				dl_period;	/* Separation of two instances (period) */
-	u64				dl_bw;		/* dl_runtime / dl_period		*/
-	u64				dl_density;	/* dl_runtime / dl_deadline		*/
+	/* Maximum runtime for each instance	*/
+	u64				dl_runtime;
+	/* Relative deadline of each instance	*/
+	u64				dl_deadline;
+	/* Separation of two instances (period) */
+	u64				dl_period;
+	/* dl_runtime / dl_period		*/
+	u64				dl_bw;
+	/* dl_runtime / dl_deadline		*/
+	u64				dl_density;
 
 	/*
 	 * Actual scheduling parameters. Initialized with the values above,
 	 * they are continously updated during task execution. Note that
 	 * the remaining runtime could be < 0 in case we are in overrun.
 	 */
-	s64				runtime;	/* Remaining runtime for this instance	*/
-	u64				deadline;	/* Absolute deadline for this instance	*/
-	unsigned int			flags;		/* Specifying the scheduler behaviour	*/
+	/* Remaining runtime for this instance	*/
+	s64				runtime;
+	/* Absolute deadline for this instance	*/
+	u64				deadline;
+	/* Specifying the scheduler behaviour	*/
+	unsigned int			flags;	
 
 	/*
 	 * Some bool flags:
@@ -666,7 +674,8 @@ struct task_struct {
 	unsigned			no_cgroup_migration:1;
 #endif
 
-	unsigned long			atomic_flags; /* Flags requiring atomic access. */
+	/* Flags requiring atomic access. */
+	unsigned long			atomic_flags;
 
 	struct restart_block		restart_block;
 
@@ -678,8 +687,9 @@ struct task_struct {
 	unsigned long			stack_canary;
 #endif
 	/*
-	 * Pointers to the (original) parent process, youngest child, younger sibling,
-	 * older sibling, respectively.  (p->father can be replaced with
+	 * Pointers to the (original) parent process, youngest child,
+	 * younger sibling, older sibling, respectively.
+	 * (p->father can be replaced with
 	 * p->real_parent->pid)
 	 */
 
@@ -743,7 +753,10 @@ struct task_struct {
 	/* Boot based time in nsecs: */
 	u64				real_start_time;
 
-	/* MM fault and swap info: this can arguably be seen as either mm-specific or thread-specific: */
+	/* 
+	 * MM fault and swap info: this can arguably be seen as either
+	 * mm-specific or thread-specific: 
+	 */
 	unsigned long			min_flt;
 	unsigned long			maj_flt;
 
@@ -815,7 +828,10 @@ struct task_struct {
 	u32				parent_exec_id;
 	u32				self_exec_id;
 
-	/* Protection against (de-)allocation: mm, files, fs, tty, keyrings, mems_allowed, mempolicy: */
+	/*
+	 * Protection against (de-)allocation: mm, files, fs, tty,
+	 * keyrings, mems_allowed, mempolicy: 
+	 */
 	spinlock_t			alloc_lock;
 
 	/* Protection of the PI data structures: */
@@ -1176,7 +1192,7 @@ static inline pid_t task_tgid_nr(struct task_struct *tsk)
 	return tsk->tgid;
 }
 
-/**
+/*
  * pid_alive - check that a task structure is not stale
  * @p: Task structure to be checked.
  *
@@ -1275,7 +1291,7 @@ static inline char task_state_to_char(struct task_struct *tsk)
 	return task_index_to_char(task_state_index(tsk));
 }
 
-/**
+/*
  * is_global_init - check if a task structure is init. Since init
  * is free to have sub-threads we need to check tgid.
  * @tsk: Task structure to be checked.
@@ -1422,7 +1438,7 @@ extern int yield_to(struct task_struct *p, bool preempt);
 extern void set_user_nice(struct task_struct *p, long nice);
 extern int task_prio(const struct task_struct *p);
 
-/**
+/*
  * task_nice - return the nice value of a given task.
  * @p: the task in question.
  *
@@ -1442,7 +1458,7 @@ extern int sched_setattr(struct task_struct *, const struct sched_attr *);
 extern int sched_setattr_nocheck(struct task_struct *, const struct sched_attr *);
 extern struct task_struct *idle_task(int cpu);
 
-/**
+/*
  * is_idle_task - is the specified task an idle task?
  * @p: the task in question.
  *
Signature · 1 line
2.16.1
maintainer
#1 lore raw
Quoted 10 lines · Christopher Diaz Riveros
include/linux/sched.h +1 -1
@@ -183,7 +183,7 @@ extern void io_schedule_finish(int token);
 extern long io_schedule_timeout(long timeout);
 extern void io_schedule(void);
 
-/**
+/*
  * struct prev_cputime - snapshot of system and user cputime
  * @utime: time spent in user mode
  * @stime: time spent in system mode

include/linux/sched.h struct prev_cputime { · line 206

Quoted 8 lines
include/linux/sched.h +1 -1
@@ -200,7 +200,7 @@ struct prev_cputime {
 #endif
 };
 
-/**
+/*
  * struct task_cputime - collected CPU time counts
  * @utime:		time spent in user mode, in nanoseconds
  * @stime:		time spent in kernel mode, in nanoseconds

Why, are those not valid kerneldoc comments?

Quoted 9 lines
include/linux/sched.h +0 -5
@@ -437,20 +437,28 @@ struct sched_dl_entity {
 	 * during sched_setattr(), they will remain the same until
 	 * the next sched_setattr().
 	 */
-	u64				dl_runtime;	/* Maximum runtime for each instance	*/
-	u64				dl_deadline;	/* Relative deadline of each instance	*/
-	u64				dl_period;	/* Separation of two instances (period) */
-	u64				dl_bw;		/* dl_runtime / dl_period		*/
-	u64				dl_density;	/* dl_runtime / dl_deadline		*/

include/linux/sched.h struct sched_dl_entity { · line 449

Quoted 10 lines
include/linux/sched.h +10 -0
+	/* Maximum runtime for each instance	*/
+	u64				dl_runtime;
+	/* Relative deadline of each instance	*/
+	u64				dl_deadline;
+	/* Separation of two instances (period) */
+	u64				dl_period;
+	/* dl_runtime / dl_period		*/
+	u64				dl_bw;
+	/* dl_runtime / dl_deadline		*/
+	u64				dl_density;

That's a whole lot less readable :/

#2 lore raw

Hi Peter, thanks for the reply.

Quoted 15 lines · Peter Zijlstra
Quoted 13 lines · Christopher Diaz Riveros
include/linux/sched.h +1 -1
@@ -183,7 +183,7 @@ extern void io_schedule_finish(int token);
 extern long io_schedule_timeout(long timeout);
 extern void io_schedule(void);
 
-/**
+/*
  * struct prev_cputime - snapshot of system and user cputime
  * @utime: time spent in user mode
  * @stime: time spent in system mode
@@ -200,7 +200,7 @@ struct prev_cputime {
 #endif
 };
 
Quoted 8 lines
Quoted 6 lines
include/linux/sched.h +1 -1
-/**
+/*
  * struct task_cputime - collected CPU time counts
  * @utime:		time spent in user mode, in nanoseconds
  * @stime:		time spent in kernel mode, in

nanoseconds

Why, are those not valid kerneldoc comments?

Following the same structure from most of the multiline comments in the file, they tend to be

/*
*
*/

I thought it was a typo, and maybe this makes the whole file have a uniform multiline comment style.

Quoted 19 lines
Quoted 19 lines
include/linux/sched.h +0 -1
@@ -437,20 +437,28 @@ struct sched_dl_entity {
 	 * during sched_setattr(), they will remain the same until
 	 * the next sched_setattr().
 	 */
-	u64				dl_runtime;	/*

Maximum runtime for each instance */

(quoted diff) +0 -1
-	u64				dl_deadline;	/*

Relative deadline of each instance */

(quoted diff) +0 -1
-	u64				dl_period;	/*

Separation of two instances (period) */

(quoted diff) +0 -1
-	u64				dl_bw;		/

* dl_runtime / dl_period */

(quoted diff) +0 -1
-	u64				dl_density;	/*

dl_runtime / dl_deadline */

include/linux/sched.h +4 -0
+	/* Maximum runtime for each instance	*/
+	u64				dl_runtime;
+	/* Relative deadline of each instance	*/
+	u64				dl_deadline;
Quoted 8 lines

include/linux/sched.h struct sched_dl_entity { · line 449

Quoted 6 lines
include/linux/sched.h +6 -0
+	/* Separation of two instances (period) */
+	u64				dl_period;
+	/* dl_runtime / dl_period		*/
+	u64				dl_bw;
+	/* dl_runtime / dl_deadline		*/
+	u64				dl_density;

That's a whole lot less readable :/

Well, while reading the file on a 80 columns width terminal, it breaks lines producing results like:

/* Maximum runtime for e
ach instance */

/* dl_runtime / dl_deadl
ine */

among others.

In fact, most of the comments in the file follow the structure:

/* comment about var */
type identifier

You can see this structure in lines:

631
689
740
781
820
among others.

Signature · 3 lines
Christopher Díaz Riveros
Gentoo Linux Developer
GPG Fingerprint: E517 5ECB 8152 98E4 FEBC  2BAA 4DBB D10F 0FDD 2547
#3 lore raw
In reply to Peter Zijlstra
Quoted 1 line · Peter Zijlstra

On Thu, Feb 15, 2018 at 10:43:18AM -0500, Christopher Diaz Riveros wrote:

[...]

Quoted 13 lines
Quoted 13 lines
include/linux/sched.h +4 -5
@@ -437,20 +437,28 @@ struct sched_dl_entity {
 	 * during sched_setattr(), they will remain the same until
 	 * the next sched_setattr().
 	 */
-	u64				dl_runtime;	/* Maximum runtime for each instance	*/
-	u64				dl_deadline;	/* Relative deadline of each instance	*/
-	u64				dl_period;	/* Separation of two instances (period) */
-	u64				dl_bw;		/* dl_runtime / dl_period		*/
-	u64				dl_density;	/* dl_runtime / dl_deadline		*/
+	/* Maximum runtime for each instance	*/
+	u64				dl_runtime;
+	/* Relative deadline of each instance	*/
+	u64				dl_deadline;
Quoted 8 lines

include/linux/sched.h struct sched_dl_entity { · line 449

Quoted 6 lines
include/linux/sched.h +6 -0
+	/* Separation of two instances (period) */
+	u64				dl_period;
+	/* dl_runtime / dl_period		*/
+	u64				dl_bw;
+	/* dl_runtime / dl_deadline		*/
+	u64				dl_density;

That's a whole lot less readable :/

Yep. :(

#4 lore raw
Quoted 34 lines · Juri Lelli
Quoted 2 lines · Peter Zijlstra

On Thu, Feb 15, 2018 at 10:43:18AM -0500, Christopher Diaz Riveros wrote:

[...]

Quoted 19 lines
Quoted 19 lines
(quoted diff) +0 -0
@@ -437,20 +437,28 @@ struct sched_dl_entity {
 	 * during sched_setattr(), they will remain the same

until

include/linux/sched.h +0 -1
 	 * the next sched_setattr().
 	 */
-	u64				dl_runtime;	/*

Maximum runtime for each instance */

(quoted diff) +0 -1
-	u64				dl_deadline;	/

* Relative deadline of each instance */

(quoted diff) +0 -1
-	u64				dl_period;	/*

Separation of two instances (period) */

(quoted diff) +0 -1
-	u64				dl_bw;		

/* dl_runtime / dl_period */

(quoted diff) +0 -1
-	u64				dl_density;	/*

dl_runtime / dl_deadline */

include/linux/sched.h +4 -0
+	/* Maximum runtime for each instance	*/
+	u64				dl_runtime;
+	/* Relative deadline of each instance	*/
+	u64				dl_deadline;
Quoted 8 lines

include/linux/sched.h struct sched_dl_entity { · line 449

Quoted 6 lines
include/linux/sched.h +6 -0
+	/* Separation of two instances (period) */
+	u64				dl_period;
+	/* dl_runtime / dl_period		*/
+	u64				dl_bw;
+	/* dl_runtime / dl_deadline		*/
+	u64				dl_density;

That's a whole lot less readable :/

Quoted 1 line

Yep. :(

Thank you all for the feedback, I'll consider this patch as NACK. Sorry
for wasting time in a low quality patch. I'll prepare a better one
next time :)

Regards,

Signature · 3 lines
Christopher Díaz Riveros
Gentoo Linux Developer
GPG Fingerprint: E517 5ECB 8152 98E4 FEBC  2BAA 4DBB D10F 0FDD 2547
#5 lore raw
Quoted 35 lines · Christopher Díaz Riveros
Quoted 34 lines · Juri Lelli
Quoted 2 lines · Peter Zijlstra

On Thu, Feb 15, 2018 at 10:43:18AM -0500, Christopher Diaz Riveros wrote:

[...]

Quoted 27 lines
Quoted 15 lines
(quoted diff) +0 -0
@@ -437,20 +437,28 @@ struct sched_dl_entity {
 	 * during sched_setattr(), they will remain the same

until

include/linux/sched.h +0 -1
 	 * the next sched_setattr().
 	 */
-	u64				dl_runtime;	/*

Maximum runtime for each instance */

(quoted diff) +0 -1
-	u64				dl_deadline;	/

* Relative deadline of each instance */

(quoted diff) +0 -1
-	u64				dl_period;	/*

Separation of two instances (period) */

(quoted diff) +0 -1
-	u64				dl_bw;		

/* dl_runtime / dl_period */

(quoted diff) +0 -1
-	u64				dl_density;	/*

dl_runtime / dl_deadline */

include/linux/sched.h struct sched_dl_entity { · line 449

Quoted 10 lines
include/linux/sched.h +10 -0
+	/* Maximum runtime for each instance	*/
+	u64				dl_runtime;
+	/* Relative deadline of each instance	*/
+	u64				dl_deadline;
+	/* Separation of two instances (period) */
+	u64				dl_period;
+	/* dl_runtime / dl_period		*/
+	u64				dl_bw;
+	/* dl_runtime / dl_deadline		*/
+	u64				dl_density;

That's a whole lot less readable :/

Quoted 5 lines
Quoted 1 line

Yep. :(

Thank you all for the feedback, I'll consider this patch as NACK. Sorry
for wasting time in a low quality patch. I'll prepare a better one
next time :)

No problem, thanks actually to seeing if things can be cleaned up. :)

While going through that struct again I was thinking that we might want to completely remove inline comments and put them in the above comment block(s), as we already have for bool flags:

/*
* Some bool flags:
*
* @dl_throttled tells if we exhausted the runtime. If so, the
* task has to wait for a replenishment to be performed at the
* next firing of dl_timer.
[...]

Would it be OK and any better?

Thanks,

- Juri
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#6 lore raw

RFC 1/1 sched/headers: comments clean up <linux/sched.h>

In reply to Christopher Díaz Riveros

Remove inline comments to merge them into comment blocks.

Enhance readability from source code by giving descriptions from the structures and data in comment blocks instead from inline comments.

---
 include/linux/sched.h | 15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)
include/linux/sched.h +12 -3
index b161ef8a902e..693a6e51ed0c 100644
@@ -221,12 +221,21 @@ struct task_cputime {
 #define prof_exp			stime
 #define sched_exp			sum_exec_runtime
 
+/*
+ * vtime_state states:
+ *
+ * @VTIME_INACTIVE tells if task is sleeping or running in a CPU with
+ * VTIME inactive.
+ *
+ * @VTIME_USER tells if task is running in userspace in a CPU with
+ * VTIME active.
+ *
+ * @VTIME_SYS tells if task is running in kernelspace in a CPU with
+ * VTIME active.
+ */
 enum vtime_state {
-	/* Task is sleeping or running in a CPU with VTIME inactive: */
 	VTIME_INACTIVE = 0,
-	/* Task runs in userspace in a CPU with VTIME active: */
 	VTIME_USER,
-	/* Task runs in kernelspace in a CPU with VTIME active: */
 	VTIME_SYS,
 };
 
Signature · 1 line
2.16.2
#7 lore raw
In reply to Christopher Diaz Riveros
Quoted 1 line · Christopher Diaz Riveros

Trivial clean up making comments fit in 80 columns and keeping the same comment style.

Why change the /** (indicates kernel-doc notation) to just /* ?

Is scripts/kernel-doc complaining with warnings or errors?

Quoted 147 lines
---
 include/linux/sched.h | 54 +++++++++++++++++++++++++++++++++------------------
 1 file changed, 35 insertions(+), 19 deletions(-)
include/linux/sched.h +35 -19
index b161ef8a902e..c752a0d48944 100644
@@ -183,7 +183,7 @@ extern void io_schedule_finish(int token);
 extern long io_schedule_timeout(long timeout);
 extern void io_schedule(void);
 
-/**
+/*
  * struct prev_cputime - snapshot of system and user cputime
  * @utime: time spent in user mode
  * @stime: time spent in system mode
@@ -200,7 +200,7 @@ struct prev_cputime {
 #endif
 };
 
-/**
+/*
  * struct task_cputime - collected CPU time counts
  * @utime:		time spent in user mode, in nanoseconds
  * @stime:		time spent in kernel mode, in nanoseconds
@@ -437,20 +437,28 @@ struct sched_dl_entity {
 	 * during sched_setattr(), they will remain the same until
 	 * the next sched_setattr().
 	 */
-	u64				dl_runtime;	/* Maximum runtime for each instance	*/
-	u64				dl_deadline;	/* Relative deadline of each instance	*/
-	u64				dl_period;	/* Separation of two instances (period) */
-	u64				dl_bw;		/* dl_runtime / dl_period		*/
-	u64				dl_density;	/* dl_runtime / dl_deadline		*/
+	/* Maximum runtime for each instance	*/
+	u64				dl_runtime;
+	/* Relative deadline of each instance	*/
+	u64				dl_deadline;
+	/* Separation of two instances (period) */
+	u64				dl_period;
+	/* dl_runtime / dl_period		*/
+	u64				dl_bw;
+	/* dl_runtime / dl_deadline		*/
+	u64				dl_density;
 
 	/*
 	 * Actual scheduling parameters. Initialized with the values above,
 	 * they are continously updated during task execution. Note that
 	 * the remaining runtime could be < 0 in case we are in overrun.
 	 */
-	s64				runtime;	/* Remaining runtime for this instance	*/
-	u64				deadline;	/* Absolute deadline for this instance	*/
-	unsigned int			flags;		/* Specifying the scheduler behaviour	*/
+	/* Remaining runtime for this instance	*/
+	s64				runtime;
+	/* Absolute deadline for this instance	*/
+	u64				deadline;
+	/* Specifying the scheduler behaviour	*/
+	unsigned int			flags;	
 
 	/*
 	 * Some bool flags:
@@ -666,7 +674,8 @@ struct task_struct {
 	unsigned			no_cgroup_migration:1;
 #endif
 
-	unsigned long			atomic_flags; /* Flags requiring atomic access. */
+	/* Flags requiring atomic access. */
+	unsigned long			atomic_flags;
 
 	struct restart_block		restart_block;
 
@@ -678,8 +687,9 @@ struct task_struct {
 	unsigned long			stack_canary;
 #endif
 	/*
-	 * Pointers to the (original) parent process, youngest child, younger sibling,
-	 * older sibling, respectively.  (p->father can be replaced with
+	 * Pointers to the (original) parent process, youngest child,
+	 * younger sibling, older sibling, respectively.
+	 * (p->father can be replaced with
 	 * p->real_parent->pid)
 	 */
 
@@ -743,7 +753,10 @@ struct task_struct {
 	/* Boot based time in nsecs: */
 	u64				real_start_time;
 
-	/* MM fault and swap info: this can arguably be seen as either mm-specific or thread-specific: */
+	/* 
+	 * MM fault and swap info: this can arguably be seen as either
+	 * mm-specific or thread-specific: 
+	 */
 	unsigned long			min_flt;
 	unsigned long			maj_flt;
 
@@ -815,7 +828,10 @@ struct task_struct {
 	u32				parent_exec_id;
 	u32				self_exec_id;
 
-	/* Protection against (de-)allocation: mm, files, fs, tty, keyrings, mems_allowed, mempolicy: */
+	/*
+	 * Protection against (de-)allocation: mm, files, fs, tty,
+	 * keyrings, mems_allowed, mempolicy: 
+	 */
 	spinlock_t			alloc_lock;
 
 	/* Protection of the PI data structures: */
@@ -1176,7 +1192,7 @@ static inline pid_t task_tgid_nr(struct task_struct *tsk)
 	return tsk->tgid;
 }
 
-/**
+/*
  * pid_alive - check that a task structure is not stale
  * @p: Task structure to be checked.
  *
@@ -1275,7 +1291,7 @@ static inline char task_state_to_char(struct task_struct *tsk)
 	return task_index_to_char(task_state_index(tsk));
 }
 
-/**
+/*
  * is_global_init - check if a task structure is init. Since init
  * is free to have sub-threads we need to check tgid.
  * @tsk: Task structure to be checked.
@@ -1422,7 +1438,7 @@ extern int yield_to(struct task_struct *p, bool preempt);
 extern void set_user_nice(struct task_struct *p, long nice);
 extern int task_prio(const struct task_struct *p);
 
-/**
+/*
  * task_nice - return the nice value of a given task.
  * @p: the task in question.
  *
@@ -1442,7 +1458,7 @@ extern int sched_setattr(struct task_struct *, const struct sched_attr *);
 extern int sched_setattr_nocheck(struct task_struct *, const struct sched_attr *);
 extern struct task_struct *idle_task(int cpu);
 
-/**
+/*
  * is_idle_task - is the specified task an idle task?
  * @p: the task in question.
  *
Signature · 1 line
~Randy
#8 lore raw
Quoted 8 lines · Randy Dunlap
Quoted 2 lines · Christopher Diaz Riveros

Trivial clean up making comments fit in 80 columns and keeping the same comment style.

Why change the /** (indicates kernel-doc notation) to just /* ?

Is scripts/kernel-doc complaining with warnings or errors?

If that's the case, then all the /** were correct and it's just me not being aware of the meaning of /**.

Thanks Randy for clarifying it to me.

That leaves dl_* comments and a couple of oneline comments that may be better in multiline format. I can prepare a v2 of that if you consider it necessary.

Quoted 175 lines
Quoted 173 lines
---
 include/linux/sched.h | 54 +++++++++++++++++++++++++++++++++----
--------------
 1 file changed, 35 insertions(+), 19 deletions(-)
include/linux/sched.h +2 -2
index b161ef8a902e..c752a0d48944 100644
@@ -183,7 +183,7 @@ extern void io_schedule_finish(int token);
 extern long io_schedule_timeout(long timeout);
 extern void io_schedule(void);
 
-/**
+/*
  * struct prev_cputime - snapshot of system and user cputime
  * @utime: time spent in user mode
  * @stime: time spent in system mode
@@ -200,7 +200,7 @@ struct prev_cputime {
 #endif
 };
 
-/**
+/*
  * struct task_cputime - collected CPU time counts
  * @utime:		time spent in user mode, in nanoseconds
  * @stime:		time spent in kernel mode, in

nanoseconds

include/linux/sched.h +0 -1
@@ -437,20 +437,28 @@ struct sched_dl_entity {
 	 * during sched_setattr(), they will remain the same until
 	 * the next sched_setattr().
 	 */
-	u64				dl_runtime;	/*

Maximum runtime for each instance */

include/linux/sched.h +0 -1
-	u64				dl_deadline;	/*

Relative deadline of each instance */

include/linux/sched.h +0 -1
-	u64				dl_period;	/*

Separation of two instances (period) */

include/linux/sched.h +0 -1
-	u64				dl_bw;		/

* dl_runtime / dl_period */

include/linux/sched.h +0 -1
-	u64				dl_density;	/*

dl_runtime / dl_deadline */

include/linux/sched.h +10 -0
+	/* Maximum runtime for each instance	*/
+	u64				dl_runtime;
+	/* Relative deadline of each instance	*/
+	u64				dl_deadline;
+	/* Separation of two instances (period) */
+	u64				dl_period;
+	/* dl_runtime / dl_period		*/
+	u64				dl_bw;
+	/* dl_runtime / dl_deadline		*/
+	u64				dl_density;
 
 	/*
 	 * Actual scheduling parameters. Initialized with the

values above,
* they are continously updated during task execution.
Note that
* the remaining runtime could be < 0 in case we are in
overrun.

include/linux/sched.h +0 -1
 	 */
-	s64				runtime;	/*

Remaining runtime for this instance */

include/linux/sched.h +0 -1
-	u64				deadline;	/*

Absolute deadline for this instance */

include/linux/sched.h +0 -1
-	unsigned int			flags;		

/* Specifying the scheduler behaviour */

include/linux/sched.h +6 -1
+	/* Remaining runtime for this instance	*/
+	s64				runtime;
+	/* Absolute deadline for this instance	*/
+	u64				deadline;
+	/* Specifying the scheduler behaviour	*/
+	unsigned int			flags;	
 
 	/*
 	 * Some bool flags:
@@ -666,7 +674,8 @@ struct task_struct {
 	unsigned			no_cgroup_migration:1;
 #endif
 
-	unsigned long			atomic_flags; /*

Flags requiring atomic access. */

include/linux/sched.h +2 -2
+	/* Flags requiring atomic access. */
+	unsigned long			atomic_flags;
 
 	struct restart_block		restart_block;
@@ -678,8 +687,9 @@ struct task_struct {
 	unsigned long			stack_canary;
 #endif
 	/*
-	 * Pointers to the (original) parent process, youngest
 child, younger sibling,
-	 * older sibling, respectively.  (p->father can be

replaced with

include/linux/sched.h +1 -0
+	 * Pointers to the (original) parent process, youngest

child,

include/linux/sched.h +2 -1
+	 * younger sibling, older sibling, respectively.
+	 * (p->father can be replaced with
 	 * p->real_parent->pid)
 	 */
@@ -743,7 +753,10 @@ struct task_struct {
 	/* Boot based time in nsecs: */
 	u64				real_start_time;
 
-	/* MM fault and swap info: this can arguably be seen as

either mm-specific or thread-specific: */

include/linux/sched.h +2 -0
+	/* 
+	 * MM fault and swap info: this can arguably be seen as

either

include/linux/sched.h +2 -1
+	 * mm-specific or thread-specific: 
+	 */
 	unsigned long			min_flt;
 	unsigned long			maj_flt;
@@ -815,7 +828,10 @@ struct task_struct {
 	u32				parent_exec_id;
 	u32				self_exec_id;
 
-	/* Protection against (de-)allocation: mm, files, fs, tty,

keyrings, mems_allowed, mempolicy: */

include/linux/sched.h +5 -1
+	/*
+	 * Protection against (de-)allocation: mm, files, fs, tty,
+	 * keyrings, mems_allowed, mempolicy: 
+	 */
 	spinlock_t			alloc_lock;
 
 	/* Protection of the PI data structures: */
@@ -1176,7 +1192,7 @@ static inline pid_t task_tgid_nr(struct
 task_struct *tsk)
 	return tsk->tgid;
 }
 
-/**
+/*
  * pid_alive - check that a task structure is not stale
  * @p: Task structure to be checked.

*

include/linux/sched.h +1 -1
@@ -1275,7 +1291,7 @@ static inline char task_state_to_char(struct
 task_struct *tsk)
 	return task_index_to_char(task_state_index(tsk));
 }
 
-/**
+/*
  * is_global_init - check if a task structure is init. Since init
  * is free to have sub-threads we need to check tgid.

* @tsk: Task structure to be checked.

include/linux/sched.h +1 -1
@@ -1422,7 +1438,7 @@ extern int yield_to(struct task_struct *p,
 bool preempt);
 extern void set_user_nice(struct task_struct *p, long nice);
 extern int task_prio(const struct task_struct *p);
 
-/**
+/*
  * task_nice - return the nice value of a given task.
  * @p: the task in question.

*

include/linux/sched.h +1 -1
@@ -1442,7 +1458,7 @@ extern int sched_setattr(struct task_struct
 *, const struct sched_attr *);
 extern int sched_setattr_nocheck(struct task_struct *, const
 struct sched_attr *);
 extern struct task_struct *idle_task(int cpu);
 
-/**
+/*
  * is_idle_task - is the specified task an idle task?

* @p: the task in question.
*

Signature · 3 lines
Christopher Díaz Riveros
Gentoo Linux Developer
GPG Fingerprint: E517 5ECB 8152 98E4 FEBC  2BAA 4DBB D10F 0FDD 2547