WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [PATCH 00/04] Kexec / Kdump: Release 20061122 (xen-unsta

To: "Ian Campbell" <Ian.Campbell@xxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH 00/04] Kexec / Kdump: Release 20061122 (xen-unstable-12502)
From: "Magnus Damm" <magnus.damm@xxxxxxxxx>
Date: Wed, 29 Nov 2006 20:13:39 +0900
Cc: Ian Pratt <m+Ian.Pratt@xxxxxxxxxxxx>, Kazuo Moriwaka <moriwaka@xxxxxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxx, Akio Takebe <takebe_akio@xxxxxxxxxxxxxx>, Isaku Yamahata <yamahata@xxxxxxxxxxxxx>, Magnus Damm <magnus@xxxxxxxxxxxxx>, Horms <horms@xxxxxxxxxxxx>
Delivery-date: Wed, 29 Nov 2006 03:13:42 -0800
Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=LXjGvNfJu5SXv5nHt9PgC5POt7bT9nB+xq5MiU8f/QIIebNvHqXLzQE82yNZtaWJg8MEXF5lOXh02HzD4ou/ejEettZANLlla6ylDjTMTwpv/do0PyfyS3mvagNMbPH4Tiyi7TYqQFS6udlIla5i6fxee7bBOqC8OWz8Xu5fh9A=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <1164792929.3336.228.camel@xxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <C192ED37.5016%Keir.Fraser@xxxxxxxxxxxx> <1164788262.30816.41.camel@localhost> <1164792929.3336.228.camel@xxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
On 11/29/06, Ian Campbell <Ian.Campbell@xxxxxxxxxxxxx> 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? =)

Thanks!

/ magnus

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel