From: "Yu, Zhang" <yu.c.zhang@linux.intel.com>
To: Jan Beulich <JBeulich@suse.com>, Paul Durrant <Paul.Durrant@citrix.com>
Cc: Kevin Tian <kevin.tian@intel.com>,
"Keir (Xen.org)" <keir@xen.org>,
Andrew Cooper <Andrew.Cooper3@citrix.com>,
George Dunlap <George.Dunlap@citrix.com>,
"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>,
"zhiyuan.lv@intel.com" <zhiyuan.lv@intel.com>
Subject: Re: [PATCH v2 1/2] Resize the MAX_NR_IO_RANGES for ioreq server
Date: Tue, 07 Jul 2015 22:30:27 +0800 [thread overview]
Message-ID: <559BE283.8000107@linux.intel.com> (raw)
In-Reply-To: <559BF881020000780008D83D@mail.emea.novell.com>
Hi Jan,
On 7/7/2015 10:04 PM, Jan Beulich wrote:
>>>> On 07.07.15 at 15:11, <Paul.Durrant@citrix.com> wrote:
>>> -----Original Message-----
>>> From: Jan Beulich [mailto:JBeulich@suse.com]
>>> Sent: 07 July 2015 13:53
>>> To: Paul Durrant
>>> Cc: Andrew Cooper; George Dunlap; Kevin Tian; zhiyuan.lv@intel.com; Zhang
>>> Yu; xen-devel@lists.xen.org; Keir (Xen.org)
>>> Subject: RE: [Xen-devel] [PATCH v2 1/2] Resize the MAX_NR_IO_RANGES for
>>> ioreq server
>>>
>>>>>> On 07.07.15 at 11:23, <Paul.Durrant@citrix.com> wrote:
>>>> I wonder, would it be sufficient - at this stage - to add a new mapping sub-
>>> op
>>>> to the HVM op to distinguish mapping of mapping gfns vs. MMIO ranges.
>>> That
>>>> way we could use the same implementation underneath for now (using
>>> the
>>>> rb_rangeset, which I think stands on its own merits for MMIO ranges
>>> anyway)
>>>
>>> Which would be (taking into account the good description of the
>>> differences between RAM and MMIO pages given by George
>>> yesterday [I think])? I continue to not be convinced we need
>>> this new rangeset type (the more that it's name seems wrong,
>>> since - as said by George - we're unlikely to deal with ranges
>>> here).
>>>
>>
>> I don't see that implementing rangesets on top of rb tree is a problem. IMO
>> it's a useful optimization in its own right since it takes something that's
>> currently O(n) and makes it O(log n) using an rb tree implementation that's
>> already there. In fact, perhaps we just make the current rangeset
>> implementation use rb trees underneath, then there's no need for the extra
>> API.
>
> I wouldn't mind such an overall change (provided it doesn't
> introduce new issues), but I'm not convinced of having two
> rangeset implementations, and I don't see the lookup speed
> as an issue with the uses we have for rangesets now. The
> arguments for bumping the number of ranges, which would
> possibly affect lookup in a negative way, haven't been
> convincing to me so far (and XenGT isn't going to make 4.6
> anyway).
>
I know that George and you have concerns about the differences
between MMIO and guest page tables, but I do not quite understand
why. :)
Althogh the granularity of the write-protected memory is 4K in our
case, the trapped address is still a guest physical address, not a
guest page frame number. We can see the range as an 4K sized one,
right? Besides, in many cases, the guest graphic page tables are
continuous and the size of a range inside ioreq server is more than
4k. As you can see, the existing code already tracks the guest graphic
page tables by rangeset, and the difference here is that there would
be more page tables we need to take care of for BDW. Changing the
upper limit of the number of rangeset inside an ioreq server does
not necessarily mean there would be so many.
About the rb_rangeset I introduced, it is only for XenGT case,
because only in such cases will a more efficient data structure be
necessary - maybe in the future there would be more requirements to
this type.
Yes, XenGT may not catch up the 4.6. And thanks for your frankness. :)
But I'll still be very appreciated if you can give me some advices
and directions to go.
B.R.
Yu
> Jan
>
>
>
next prev parent reply other threads:[~2015-07-07 14:30 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-06 6:25 [PATCH v2 0/2] Refactor ioreq server for better performance Yu Zhang
2015-07-06 6:25 ` [PATCH v2 1/2] Resize the MAX_NR_IO_RANGES for ioreq server Yu Zhang
2015-07-06 12:35 ` George Dunlap
2015-07-06 12:38 ` Paul Durrant
2015-07-06 12:49 ` George Dunlap
2015-07-06 13:09 ` Paul Durrant
2015-07-06 13:23 ` George Dunlap
2015-07-06 13:28 ` George Dunlap
2015-07-06 13:33 ` Paul Durrant
2015-07-06 14:06 ` George Dunlap
2015-07-07 8:16 ` Yu, Zhang
2015-07-07 9:23 ` Paul Durrant
2015-07-07 12:53 ` Jan Beulich
2015-07-07 13:11 ` Paul Durrant
2015-07-07 14:04 ` Jan Beulich
2015-07-07 14:30 ` Yu, Zhang [this message]
2015-07-07 14:43 ` Jan Beulich
2015-07-07 14:49 ` Yu, Zhang
2015-07-07 15:10 ` Jan Beulich
2015-07-07 16:02 ` Yu, Zhang
2015-07-07 15:12 ` Paul Durrant
2015-07-07 15:27 ` Jan Beulich
2015-07-07 15:29 ` Paul Durrant
2015-07-06 6:25 ` [PATCH v2 2/2] Add new data structure to track ranges 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=559BE283.8000107@linux.intel.com \
--to=yu.c.zhang@linux.intel.com \
--cc=Andrew.Cooper3@citrix.com \
--cc=George.Dunlap@citrix.com \
--cc=JBeulich@suse.com \
--cc=Paul.Durrant@citrix.com \
--cc=keir@xen.org \
--cc=kevin.tian@intel.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 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).