From: "Jan Beulich" <jbeulich@novell.com>
To: Xiaowei Yang <xiaowei.yang@intel.com>
Cc: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>
Subject: Re: [PATCH] Fix domheap structure allocation when NUMA=on
Date: Fri, 20 Mar 2009 08:47:50 +0000 [thread overview]
Message-ID: <49C36646.76E4.0078.0@novell.com> (raw)
In-Reply-To: <49C35517.7040706@intel.com>
>>> "Yang, Xiaowei" <xiaowei.yang@intel.com> 20.03.09 09:34 >>>
>Jan Beulich wrote:
>>>>> "Yang, Xiaowei" <xiaowei.yang@intel.com> 20.03.09 06:05 >>>
>>> DIRECTMAP_VIRT_END can't be passed to virt_to_mfn(), as it's just beyond
>>> direct map boundary and triggers ASSERT very early at boot time.
>>
>> While I agree to the analysis, I would think that this
>>
>> + mfn + needed <= virt_to_mfn(DIRECTMAP_VIRT_END - PAGE_SIZE) )
>>
>> should rather be
>>
>> + mfn + needed <= virt_to_mfn(DIRECTMAP_VIRT_END - 1) + 1 )
>>
>virt_to_mfn(DIRECTMAP_VIRT_END - 1) is equal to
Depending on whether DIRECTMAP_VIRT_END is the last byte or the first
following byte. Using "- 1" avoids such a dependency.
>virt_to_mfn(DIRECTMAP_VIRT_END - PAGE_SIZE). Why +1? We use '<=' here.
Because on the left side of the comparison we also calculate the first
following mfn, not the last included one.
Jan
next prev parent reply other threads:[~2009-03-20 8:47 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-20 5:05 [PATCH] Fix domheap structure allocation when NUMA=on Yang, Xiaowei
2009-03-20 8:15 ` Jan Beulich
2009-03-20 8:34 ` Yang, Xiaowei
2009-03-20 8:47 ` Jan Beulich [this message]
2009-03-20 8:56 ` Keir Fraser
2009-03-20 9:27 ` Jan Beulich
2009-03-20 9:32 ` Keir Fraser
2009-03-24 10:48 ` Yang, Xiaowei
2009-03-24 10:55 ` 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=49C36646.76E4.0078.0@novell.com \
--to=jbeulich@novell.com \
--cc=xen-devel@lists.xensource.com \
--cc=xiaowei.yang@intel.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.