All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ian Campbell <Ian.Campbell@XenSource.com>
To: Magnus Damm <magnus.damm@gmail.com>
Cc: Ian Pratt <m+Ian.Pratt@cl.cam.ac.uk>,
	Kazuo Moriwaka <moriwaka@valinux.co.jp>,
	xen-devel@lists.xensource.com,
	Akio Takebe <takebe_akio@jp.fujitsu.com>,
	Isaku Yamahata <yamahata@valinux.co.jp>,
	Magnus Damm <magnus@valinux.co.jp>, Horms <horms@verge.net.au>
Subject: Re: [PATCH 00/04] Kexec / Kdump: Release 20061122 (xen-unstable-12502)
Date: Wed, 29 Nov 2006 11:42:37 +0000	[thread overview]
Message-ID: <1164800557.2647.9.camel@localhost.localdomain> (raw)
In-Reply-To: <aec7e5c30611290313x538e1e6eodaf8193980322161@mail.gmail.com>

On Wed, 2006-11-29 at 20:13 +0900, Magnus Damm wrote: 
> On 11/29/06, Ian Campbell <Ian.Campbell@xensource.com> wrote:
> > On Wed, 2006-11-29 at 17:17 +0900, Magnus Damm wrote:
> > >
> > > The kexec tool creates (at load time) one PT_NOTE program header per
> > > note exported through /proc/iomem. The number of PT_NOTE program headers
> > > is the same as the NR_CPUS constant in the hypervisor.
> >
> > The guest kernel creates entries in /proc/iomem by calling
> > kexec_get_cpu(cpu) until it returns EINVAL. This currently happens when
> > cpu>NR_CPUS.
> >
> > I think this function should return EINVAL for cpu>num_present_cpus()
> > instead. Xen doesn't currently do PCPU hotplug and this wouldn't be the
> > only thing that would need fixing if it ever does (percpu data would be
> > another one I think ;-)).
> >
> > This would cause the tools to create notes only for CPUs which really
> > exist. That would make the loop in machine_crash_kexec() unnecessary.
> 
> I feel that using bss instead of per-cpu data is more robust and will
> make future cpu hotplug support a breeze to implement - at least in
> the case of kexec. Using bss also makes the loop in
> machine_crash_kexec() unnecessary.
> 
> Using num_present_cpus() will of course work as well, but I'd like to
> avoid adding code that likely needs to be rewritten in the near
> future.. But you know the future better than I do, so what do you
> think? =)

I don't think anyone is planning PCPU hotplug anytime soon (I've not
even heard rumours about the distant future ;-)). I do think that using
the existing infrastructure is the right way to go though rather than
open coding a different per cpu mechanism to solve a problem which
doesn't currently exist. If someone implements PCPU hotplug they will no
doubt need to update the per cpu infrastructure and if kdump is using it
then it can be taken into consideration at that time.

Cheers,
Ian.

      reply	other threads:[~2006-11-29 11:42 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-22  7:10 [PATCH 00/04] Kexec / Kdump: Release 20061122 (xen-unstable-12502) Magnus Damm
2006-11-22  7:10 ` [PATCH 01/04] Kexec / Kdump: Generic code Magnus Damm
2006-11-22  7:11 ` [PATCH 02/04] Kexec / Kdump: Code shared between x86_32 and x86_64 Magnus Damm
2006-11-22  7:11 ` [PATCH 03/04] Kexec / Kdump: x86_32 specific code Magnus Damm
2006-11-22  7:11 ` [PATCH 04/04] Kexec / Kdump: x86_64 " Magnus Damm
2006-11-22 18:24 ` [PATCH 00/04] Kexec / Kdump: Release 20061122 (xen-unstable-12502) Ian Campbell
2006-11-27  9:19   ` Magnus Damm
2006-11-27 12:09     ` Ian Campbell
2006-11-28  8:28       ` Magnus Damm
2006-11-28  9:26         ` Ian Campbell
2006-11-27 15:27     ` Dave Anderson
2006-11-28  8:30       ` Magnus Damm
2006-11-28 14:01         ` Dave Anderson
2006-11-29  2:35           ` Magnus Damm
2006-11-29  9:36             ` Ian Campbell
2006-11-29 10:59               ` Magnus Damm
2006-11-29 11:06                 ` Ian Campbell
2006-11-28 18:24 ` Ian Campbell
2006-11-28 18:50   ` Keir Fraser
2006-11-29  4:30   ` Magnus Damm
2006-11-29  7:54     ` Keir Fraser
2006-11-29  8:17       ` Magnus Damm
2006-11-29  9:35         ` Ian Campbell
2006-11-29 11:13           ` Magnus Damm
2006-11-29 11:42             ` Ian Campbell [this message]

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=1164800557.2647.9.camel@localhost.localdomain \
    --to=ian.campbell@xensource.com \
    --cc=horms@verge.net.au \
    --cc=m+Ian.Pratt@cl.cam.ac.uk \
    --cc=magnus.damm@gmail.com \
    --cc=magnus@valinux.co.jp \
    --cc=moriwaka@valinux.co.jp \
    --cc=takebe_akio@jp.fujitsu.com \
    --cc=xen-devel@lists.xensource.com \
    --cc=yamahata@valinux.co.jp \
    /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.