xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: David Vrabel <dvrabel@cantab.net>
To: Andrew Cooper <andrew.cooper3@citrix.com>
Cc: "Keir (Xen.org)" <keir@xen.org>, Jan Beulich <JBeulich@suse.com>,
	"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>
Subject: Re: kexec: Clear notes during setup
Date: Fri, 04 May 2012 17:01:06 +0100	[thread overview]
Message-ID: <4FA3FD42.2040802@cantab.net> (raw)
In-Reply-To: <4FA3F830.1050304@citrix.com>

On 04/05/12 16:39, Andrew Cooper wrote:
> On 04/05/12 16:25, Jan Beulich wrote:
>>>>> On 04.05.12 at 17:19, Andrew Cooper <andrew.cooper3@citrix.com> wrote:
>>> On 04/05/12 13:51, Jan Beulich wrote:
>>>>>>> On 04.05.12 at 13:42, Andrew Cooper <andrew.cooper3@citrix.com> wrote:
>>>>> I know that xen-unstable is on a feature freeze, and this is not
>>>>> strictly a bugfix (yet; see below), but as it is safe and designed to
>>>>> help clarity in the case of a crash, so I request that it be considered
>>>>> for inclusion.
>>>>>
>>>>> I have constructed an artificial case where the information reported in
>>>>> 1 per-cpu crash note was stale by using low_crashinfo mode, crashing
>>>>> Xen, allowing it to reboot, offlining a CPU then re-crashing Xen.  This
>>>>> leaves stale register state written into the offlined CPU crash
>>>>> information.  In this case, the information was stale but correct, due
>>>>> to the predictable nature of the Xen crash path from the 'C' debug key,
>>>>> but there is no guarantee that in the case of a real crash, the same
>>>>> will still be true.
>>>> Apart from the missing blanks in the for() statement (which could as
>>>> well be a simple memset() afaict),
>>>> Acked-by: Jan Beulich <jbeulich@suse.com>
>>>>
>>>> I personally would think that this can go in as a bug fix.
>>>>
>>>> Jan
>>> How would you format the for loop differently? (Not that I mind - just
>>> so I know for next time)
>>         for ( i = 0; i < (crash_heap_size >> PAGE_SHIFT); ++i )
> 
> Ok - refreshed the patch as such

See also CODING_STYLE in the top level of the Xen source tree.

>>> As for clear_page vs memset - clear_page is faster, and liable to be
>>> conditionally tuned more in the future.
>> Certainly, but does this matter here?
>>
>> Jan
>>
> 
> crash_heap_size scales linearly with the number of PCPUs on the system,
> so very large boxes might start noticing a difference in boot speed. 
> (Probably not in the grand scheme of things, but as we are explicitly
> allocating pages, it makes sense to clear them as pages)

If this is important then there should be a alloc_zeroed_xenheap_pages()
function for this and not an open-coded loop.  I'd just use a memset() here.

David

      reply	other threads:[~2012-05-04 16:01 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-04 11:42 kexec: Clear notes during setup Andrew Cooper
2012-05-04 12:51 ` Jan Beulich
2012-05-04 15:19   ` Andrew Cooper
2012-05-04 15:25     ` Jan Beulich
2012-05-04 15:39       ` Andrew Cooper
2012-05-04 16:01         ` David Vrabel [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=4FA3FD42.2040802@cantab.net \
    --to=dvrabel@cantab.net \
    --cc=JBeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=keir@xen.org \
    --cc=xen-devel@lists.xen.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).