All of lore.kernel.org
 help / color / mirror / Atom feed
From: Keir Fraser <keir.xen@gmail.com>
To: Andrew Cooper <andrew.cooper3@citrix.com>,
	Jan Beulich <JBeulich@suse.com>
Cc: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>
Subject: Re: [RFC] KEXEC: allocate crash note buffers at boot time
Date: Tue, 29 Nov 2011 11:19:03 +0000	[thread overview]
Message-ID: <CAFA7027.25E35%keir.xen@gmail.com> (raw)
In-Reply-To: <4ED52AF9.2080200@citrix.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,

  reply	other threads:[~2011-11-29 11:19 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-29 18:56 [RFC] KEXEC: allocate crash note buffers at boot time Andrew Cooper
2011-11-29 11:19 ` Keir Fraser [this message]
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  5:20                 ` Keir Fraser
2011-12-01 14:00                   ` Andrew Cooper
2011-12-01 13:59                 ` Andrew Cooper
2011-12-01 15:14                   ` 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
2011-12-02 16:10                               ` KEXEC: allocate crash note buffers at boot time v Andrew Cooper
2011-11-30  9:20 ` [RFC] KEXEC: allocate crash note buffers at boot time Jan Beulich
2011-11-30 14:01   ` Andrew Cooper

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAFA7027.25E35%keir.xen@gmail.com \
    --to=keir.xen@gmail.com \
    --cc=JBeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.