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: <20070310091942.GC18250@elte.hu>
Date:	Sat, 10 Mar 2007 10:19:42 +0100
From:	Ingo Molnar <mingo@...e.hu>
To:	Cliff Wickman <cpw@....com>
Cc:	linux-kernel@...r.kernel.org,
	Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH 1/1] hotplug cpu: migrate a task within its cpuset


* Cliff Wickman <cpw@....com> wrote:

> With this patch, migrate the task to:
>  1) to any cpu on the same node as the disabled cpu, which is both online
>     and among that task's cpus_allowed
>  2) to any online cpu within the task's cpuset
>  3) to any cpu which is both online and among that task's cpus_allowed
> 
> Diffed against 2.6.21-rc3 (Andrew's current top of tree)

looks good to me.

Acked-by: Ingo Molnar <mingo@...e.hu>

> +	/* try to stay on the same cpuset */
> +	if (dest_cpu == NR_CPUS) {
> +		p->cpus_allowed = cpuset_cpus_allowed(p);
> +		dest_cpu = any_online_cpu(p->cpus_allowed);
> +	}

what's the practical effect of this - when moving the last CPU offline 
from a node you got jobs migrated to really alien nodes? Thus i think we 
should queue this up for v2.6.21 too, correct? It's a NOP on systems 
that do not set up cpusets, so it's low-risk.

btw., unrelated to your patch, there's this bit right after the code 
above:

        /* No more Mr. Nice Guy. */
        if (dest_cpu == NR_CPUS) {
                rq = task_rq_lock(p, &flags);
                cpus_setall(p->cpus_allowed);
                dest_cpu = any_online_cpu(p->cpus_allowed);

out of consistency, shouldnt the cpus_setall() rather be:

		p->cpus_allowed = cpu_possible_map;

? It shouldnt make any real difference but it looks more consistent.

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