Re: [PATCH] adjust root-domain->online span in response to hotplugevent

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Gregory Haskins <ghaskins@...>
Cc: Ingo Molnar <mingo@...>, <ego@...>, <suresh.b.siddha@...>, <yi.y.yang@...>, <tglx@...>, <akpm@...>, <rjw@...>, <oleg@...>, <linux-kernel@...>
Date: Saturday, March 8, 2008 - 8:31 pm

On 08/03/2008, Gregory Haskins <ghaskins@novell.com> wrote:

I guess, it's in arch-specific code. e.g. for x86-64,

down:

kernel/cpu.c :: _cpu_down -> take_cpu_down() -> __cpu_disable() [
arch/x86/kernel/smpboot_64.c ] -> cpu_clear(cpu, cpu_online_map)

up:

kernel/cpu.c :: _cpu_up() -> __cpu_up [ arch/x86/kernel/smpboot_64.c ]
-> do_boot_cpu() -> start_secondary() [ runs on a to-be-online cpu ]
-> cpu_set(smp_processor_id(), cpu_online_map)

there are cpu-notification events available before a cpu gets removed
from cpu_online_map or after it gets added, so I guess (a first guess.
I'll also look at the code) they should be a sync. point.

I have a small patch to record some events during the cpu_down/up. I
have a trace but will already analyze it tomorrow.
[ the patch is enclosed (err.. it also includes Gregory's fix... I
just forgot to commit it previously :-/) ]

e.g. it should print a message if a task is placed on the 'offline'
cpu. Note, the 'cpu' is removed from the cpu_online_map before
migrate_live_tasks() runs. So if any task remains on the offline cpu,
it has been likely placed there already after migrate_live_tasks().



-- 
Best regards,
Dmitry Adamushko
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] keep rd-&gt;online and cpu_online_map in sync, Gregory Haskins, (Mon Mar 10, 9:39 am)
Re: [PATCH] keep rd-&gt;online and cpu_online_map in sync, Suresh Siddha, (Mon Mar 10, 2:12 pm)
Re: [PATCH] keep rd-&gt;online and cpu_online_map in sync, Rafael J. Wysocki, (Mon Mar 10, 6:03 pm)
Re: [PATCH] keep rd-&gt;online and cpu_online_map in sync, Gregory Haskins, (Mon Mar 10, 6:00 pm)
Re: [PATCH] keep rd-&gt;online and cpu_online_map in sync, Suresh Siddha, (Mon Mar 10, 6:10 pm)
[PATCH v2] keep rd-&gt;online and cpu_online_map in sync, Gregory Haskins, (Mon Mar 10, 5:59 pm)
Re: [PATCH v2] keep rd-&gt;online and cpu_online_map in sync, Gautham R Shenoy, (Tue Mar 11, 12:39 am)
Re: [PATCH] keep rd-&gt;online and cpu_online_map in sync, Gautham R Shenoy, (Mon Mar 10, 10:21 am)
Re: [PATCH] adjust root-domain->online span in response t..., Dmitry Adamushko, (Sat Mar 8, 8:31 pm)