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, 14 Apr 2020 12:05:55 +0200
From:   Peter Zijlstra <peterz@...radead.org>
To:     Vincent Guittot <vincent.guittot@...aro.org>
Cc:     Wang Qing <wangqing@...o.com>,
        Catalin Marinas <catalin.marinas@....com>,
        Will Deacon <will@...nel.org>, Ingo Molnar <mingo@...hat.com>,
        Juri Lelli <juri.lelli@...hat.com>,
        Dietmar Eggemann <dietmar.eggemann@....com>,
        Steven Rostedt <rostedt@...dmis.org>,
        Ben Segall <bsegall@...gle.com>, Mel Gorman <mgorman@...e.de>,
        James Morse <james.morse@....com>,
        Mark Rutland <mark.rutland@....com>,
        "Eric W. Biederman" <ebiederm@...ssion.com>,
        Thomas Gleixner <tglx@...utronix.de>,
        jinho lim <jordan.lim@...sung.com>,
        Dave Martin <Dave.Martin@....com>,
        LAK <linux-arm-kernel@...ts.infradead.org>,
        linux-kernel <linux-kernel@...r.kernel.org>,
        opensource.kernel@...o.com
Subject: Re: [PATCH 1/2] [V2 1/2]sched:add task_running_oncpu

On Tue, Apr 14, 2020 at 09:20:57AM +0200, Vincent Guittot wrote:
> On Mon, 13 Apr 2020 at 14:04, Wang Qing <wangqing@...o.com> wrote:
> >
> > We have no interface whether the task is running,
> > so we need to add an interface and distinguish CONFIG_SMP.
> >
> > Signed-off-by: Wang Qing <wangqing@...o.com>
> > ---
> >  include/linux/sched.h | 10 ++++++++++
> >  1 file changed, 10 insertions(+)
> >
> > diff --git a/include/linux/sched.h b/include/linux/sched.h
> > index 4418f5c..13cc8f5 100644
> > --- a/include/linux/sched.h
> > +++ b/include/linux/sched.h
> > @@ -1843,6 +1843,11 @@ static inline unsigned int task_cpu(const struct task_struct *p)
> >
> >  extern void set_task_cpu(struct task_struct *p, unsigned int cpu);
> >
> > +static inline int task_running_oncpu(const struct task_struct *p)
> 
> This function name is too close from task_running_on_cpu() and can be
> misleading as the difference is only "_"
> Also, how task_running_oncpu() is different from task_running() ?

It doesn't have the (arguably superfluous) rq argument. But yes, agreed,
if anything lift that thing (without the argument).

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ