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]
Message-ID: <20200226113419.ikhxz3xp27ohxu3b@e107158-lin.cambridge.arm.com>
Date:   Wed, 26 Feb 2020 11:34:19 +0000
From:   Qais Yousef <qais.yousef@....com>
To:     Dietmar Eggemann <dietmar.eggemann@....com>
Cc:     Ingo Molnar <mingo@...nel.org>,
        Peter Zijlstra <peterz@...radead.org>,
        Steven Rostedt <rostedt@...dmis.org>,
        Pavan Kondeti <pkondeti@...eaurora.org>,
        Juri Lelli <juri.lelli@...hat.com>,
        Vincent Guittot <vincent.guittot@...aro.org>,
        Ben Segall <bsegall@...gle.com>, Mel Gorman <mgorman@...e.de>,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 2/6] sched/rt: Re-instate old behavior in
 select_task_rq_rt

On 02/25/20 15:21, Dietmar Eggemann wrote:
> On 23.02.20 18:39, Qais Yousef wrote:
> 
> [...]
> 
> > diff --git a/kernel/sched/rt.c b/kernel/sched/rt.c
> > index 4043abe45459..2c3fae637cef 100644
> > --- a/kernel/sched/rt.c
> > +++ b/kernel/sched/rt.c
> > @@ -1474,6 +1474,13 @@ select_task_rq_rt(struct task_struct *p, int cpu, int sd_flag, int flags)
> >  	if (test || !rt_task_fits_capacity(p, cpu)) {
> >  		int target = find_lowest_rq(p);
> >  
> > +		/*
> > +		 * Bail out if we were forcing a migration to find a better
> > +		 * fitting CPU but our search failed.
> > +		 */
> > +		if (!test && !rt_task_fits_capacity(p, target))
> > +			goto out_unlock;
> 
> Didn't you loose the 'target != -1' condition from
> https://lore.kernel.org/r/20200218041620.GD28029@codeaurora.org ?
> 
> A call to rt_task_fits_capacity(p, -1) would cause issues on a
> heterogeneous system.

Good catch! Right you are. I'll fix this and send v3, once it is clear what
would be right way forward to handle the wakeup-path.

Thanks!

--
Qais Yousef

> 
> I tried to provoke this but wasn't able to do so. find_lowest_rq()
> returns -1 in 4 places. (1) lowest_mask should be there (2) if
> 'task->nr_cpus_allowed == 1' select_task_rq_rt() wouldn't have been
> called but maybe (3) or (4) can still return -1.
> 
> [...]

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ