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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20100329135700.GA25423@redhat.com>
Date:	Mon, 29 Mar 2010 15:57:00 +0200
From:	Oleg Nesterov <oleg@...hat.com>
To:	Tejun Heo <tj@...nel.org>
Cc:	linux-kernel@...r.kernel.org, rusty@...tcorp.com.au,
	sivanich@....com, heiko.carstens@...ibm.com,
	torvalds@...ux-foundation.org, mingo@...e.hu, dipankar@...ibm.com,
	josh@...edesktop.org, paulmck@...ux.vnet.ibm.com,
	akpm@...ux-foundation.org, peterz@...radead.org,
	arjan@...radead.org
Subject: Re: [PATCH 3/4] scheduler: replace migration_thread with cpuhog

As I said, personally I like these changes very much. Even if I can't ack them
I'd like to add my vote.

On 03/17, Tejun Heo wrote:
>
>  int set_cpus_allowed_ptr(struct task_struct *p, const struct cpumask *new_mask)
>  {
> ...
> +	if (migrate_task(p, dest_cpu)) {
> +		struct migration_arg arg = { p, dest_cpu };
>  		/* Need help from migration thread: drop lock and wait. */
> -		struct task_struct *mt = rq->migration_thread;
> -
> -		get_task_struct(mt);
>  		task_rq_unlock(rq, &flags);
> -		wake_up_process(rq->migration_thread);
> -		put_task_struct(mt);
> -		wait_for_completion(&req.done);
> +		hog_one_cpu(cpu_of(rq), migration_hog, &arg);

Afaics, this is the only change which can make a difference. If we race with
cpu_down(), set_cpus_allowed_ptr() can return before the task was actually
moved to another CPU. But this seems harmless to me.

Oleg.

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