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, 10 Oct 2007 09:22:48 -0700
From:	mike kravetz <kravetz@...ibm.com>
To:	Gregory Haskins <ghaskins@...ell.com>
Cc:	mingo@...e.hu, peterz@...radead.org, rostedt@...dmis.org,
	linux-rt-users@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] RT: Fix special-case exception for preempting the local CPU

On Wed, Oct 10, 2007 at 10:49:35AM -0400, Gregory Haskins wrote:
> diff --git a/kernel/sched.c b/kernel/sched.c
> index 3e75c62..b7f7a96 100644
> --- a/kernel/sched.c
> +++ b/kernel/sched.c
> @@ -1869,7 +1869,8 @@ out_activate:
>  		 * extra locking in this particular case, because
>  		 * we are on the current CPU.)
>  		 */
> -		if (TASK_PREEMPTS_CURR(p, this_rq))
> +		if (TASK_PREEMPTS_CURR(p, this_rq)
> +		    && cpu_isset(this_cpu, p->cpus_allowed))
>  			set_tsk_need_resched(this_rq->curr);
>  		else
>  			/*

I wonder if it might better to explicitly take the rq lock and try to
put the task on this_rq in this situation?  Rather than waiting for
schedule to pull it from a remote rq as part of balance_rt_tasks.

A question that has passed through my head a few times is:  When waking
a RT task is it better to:
1) run on current CPU if possible
2) run on CPU task previously ran on

I think #1 may result in lower latency.  But, if the task has lots of
cache warmth the lower wakeup latency may be negated by running on a
'remote' cpu.
-- 
Mike
-
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