Re: [RFC PATCH v2 17/17] sched: Debug bits...

From: Aubrey Li
Date: Fri May 17 2019 - 13:20:45 EST


On Wed, Apr 24, 2019 at 12:18 AM Vineeth Remanan Pillai
<vpillai@xxxxxxxxxxxxxxxx> wrote:
>
> From: Peter Zijlstra (Intel) <peterz@xxxxxxxxxxxxx>
>
> Not-Signed-off-by: Peter Zijlstra (Intel) <peterz@xxxxxxxxxxxxx>
> ---
> kernel/sched/core.c | 38 +++++++++++++++++++++++++++++++++++++-
> 1 file changed, 37 insertions(+), 1 deletion(-)
>
> diff --git a/kernel/sched/core.c b/kernel/sched/core.c
> index 0e3c51a1b54a..e8e5f26db052 100644
> --- a/kernel/sched/core.c
> +++ b/kernel/sched/core.c
> @@ -106,6 +106,10 @@ static inline bool __prio_less(struct task_struct *a, struct task_struct *b, boo
>
> int pa = __task_prio(a), pb = __task_prio(b);
>
> + trace_printk("(%s/%d;%d,%Lu,%Lu) ?< (%s/%d;%d,%Lu,%Lu)\n",
> + a->comm, a->pid, pa, a->se.vruntime, a->dl.deadline,
> + b->comm, b->pid, pa, b->se.vruntime, b->dl.deadline);
> +

a minor nitpick

diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 3e3162f..68c518c 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -93,7 +93,7 @@ static inline bool __prio_less(struct task_struct
*a, struct task_struct *b, u64

trace_printk("(%s/%d;%d,%Lu,%Lu) ?< (%s/%d;%d,%Lu,%Lu)\n",
a->comm, a->pid, pa, a->se.vruntime, a->dl.deadline,
- b->comm, b->pid, pa, b->se.vruntime, b->dl.deadline);
+ b->comm, b->pid, pb, b->se.vruntime, b->dl.deadline);


if (-pa < -pb)
return true;