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:	Thu, 31 Jan 2013 11:08:10 -0500
From:	Steven Rostedt <rostedt@...dmis.org>
To:	Kirill Tkhai <tkhai@...dex.ru>
Cc:	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Ingo Molnar <mingo@...nel.org>,
	Peter Zijlstra <peterz@...radead.org>,
	linux-rt-users <linux-rt-users@...r.kernel.org>
Subject: Re: [PATCH] sched/rt: Decrease number of calls of push_rt_task() in
 push_rt_tasks()

On Mon, 2013-01-28 at 03:46 +0400, Kirill Tkhai wrote:
> The patch aims to decrease the number of calls of push_rt_task()
> in push_rt_tasks().
> 
> It's not necessary to push more than 'num_online_cpus() - 1' tasks.
> If just pushed task doesn't leave its new CPU during our local call
> of push_rt_tasks() than we won't push another task to the CPU.
> If it leave or change priority than it will pull new task by itself.

I'm curious. Have you hit situations where this was an issue? Or was
this just discovered by code review?

-- Steve

> 
> Signed-off-by: Kirill V Tkhai <tkhai@...dex.ru>
> CC: Steven Rostedt <rostedt@...dmis.org>
> CC: Ingo Molnar <mingo@...nel.org>
> CC: Peter Zijlstra <peterz@...radead.org>
> CC: linux-rt-users <linux-rt-users@...r.kernel.org>
> ---
>  kernel/sched/rt.c |    4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> diff --git a/kernel/sched/rt.c b/kernel/sched/rt.c
> index 4e8f0f4..edf046d 100644
> --- a/kernel/sched/rt.c
> +++ b/kernel/sched/rt.c
> @@ -1703,8 +1703,10 @@ out:
>  
>  static void push_rt_tasks(struct rq *rq)
>  {
> +	int num_cpus = num_online_cpus() - 1;
> +
>  	/* push_rt_task will return true if it moved an RT */
> -	while (push_rt_task(rq))
> +	while (push_rt_task(rq) && --num_cpus > 0)
>  		;
>  }
>  


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