xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: George Dunlap <george.dunlap@eu.citrix.com>
To: Paul Durrant <Paul.Durrant@citrix.com>,
	George Dunlap <George.Dunlap@citrix.com>
Cc: Kevin Tian <kevin.tian@intel.com>,
	"Keir (Xen.org)" <keir@xen.org>,
	Andrew Cooper <Andrew.Cooper3@citrix.com>,
	"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>,
	Yu Zhang <yu.c.zhang@linux.intel.com>,
	"zhiyuan.lv@intel.com" <zhiyuan.lv@intel.com>,
	Jan Beulich <JBeulich@suse.com>
Subject: Re: [PATCH v2 1/2] Resize the MAX_NR_IO_RANGES for ioreq server
Date: Mon, 6 Jul 2015 14:23:39 +0100	[thread overview]
Message-ID: <559A815B.9090007@eu.citrix.com> (raw)
In-Reply-To: <9AAE0902D5BC7E449B7C8E4E778ABCD02598B096@AMSPEX01CL02.citrite.net>

On 07/06/2015 02:09 PM, Paul Durrant wrote:
>> -----Original Message-----
>> From: dunlapg@gmail.com [mailto:dunlapg@gmail.com] On Behalf Of
>> George Dunlap
>> Sent: 06 July 2015 13:50
>> To: Paul Durrant
>> Cc: Yu Zhang; xen-devel@lists.xen.org; Keir (Xen.org); Jan Beulich; Andrew
>> Cooper; Kevin Tian; zhiyuan.lv@intel.com
>> Subject: Re: [Xen-devel] [PATCH v2 1/2] Resize the MAX_NR_IO_RANGES for
>> ioreq server
>>
>> On Mon, Jul 6, 2015 at 1:38 PM, Paul Durrant <Paul.Durrant@citrix.com>
>> wrote:
>>>> -----Original Message-----
>>>> From: dunlapg@gmail.com [mailto:dunlapg@gmail.com] On Behalf Of
>>>> George Dunlap
>>>> Sent: 06 July 2015 13:36
>>>> To: Yu Zhang
>>>> Cc: xen-devel@lists.xen.org; Keir (Xen.org); Jan Beulich; Andrew Cooper;
>>>> Paul Durrant; Kevin Tian; zhiyuan.lv@intel.com
>>>> Subject: Re: [Xen-devel] [PATCH v2 1/2] Resize the MAX_NR_IO_RANGES
>> for
>>>> ioreq server
>>>>
>>>> On Mon, Jul 6, 2015 at 7:25 AM, Yu Zhang <yu.c.zhang@linux.intel.com>
>>>> wrote:
>>>>> MAX_NR_IO_RANGES is used by ioreq server as the maximum
>>>>> number of discrete ranges to be tracked. This patch changes
>>>>> its value to 8k, so that more ranges can be tracked on next
>>>>> generation of Intel platforms in XenGT. Future patches can
>>>>> extend the limit to be toolstack tunable, and MAX_NR_IO_RANGES
>>>>> can serve as a default limit.
>>>>>
>>>>> Signed-off-by: Yu Zhang <yu.c.zhang@linux.intel.com>
>>>>
>>>> I said this at the Hackathon, and I'll say it here:  I think this is
>>>> the wrong approach.
>>>>
>>>> The problem here is not that you don't have enough memory ranges.  The
>>>> problem is that you are not tracking memory ranges, but individual
>>>> pages.
>>>>
>>>> You need to make a new interface that allows you to tag individual
>>>> gfns as p2m_mmio_write_dm, and then allow one ioreq server to get
>>>> notifications for all such writes.
>>>>
>>>
>>> I think that is conflating things. It's quite conceivable that more than one
>> ioreq server will handle write_dm pages. If we had enough types to have
>> two page types per server then I'd agree with you, but we don't.
>>
>> What's conflating things is using an interface designed for *device
>> memory ranges* to instead *track writes to gfns*.
> 
> What's the difference? Are you asserting that all device memory ranges have read side effects and therefore write_dm is not a reasonable optimization to use? I would not want to make that assertion.

The difference is that actual device memory is typically in big chunks,
and each device rarely has more than a handful; whereas guest pfns
allocated by the operating system to a driver are typically singleton
pages scattered all over the address space.

Which is why a handful of memory ranges is sufficient for tracking
devices with hundreds of megabytes of device memory, but thousands of
memory ranges are not sufficient for tracking a megabyte or so of GPU
pagetables: the former is one or two actual ranges of a significant
size; the latter are (apparently) thousands of ranges of one page each.

 -George

  reply	other threads:[~2015-07-06 13:23 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 [this message]
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
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=559A815B.9090007@eu.citrix.com \
    --to=george.dunlap@eu.citrix.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=yu.c.zhang@linux.intel.com \
    --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).