From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: xen-devel <xen-devel@lists.xenproject.org>, Keir Fraser <keir@xen.org>
Subject: Re: [PATCH] x86: fix determination of bit count for struct domain allocations
Date: Fri, 14 Mar 2014 16:18:56 +0000 [thread overview]
Message-ID: <53232BF0.5040006@citrix.com> (raw)
In-Reply-To: <5323389A02000078001244B8@nat28.tlf.novell.com>
On 14/03/14 16:12, Jan Beulich wrote:
>>>> On 14.03.14 at 16:51, Andrew Cooper <andrew.cooper3@citrix.com> wrote:
>> On 14/03/14 15:46, Jan Beulich wrote:
>>>>>> On 14.03.14 at 16:30, Andrew Cooper <andrew.cooper3@citrix.com> wrote:
>>>> On 14/03/14 15:23, Jan Beulich wrote:
>>>>> We can't just add in the hole shift value, as the hole may be at or
>>>>> above the 44-bit boundary. Instead we need to determine the total bit
>>>>> count until reaching 32 significant (not squashed out) bits in PFN
>>>>> representations.
>>>>>
>>>>> Signed-off-by: Jan Beulich <jbeulich@suse.com>
>>>>>
>>>>> --- a/xen/arch/x86/domain.c
>>>>> +++ b/xen/arch/x86/domain.c
>>>>> @@ -180,6 +180,19 @@ void dump_pageframe_info(struct domain *
>>>>> spin_unlock(&d->page_alloc_lock);
>>>>> }
>>>>>
>>>>> +static unsigned int __init noinline _domain_struct_bits(void)
>>>> noinline for debugging purposes?
>>> No, for it to really end up in .init.text (as the caller is in .text).
>> In which case it should assert/bug if the function returns 0, to be sure
>> we will never fall into the unlikely case again and try to call it from
>> a non-init function. Also a comment to explain this.
> I really dislike asserting the absolutely obvious: The function can
> be very easily proven to only return values in the range [44,64].
>
> Jan
>
Hmm ok, but at the very least this deserves a comment to that effect.
~Andrew
next prev parent reply other threads:[~2014-03-14 16:19 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-14 15:23 [PATCH] x86: fix determination of bit count for struct domain allocations Jan Beulich
2014-03-14 15:30 ` Andrew Cooper
2014-03-14 15:46 ` Jan Beulich
2014-03-14 15:51 ` Andrew Cooper
2014-03-14 16:12 ` Jan Beulich
2014-03-14 16:18 ` Andrew Cooper [this message]
2014-03-24 8:56 ` Keir Fraser
2014-03-24 9:39 ` Jan Beulich
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=53232BF0.5040006@citrix.com \
--to=andrew.cooper3@citrix.com \
--cc=JBeulich@suse.com \
--cc=keir@xen.org \
--cc=xen-devel@lists.xenproject.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 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.