Re: Oops in microcode sysfs registration,

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Ingo Molnar <mingo@...>
Cc: Alistair John Strachan <alistair@...>, Pekka Paalanen <pq@...>, Linus Torvalds <torvalds@...>, Linux Kernel Mailing List <linux-kernel@...>, <shaohua.li@...>, <tigran@...>, Thomas Gleixner <tglx@...>, Steven Rostedt <rostedt@...>, Max Krasnyansky <maxk@...>, Peter Zijlstra <a.p.zijlstra@...>
Date: Thursday, July 31, 2008 - 3:52 pm

2008/7/31 Ingo Molnar <mingo@elte.hu>:

Now having thought a bit more on that issue, I tend to think that this
patch is not all that nice (so I agree with Max here).

The root problem is the way set_cpus_allowed_ptr() is used in
microcode's cpu-hotplug handler. With cpu_active_map in place
set_cpus_allowed_ptr() can't migrate a task on the soon-to-be-online
cpu from withing a CPU_ONLINE handler (more in details here:
http://lkml.org/lkml/2008/7/24/260)

Basically, this patch marks a 'cpu' available for other tasks to be
migrated to it before sending CPU_ONLINE notification to
subscribers... [ now, there can be CPU_ONLINE
http://lkml.org/lkml/2008/7/24/260handlers that has something to do
with enabling migration/load-balancing. e.g. migration_call() ,
although it has the highest prio and is supposed to run first in a
chain ]

In another thread, I've asked whether doing 'microcode update' in
start_secondary() (or even at the beginning of idle_cpu() would be
better):

pros:
- it's done as early as possible (no other tasks has started running
on a cpu yet);
- no actions in cpu-hotplug;

cons:
- microcode sub-systems becomes visible outside of microcode.c _but_
it's arch-specific part anyway + with object-oriented re-work (which
is in -tip), I think it'd be that bad.

Alternatives:

- delayed 'microcode' update -> scheduled to 'workqueue'  (cons: it's
not as early as possible);
- Max suggested a combination of IPI + some wotk (request_firmware())
from cpu-hotplug handler itself. But I think it's quite a complex
scheme (and maybe prone to other problems).


What do you think?



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

Messages in current thread:
Linux v2.6.27-rc1, Linus Torvalds, (Mon Jul 28, 11:23 pm)
Linux v2.6.27-rc1: fails to compile, Grant Coady, (Tue Jul 29, 6:03 pm)
Re: Linux v2.6.27-rc1: fails to compile, Frederik Deweerdt, (Tue Jul 29, 6:40 pm)
Re: Linux v2.6.27-rc1: fails to compile, Grant Coady, (Tue Jul 29, 7:46 pm)
Re: Linux v2.6.27-rc1, Sam Ravnborg, (Tue Jul 29, 5:37 pm)
Re: Linux v2.6.27-rc1, Linus Torvalds, (Tue Jul 29, 5:42 pm)
Re: Linux v2.6.27-rc1, Sam Ravnborg, (Tue Jul 29, 5:59 pm)
Re: Linux v2.6.27-rc1, Linus Torvalds, (Tue Jul 29, 6:03 pm)
Re: Linux v2.6.27-rc1, Sam Ravnborg, (Tue Jul 29, 6:30 pm)
Re: Linux v2.6.27-rc1: problem with firmware stuff, Rafael J. Wysocki, (Tue Jul 29, 4:49 pm)
Re: Linux v2.6.27-rc1: problem with firmware stuff, Rafael J. Wysocki, (Tue Jul 29, 5:01 pm)
Re: Linux v2.6.27-rc1: problem with firmware stuff, Linus Torvalds, (Tue Jul 29, 5:01 pm)
Re: Linux v2.6.27-rc1: problem with firmware stuff, David Woodhouse, (Tue Jul 29, 6:26 pm)
Re: Linux v2.6.27-rc1, Jesse Barnes, (Tue Jul 29, 12:27 pm)
Re: Linux v2.6.27-rc1, Linus Torvalds, (Tue Jul 29, 12:59 pm)
Re: Linux v2.6.27-rc1, Andrew Morton, (Wed Jul 30, 5:03 am)
Re: Linux v2.6.27-rc1: linux-next, Rafael J. Wysocki, (Thu Jul 31, 6:22 pm)
Re: Linux v2.6.27-rc1, Roland Dreier, (Tue Jul 29, 1:31 pm)
Oops in microcode sysfs registration,, Alistair John Strachan, (Tue Jul 29, 9:57 am)
Re: Oops in microcode sysfs registration,, Pekka Paalanen, (Tue Jul 29, 12:22 pm)
Re: Oops in microcode sysfs registration,, Alistair John Strachan, (Tue Jul 29, 12:50 pm)
Re: Oops in microcode sysfs registration,, Dmitry Adamushko, (Wed Jul 30, 5:07 am)
Re: Oops in microcode sysfs registration,, Dmitry Adamushko, (Wed Jul 30, 6:35 am)
Re: Oops in microcode sysfs registration,, Ingo Molnar, (Thu Jul 31, 12:56 pm)
Re: Oops in microcode sysfs registration,, Dmitry Adamushko, (Thu Jul 31, 3:52 pm)
Re: Oops in microcode sysfs registration,, Dmitry Adamushko, (Thu Jul 31, 3:55 pm)
Re: Oops in microcode sysfs registration,, Alistair John Strachan, (Thu Jul 31, 8:49 am)
Re: Oops in microcode sysfs registration,, Peter Oruba, (Wed Jul 30, 9:28 am)
2.6.27-rc1: zd1211rw association fails, Alistair John Strachan, (Tue Jul 29, 5:49 am)
Re: 2.6.27-rc1: zd1211rw association fails, Johannes Berg, (Tue Jul 29, 6:09 am)
Re: 2.6.27-rc1: zd1211rw association fails, Theodore Tso, (Tue Jul 29, 8:04 am)
Re: 2.6.27-rc1: zd1211rw association fails, Johannes Berg, (Tue Jul 29, 8:09 am)
Re: 2.6.27-rc1: zd1211rw association fails, Johannes Berg, (Tue Jul 29, 8:15 am)
Re: 2.6.27-rc1: zd1211rw association fails, John W. Linville, (Tue Jul 29, 1:52 pm)
Re: 2.6.27-rc1: zd1211rw association fails, David Miller, (Wed Jul 30, 12:48 am)
Re: 2.6.27-rc1: zd1211rw association fails, Theodore Tso, (Tue Jul 29, 11:18 am)
Re: 2.6.27-rc1: zd1211rw association fails, Alistair John Strachan, (Tue Jul 29, 7:25 am)
Re: 2.6.27-rc1: zd1211rw association fails, Johannes Berg, (Tue Jul 29, 7:26 am)
Re: 2.6.27-rc1: zd1211rw association fails, Alistair John Strachan, (Tue Jul 29, 7:55 am)
Re: 2.6.27-rc1: zd1211rw association fails, Kalle Valo, (Tue Jul 29, 7:46 am)
Re: 2.6.27-rc1: zd1211rw association fails, Hugh Dickins, (Tue Jul 29, 7:37 am)
Re: Linux v2.6.27-rc1, Nick Piggin, (Tue Jul 29, 12:01 am)