From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: Keir Fraser <keir.xen@gmail.com>,
"xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>
Subject: Re: [RFC] KEXEC: allocate crash note buffers at boot time v4
Date: Fri, 2 Dec 2011 12:33:22 +0000 [thread overview]
Message-ID: <4ED8C592.3010603@citrix.com> (raw)
In-Reply-To: <4ED894100200007800064FE3@nat28.tlf.novell.com>
On 02/12/11 08:02, Jan Beulich wrote:
>>>> On 01.12.11 at 18:14, Andrew Cooper <andrew.cooper3@citrix.com> wrote:
> Looks good to me now except for one minor thing (below), and the
> fact that you still decided to retain the two duplicates of the size
> calculation (I'll have to remember to clean this up if you don't, unless
> Keir explicitly agrees with the duplication).
Ok - I will turn them into a start,size pair
>> + /* Try once again to allocate room for the crash notes. It is just possible
>> + * that more space has become available since we last tried. If space has
>> + * already been allocated, kexec_init_cpu_notes() will return early with 0.
>> + */
>> + if ( kexec_init_cpu_notes(nr) )
>> return -EINVAL;
> The function can fail only with -ENOMEM, so why not return this here?
>
> Jan
>
Actually, returning -EINVAL here is counter productive. -EINVAL is used
by dom0 to work out when it has asked for each CPU. This in itself is a
little broken because there is nothing stopping a middle CPU from being
offline at the time these hypercalls are made. The other thing is that
there is nothing stopping an offline cpu from having a valid notes
section. Therefore, the test of online should be removed, so -EINVAL
only gets returned for cpu out of range, or not set up notes at all in
the first place.
--
Andrew Cooper - Dom0 Kernel Engineer, Citrix XenServer
T: +44 (0)1223 225 900, http://www.citrix.com
next prev parent reply other threads:[~2011-12-02 12:33 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
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 [this message]
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=4ED8C592.3010603@citrix.com \
--to=andrew.cooper3@citrix.com \
--cc=JBeulich@suse.com \
--cc=keir.xen@gmail.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.