lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 31 Aug 2021 21:25:19 +0800
From:   Yafang Shao <laoar.shao@...il.com>
To:     Peter Zijlstra <peterz@...radead.org>
Cc:     Ingo Molnar <mingo@...hat.com>, Mel Gorman <mgorman@...e.de>,
        Juri Lelli <juri.lelli@...hat.com>,
        Vincent Guittot <vincent.guittot@...aro.org>,
        Dietmar Eggemann <dietmar.eggemann@....com>,
        Steven Rostedt <rostedt@...dmis.org>,
        Benjamin Segall <bsegall@...gle.com>,
        Daniel Bristot de Oliveira <bristot@...hat.com>,
        Alison Chaiken <achaiken@...ora.tech>,
        kbuild test robot <lkp@...el.com>,
        LKML <linux-kernel@...r.kernel.org>,
        linux-rt-users <linux-rt-users@...r.kernel.org>
Subject: Re: [PATCH v3 2/7] sched: make struct sched_statistics independent of
 fair sched class

On Tue, Aug 31, 2021 at 6:15 PM Peter Zijlstra <peterz@...radead.org> wrote:
>
> On Tue, Aug 24, 2021 at 11:29:41AM +0000, Yafang Shao wrote:
> > diff --git a/kernel/sched/debug.c b/kernel/sched/debug.c
> > index 49716228efb4..4cfee2aa1a2d 100644
> > --- a/kernel/sched/debug.c
> > +++ b/kernel/sched/debug.c
>
> > @@ -442,9 +442,11 @@ static void print_cfs_group_stats(struct seq_file *m, int cpu, struct task_group
> >       struct sched_entity *se = tg->se[cpu];
> >
> >  #define P(F)         SEQ_printf(m, "  .%-30s: %lld\n",       #F, (long long)F)
> > -#define P_SCHEDSTAT(F)       SEQ_printf(m, "  .%-30s: %lld\n",       #F, (long long)schedstat_val(F))
> > +#define P_SCHEDSTAT(F)       SEQ_printf(m, "  .%-30s: %lld\n",       \
> > +             "se->statistics."#F, (long long)schedstat_val(tg->stats[cpu]->F))
> >  #define PN(F)                SEQ_printf(m, "  .%-30s: %lld.%06ld\n", #F, SPLIT_NS((long long)F))
> > -#define PN_SCHEDSTAT(F)      SEQ_printf(m, "  .%-30s: %lld.%06ld\n", #F, SPLIT_NS((long long)schedstat_val(F)))
> > +#define PN_SCHEDSTAT(F)      SEQ_printf(m, "  .%-30s: %lld.%06ld\n", \
> > +             "se->statistics."#F, SPLIT_NS((long long)schedstat_val(tg->stats[cpu]->F)))
> >
> >       if (!se)
> >               return;
>
> > @@ -948,8 +950,8 @@ void proc_sched_show_task(struct task_struct *p, struct pid_namespace *ns,
> >               "---------------------------------------------------------"
> >               "----------\n");
> >
> > -#define P_SCHEDSTAT(F)  __PS(#F, schedstat_val(p->F))
> > -#define PN_SCHEDSTAT(F) __PSN(#F, schedstat_val(p->F))
> > +#define P_SCHEDSTAT(F)  __PS("se.statistics."#F, schedstat_val(p->stats.F))
> > +#define PN_SCHEDSTAT(F) __PSN("se.statistics."#F, schedstat_val(p->stats.F))
> >
> >       PN(se.exec_start);
> >       PN(se.vruntime);
>
> That's sad... can't we keep it #F, this is all SCHED_DEBUG code anyway.

Sure, I will change it.

-- 
Thanks
Yafang

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ