From: "Yu, Zhang" <yu.c.zhang@linux.intel.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: kevin.tian@intel.com, wei.liu2@citrix.com,
ian.campbell@citrix.com, stefano.stabellini@eu.citrix.com,
andrew.cooper3@citrix.com, ian.jackson@eu.citrix.com,
xen-devel@lists.xen.org, Paul.Durrant@citrix.com,
zhiyuan.lv@intel.com, keir@xen.org
Subject: Re: [PATCH v2 3/3] tools: introduce parameter max_wp_ram_ranges.
Date: Thu, 28 Jan 2016 00:12:14 +0800 [thread overview]
Message-ID: <56A8EC5E.7010700@linux.intel.com> (raw)
In-Reply-To: <56A8F72502000078000CBAD7@prv-mh.provo.novell.com>
On 1/27/2016 11:58 PM, Jan Beulich wrote:
>>>> On 27.01.16 at 16:23, <yu.c.zhang@linux.intel.com> wrote:
>
>>
>> On 1/27/2016 11:12 PM, Jan Beulich wrote:
>>>>>> On 27.01.16 at 15:56, <yu.c.zhang@linux.intel.com> wrote:
>>>> On 1/27/2016 10:32 PM, Jan Beulich wrote:
>>>>>>>> On 27.01.16 at 15:13, <yu.c.zhang@linux.intel.com> wrote:
>>>>>> About the truncation issue:
>>>>>> I do not quite follow. Will this hurt if the value configured does
>>>>>> not exceed 4G? What about a type cast?
>>>>>
>>>>> A typecast would not alter behavior in any way. And of course
>>>>> a problem only arises if the value was above 4 billion. You either
>>>>> need to refuse such values while the attempt is made to set it.
>>>>> or you need to deal with the full range of possible values. Likely
>>>>> the former is the better (and I wonder whether the upper
>>>>> bound shouldn't be forced even lower than 4 billion).
>>>>
>>>> Oh, I see. A check with the upper bound sounds better. Using 4G as the
>>>> upper bound is a little conservative, but I do not have any better
>>>> criteria right now. :)
>>>
>>> But when making that decision keep security in mind: How much
>>> memory would it take to populate 4G rangeset nodes?
>>>
>> Well, for XenGT, one extreme case I can imagine would be half of all
>> the guest ram is used as the GPU page table, and page frames containing
>> these page tables are discontinuous (rangeset can combine continuous
>> ranges). For other virtual devices to leverage the write-protected gfn
>> rangeset, I believe the same idea applies. :)
>> Is this logic OK?
>
> I can follow it, yes, but 4G ranges mean 16Tb of memory put
> in page tables, which to be honest doesn't seem reasonable to
> me.
>
Thanks for your reply, Jan.
In most cases max_memkb in configuration file will not be set to such a
big value. So I'd suggest we use a comparison between the one
calculated from max_memkb and 4G, and choose the smaller one as upper
bound. If some time in the future, it becomes common cases for VMs to
use huge rams, we should use uint64 for the rangeset limit other than a
uint32.
Yu
next prev parent reply other threads:[~2016-01-27 16:12 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-22 3:20 [PATCH v11 0/3] Refactor ioreq server for better performance Yu Zhang
2016-01-22 3:20 ` [PATCH v11 1/3] Refactor rangeset structure " Yu Zhang
2016-01-22 3:20 ` [PATCH v11 2/3] Differentiate IO/mem resources tracked by ioreq server Yu Zhang
2016-01-22 11:43 ` Jan Beulich
2016-01-26 7:59 ` Yu, Zhang
2016-01-26 11:24 ` Jan Beulich
2016-01-27 7:02 ` Yu, Zhang
2016-01-27 10:28 ` Jan Beulich
2016-01-22 3:20 ` [PATCH v2 3/3] tools: introduce parameter max_wp_ram_ranges Yu Zhang
2016-01-22 8:01 ` Jan Beulich
2016-01-26 7:32 ` Yu, Zhang
2016-01-26 11:00 ` Jan Beulich
2016-01-27 7:01 ` Yu, Zhang
2016-01-27 10:27 ` Jan Beulich
2016-01-27 14:13 ` Yu, Zhang
2016-01-27 14:32 ` Jan Beulich
2016-01-27 14:56 ` Yu, Zhang
2016-01-27 15:12 ` Jan Beulich
2016-01-27 15:23 ` Yu, Zhang
2016-01-27 15:58 ` Jan Beulich
2016-01-27 16:12 ` Yu, Zhang [this message]
2016-01-26 11:16 ` David Vrabel
2016-01-27 7:03 ` Yu, Zhang
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=56A8EC5E.7010700@linux.intel.com \
--to=yu.c.zhang@linux.intel.com \
--cc=JBeulich@suse.com \
--cc=Paul.Durrant@citrix.com \
--cc=andrew.cooper3@citrix.com \
--cc=ian.campbell@citrix.com \
--cc=ian.jackson@eu.citrix.com \
--cc=keir@xen.org \
--cc=kevin.tian@intel.com \
--cc=stefano.stabellini@eu.citrix.com \
--cc=wei.liu2@citrix.com \
--cc=xen-devel@lists.xen.org \
--cc=zhiyuan.lv@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.