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:	Wed, 11 Apr 2012 13:25:08 -0400
From:	Steven Rostedt <rostedt@...dmis.org>
To:	Juri Lelli <juri.lelli@...il.com>
Cc:	peterz@...radead.org, tglx@...utronix.de, mingo@...hat.com,
	oleg@...hat.com, fweisbec@...il.com, darren@...art.com,
	johan.eker@...csson.com, p.faure@...tech.ch,
	linux-kernel@...r.kernel.org, claudio@...dence.eu.com,
	michael@...rulasolutions.com, fchecconi@...il.com,
	tommaso.cucinotta@...up.it, nicola.manica@...i.unitn.it,
	luca.abeni@...tn.it, dhaval.giani@...il.com, hgu1972@...il.com,
	paulmck@...ux.vnet.ibm.com, raistlin@...ux.it,
	insop.song@...csson.com, liming.wang@...driver.com,
	Kirill Tkhai <tkhai@...dex.ru>
Subject: Re: [PATCH 06/16] sched: SCHED_DEADLINE push and pull logic

On Fri, 2012-04-06 at 09:14 +0200, Juri Lelli wrote:
>  
>  static void set_cpus_allowed_dl(struct task_struct *p,
> @@ -622,10 +1346,145 @@ static void set_cpus_allowed_dl(struct task_struct *p,
>  
>  	BUG_ON(!dl_task(p));
>  
> +	/*
> +	 * Update only if the task is actually running (i.e.,
> +	 * it is on the rq AND it is not throttled).
> +	 */
> +	if (on_dl_rq(&p->dl) && (weight != p->dl.nr_cpus_allowed)) {
> +		struct rq *rq = task_rq(p);
> +
> +		if (!task_current(rq, p)) {
> +			/*
> +			 * If the task was on the pushable list,
> +			 * make sure it stays there only if the new
> +			 * mask allows that.
> +			 */
> +			if (p->dl.nr_cpus_allowed > 1)
> +				dequeue_pushable_dl_task(rq, p);
> +
> +			if (weight > 1)
> +				enqueue_pushable_dl_task(rq, p);
> +		}
> +
> +		if ((p->dl.nr_cpus_allowed <= 1) && (weight > 1)) {
> +			rq->dl.dl_nr_migratory++;
> +		} else if ((p->dl.nr_cpus_allowed > 1) && (weight <= 1)) {
> +			BUG_ON(!rq->dl.dl_nr_migratory);
> +			rq->dl.dl_nr_migratory--;
> +		}
> +
> +		update_dl_migration(&rq->dl);

Note, I'm in the process of testing this patch:

 https://lkml.org/lkml/2012/4/11/7

Just giving you a heads up, as this looks like you can benefit from this
change as well.

-- Steve


> +	}
> +
>  	cpumask_copy(&p->cpus_allowed, new_mask);
>  	p->dl.nr_cpus_allowed = weight;
>  }
> +


--
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