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: <1308160240.9218.129.camel@gandalf.stny.rr.com>
Date:	Wed, 15 Jun 2011 13:50:40 -0400
From:	Steven Rostedt <rostedt@...dmis.org>
To:	Hillf Danton <dhillf@...il.com>
Cc:	LKML <linux-kernel@...r.kernel.org>,
	Mike Galbraith <efault@....de>,
	Yong Zhang <yong.zhang0@...il.com>,
	Peter Zijlstra <peterz@...radead.org>,
	Ingo Molnar <mingo@...e.hu>
Subject: Re: [PATCH] sched: select eligible run-queue for RT task

On Fri, 2011-06-03 at 22:06 +0800, Hillf Danton wrote:
> When selecting run-queue for a given task, eligible run-queue should be
> returned by checking the CPU affinity of task.
> 
> Signed-off-by: Hillf Danton <dhillf@...il.com>
> ---
>  kernel/sched_rt.c |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
> 
> diff --git a/kernel/sched_rt.c b/kernel/sched_rt.c
> index 88725c9..45b3e0a 100644
> --- a/kernel/sched_rt.c
> +++ b/kernel/sched_rt.c
> @@ -1006,7 +1006,8 @@ select_task_rq_rt(struct task_struct *p, int
> sd_flag, int flags)
>  	int cpu;
> 
>  	if (sd_flag != SD_BALANCE_WAKE)
> -		return smp_processor_id();
> +		return cpumask_test_cpu(smp_processor_id(), &p->cpus_allowed) ?
> +			smp_processor_id() : task_cpu(p);

I wonder if we should bother even dhoing a test here. Perhaps a better
solution is just:

	if (sd_flag != SD_BALANCE_WAKE)
		return task_cpu(p);

-- Steve


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