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:	Sat, 17 Nov 2007 12:35:43 -0500
From:	"Gregory Haskins" <ghaskins@...ell.com>
To:	"Steven Rostedt" <rostedt@...dmis.org>,
	"LKML" <linux-kernel@...r.kernel.org>
Cc:	"Peter Zijlstra" <a.p.zijlstra@...llo.nl>,
	"Ingo Molnar" <mingo@...e.hu>,
	"Steven Rostedt" <srostedt@...hat.com>,
	"Christoph Lameter" <clameter@....com>
Subject: Re: [PATCH v3 10/17] Remove some CFS specific code from the
	wakeup path of RT tasks

>>> On Sat, Nov 17, 2007 at  1:21 AM, in message
<20071117062404.672976284@...dmis.org>, Steven Rostedt <rostedt@...dmis.org>
wrote: 

> -/*
> - * wake_idle() will wake a task on an idle cpu if task->cpu is
> - * not idle and an idle cpu is available.  The span of cpus to
> - * search starts with cpus closest then further out as needed,
> - * so we always favor a closer, idle cpu.
> - *
> - * Returns the CPU we should wake onto.
> - */
> -#if defined(ARCH_HAS_SCHED_WAKE_IDLE)
> -static int wake_idle(int cpu, struct task_struct *p)
> -{
> -	cpumask_t tmp;
> -	struct sched_domain *sd;
> -	int i;
> -
> -	/*
> -	 * If it is idle, then it is the best cpu to run this task.
> -	 *
> -	 * This cpu is also the best, if it has more than one task already.
> -	 * Siblings must be also busy(in most cases) as they didn't already
> -	 * pickup the extra load from this cpu and hence we need not check
> -	 * sibling runqueue info. This will avoid the checks and cache miss
> -	 * penalities associated with that.
> -	 */
> -	if (idle_cpu(cpu) || cpu_rq(cpu)->nr_running > 1)
> -		return cpu;
> -
> -	for_each_domain(cpu, sd) {
> -		if (sd->flags & SD_WAKE_IDLE) {
> -			cpus_and(tmp, sd->span, p->cpus_allowed);
> -			for_each_cpu_mask(i, tmp) {
> -				if (idle_cpu(i)) {
> -					if (i != task_cpu(p)) {
> -						schedstat_inc(p,
> -							se.nr_wakeups_idle);
                                                                                          ^^^^^^^^^^^^^^^^^^^^^

[...]


> --- linux-compile.git.orig/kernel/sched_fair.c	2007-11-16 11:16:38.000000000 -0500
> +++ linux-compile.git/kernel/sched_fair.c	2007-11-16 22:23:39.000000000 -0500
> @@ -564,6 +564,137 @@ dequeue_entity(struct cfs_rq *cfs_rq, st
>  }
>  
>  /*
> + * wake_idle() will wake a task on an idle cpu if task->cpu is
> + * not idle and an idle cpu is available.  The span of cpus to
> + * search starts with cpus closest then further out as needed,
> + * so we always favor a closer, idle cpu.
> + *
> + * Returns the CPU we should wake onto.
> + */
> +#if defined(ARCH_HAS_SCHED_WAKE_IDLE)
> +static int wake_idle(int cpu, struct task_struct *p)
> +{
> +	cpumask_t tmp;
> +	struct sched_domain *sd;
> +	int i;
> +
> +	/*
> +	 * If it is idle, then it is the best cpu to run this task.
> +	 *
> +	 * This cpu is also the best, if it has more than one task already.
> +	 * Siblings must be also busy(in most cases) as they didn't already
> +	 * pickup the extra load from this cpu and hence we need not check
> +	 * sibling runqueue info. This will avoid the checks and cache miss
> +	 * penalities associated with that.
> +	 */
> +	if (idle_cpu(cpu) || cpu_rq(cpu)->nr_running > 1)
> +		return cpu;
> +
> +	for_each_domain(cpu, sd) {
> +		if (sd->flags & SD_WAKE_IDLE) {
> +			cpus_and(tmp, sd->span, p->cpus_allowed);
> +			for_each_cpu_mask(i, tmp) {
> +				if (idle_cpu(i))
> +					return i;
                                                                        ^^^^^^^^^^^^^^^^

Looks like some stuff that was added in 24 was inadvertently lost in the move when you merged the patches up from 23.1-rt11.  The attached patch is updated to move the new logic as well.

Regards,
-Greg
                                    


View attachment "sched-de-cfsize-rt-path.patch" of type "text/plain" (13090 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ