All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: KEXEC: allocate crash note buffers at boot time v5
@ 2011-12-02 16:11 Jan Beulich
  2011-12-02 16:27 ` Andrew Cooper
  0 siblings, 1 reply; 6+ messages in thread
From: Jan Beulich @ 2011-12-02 16:11 UTC (permalink / raw)
  To: Andrew Cooper; +Cc: Keir Fraser, xen-devel@lists.xensource.com

>>> On 02.12.11 at 16:59, Andrew Cooper <andrew.cooper3@citrix.com> wrote:
> On 02/12/11 15:43, Jan Beulich wrote:
>> I just had another look at the Dom0 side of things, and I fail to see why
>> you think boot time allocation is necessary: All Dom0 does with the
>> provided info is set up the resource tree. The data doesn't get stored
>> for any post-boot use. What am I overlooking?
> 
> /sbin/kexec opens /proc/iomem and looks for "Crash note" and interprets
> the range values.  This is how it grabs the locations to pack into its
> magic binary package.

So how does the hotplug scenario then get handled on native? I can't
imagine they expect things to remain stable across CPU unplug and
re-activation.

Jan

^ permalink raw reply	[flat|nested] 6+ messages in thread
* Re: [RFC] KEXEC: allocate crash note buffers at boot time
@ 2011-11-29 11:19 Keir Fraser
  2011-11-30 13:14 ` Andrew Cooper
  0 siblings, 1 reply; 6+ messages in thread
From: Keir Fraser @ 2011-11-29 11:19 UTC (permalink / raw)
  To: Andrew Cooper, Jan Beulich; +Cc: xen-devel@lists.xensource.com

On 29/11/2011 18:56, "Andrew Cooper" <andrew.cooper3@citrix.com> wrote:

> Hello,
> 
> As I have little to no knowledge of this stage of the boot process, is
> this a sensible way to be setting up the per_cpu areas?  I have a
> sneaking suspicion that it will fall over if a CPU is onlined after
> boot, and may also fall over if a CPU is offlined and reonlined later.
> There appears to be no infrastructure currently in place for this type
> of initialization, which is quite possibly why the code exists in its
> current form.

No it's bad. For starters you should use for_each_online_cpu, not do an
open-coded for-loop. Secondly you should register a cpu hotplug notifier
(register_cpu_notifier()) to pick up and handle future
CPU_UP_PREPARE/CPU_UP_CANCELED/CPU_DEAD events. This can be hung off an
__initcall. See common/stop_machine.c for example, or common/timer.c, which
doesn't even require a for_each_online_cpu loop because its init code gets
run before we bring up secondary CPUs.

 -- Keir 

> Thanks,

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-12-02 16:55 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-02 16:11 KEXEC: allocate crash note buffers at boot time v5 Jan Beulich
2011-12-02 16:27 ` Andrew Cooper
2011-12-02 16:38   ` Jan Beulich
2011-12-02 16:55     ` Andrew Cooper
  -- strict thread matches above, loose matches on Subject: below --
2011-11-29 11:19 [RFC] KEXEC: allocate crash note buffers at boot time Keir Fraser
2011-11-30 13:14 ` Andrew Cooper
2011-11-30 17:24   ` [RFC] KEXEC: allocate crash note buffers at boot time v2 Andrew Cooper
2011-12-01  9:08     ` Jan Beulich
2011-12-01  9:49       ` Andrew Cooper
2011-12-01 10:01         ` Jan Beulich
2011-12-01 12:29           ` [RFC] KEXEC: allocate crash note buffers at boot time v3 Andrew Cooper
2011-12-01 12:56             ` Jan Beulich
2011-12-01 15:02               ` Andrew Cooper
2011-12-01 15:15                 ` Jan Beulich
2011-12-01 17:14                   ` [RFC] KEXEC: allocate crash note buffers at boot time v4 Andrew Cooper
2011-12-02  8:02                     ` Jan Beulich
2011-12-02 12:33                       ` Andrew Cooper
2011-12-02 15:19                         ` KEXEC: allocate crash note buffers at boot time v5 Andrew Cooper
2011-12-02 16:04                           ` Jan Beulich

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.