[lkml]   [2011]   [Dec]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [PATCH v4 0/7] x86: BSP or CPU0 online/offline

    * Yu, Fenghua <> wrote:

    > > We need a debug feature for this:
    > > CONFIG_DEBUG_BOOT_CPU_OFF=y or such (disabled by default):
    > > this feature would offline the boot CPU as soon as possible,
    > > and boot up userspace with the boot CPU offlined.
    > I would think the earliest time when CPU0 can be offline is
    > right after do_initcalls() because do_initcalls() installs
    > some cpu hotplug notifier.
    > But this will change generic code (e.g. add arch hook in
    > init/main.c or add a new initcall level which is after level
    > 7s).
    > Another way is to offline CPU0 (or any CPU) in /etc/rc.local.
    > By this way, we don't change kernel. And this is safe, but a
    > bit later than in kernel.
    > Any comment?

    I think we should try to do this in the kernel, to keep the
    debug feature independent of user-space code. This also helps
    us clean init code from boot CPU assumptions.

    Not sure we need a new initlevel - why not just offline the CPU?
    I suspect the cpu hotplug notifier installation that is done in
    do_initcalls() should be moved earlier so that the boot CPU can
    be offlined as early as a secondary CPU is up and running.



     \ /
      Last update: 2011-12-15 20:01    [W:0.022 / U:4.232 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site