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: <20150127141804.GB24151@twins.programming.kicks-ass.net>
Date:	Tue, 27 Jan 2015 15:18:04 +0100
From:	Peter Zijlstra <peterz@...radead.org>
To:	Xunlei Pang <pang.xunlei@...aro.org>
Cc:	linux-kernel@...r.kernel.org, Juri Lelli <juri.lelli@...il.com>,
	Steven Rostedt <rostedt@...dmis.org>
Subject: Re: [PATCH 4/5] sched/rt: Consider deadline tasks in cpupri_find()

On Tue, Jan 27, 2015 at 01:58:59PM +0100, Peter Zijlstra wrote:
> > @@ -103,24 +104,11 @@ int cpupri_find(struct cpupri *cp, struct task_struct *p,
> >  		if (skip)
> >  			continue;
> >  
> > -		if (cpumask_any_and(&p->cpus_allowed, vec->mask) >= nr_cpu_ids)
> > +		cpumask_and(lowest_mask, &p->cpus_allowed, vec->mask);
> > +		cpumask_and(lowest_mask, lowest_mask, cp->cpudl->free_cpus);
> > +		if (cpumask_any(lowest_mask) >= nr_cpu_ids)
> >  			continue;
> >  


> > +++ b/kernel/sched/rt.c
> > @@ -1349,14 +1349,17 @@ out:
> >  	return cpu;
> >  }
> >  
> > +static DEFINE_PER_CPU(cpumask_var_t, local_cpu_mask);
> >  static void check_preempt_equal_prio(struct rq *rq, struct task_struct *p)
> >  {
> > +	struct cpumask *lowest_mask = this_cpu_cpumask_var_ptr(local_cpu_mask);
> > +
> >  	/*
> >  	 * Current can't be migrated, useless to reschedule,
> >  	 * let's hope p can move out.
> >  	 */
> >  	if (rq->curr->nr_cpus_allowed == 1 ||
> > -	    !cpupri_find(&rq->rd->cpupri, rq->curr, NULL))
> > +	    !cpupri_find(&rq->rd->cpupri, rq->curr, lowest_mask))
> >  		return;
> >  
> >  	/*
> 
> 
> Again; should you not put something useful in the mask before you pass
> it to cpupri_find()?

Similar to the other case; I can't read today. I only saw the
_and(lowest_mask, lowest_mask, ...) and figured it ought to be populated
before that.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ