All of lore.kernel.org
 help / color / mirror / Atom feed
From: George Dunlap <george.dunlap@citrix.com>
To: Paul Durrant <Paul.Durrant@citrix.com>
Cc: Kevin Tian <kevin.tian@intel.com>, Wei Liu <wei.liu2@citrix.com>,
	Ian Campbell <Ian.Campbell@citrix.com>,
	Andrew Cooper <Andrew.Cooper3@citrix.com>,
	"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>,
	Zhang Yu <yu.c.zhang@linux.intel.com>,
	Zhiyuan Lv <zhiyuan.lv@intel.com>,
	Jan Beulich <JBeulich@suse.com>,
	Ian Jackson <Ian.Jackson@citrix.com>,
	Stefano Stabellini <Stefano.Stabellini@citrix.com>,
	"Keir (Xen.org)" <keir@xen.org>
Subject: Re: [PATCH v3 3/3] tools: introduce parameter max_wp_ram_ranges.
Date: Mon, 22 Feb 2016 16:45:49 +0000	[thread overview]
Message-ID: <56CB3B3D.1020704@citrix.com> (raw)
In-Reply-To: <1410cf0d2aea4394a668c92277edd411@AMSPEX02CL03.citrite.net>

On 22/02/16 16:02, Paul Durrant wrote:
>> -----Original Message-----
>> From: dunlapg@gmail.com [mailto:dunlapg@gmail.com] On Behalf Of
>> George Dunlap
>> Sent: 22 February 2016 15:56
>> To: Paul Durrant
>> Cc: George Dunlap; Jan Beulich; Kevin Tian; Zhang Yu; Wei Liu; Ian Campbell;
>> Andrew Cooper; xen-devel@lists.xen.org; Stefano Stabellini; Zhiyuan Lv; Ian
>> Jackson; Keir (Xen.org)
>> Subject: Re: [Xen-devel] [PATCH v3 3/3] tools: introduce parameter
>> max_wp_ram_ranges.
>>
>> On Wed, Feb 17, 2016 at 11:12 AM, Paul Durrant <Paul.Durrant@citrix.com>
>> wrote:
>>>> -----Original Message-----
>>>> From: George Dunlap [mailto:george.dunlap@citrix.com]
>>>> Sent: 17 February 2016 11:02
>>>> To: Jan Beulich; Paul Durrant; Kevin Tian; Zhang Yu
>>>> Cc: Andrew Cooper; Ian Campbell; Ian Jackson; Stefano Stabellini; Wei Liu;
>>>> Zhiyuan Lv; xen-devel@lists.xen.org; George Dunlap; Keir (Xen.org)
>>>> Subject: Re: [Xen-devel] [PATCH v3 3/3] tools: introduce parameter
>>>> max_wp_ram_ranges.
>>>>
>>>> On 17/02/16 10:22, Jan Beulich wrote:
>>>>>>>> On 17.02.16 at 10:58, <kevin.tian@intel.com> wrote:
>>>>>> Thanks for the help. Let's see whether we can have some solution
>> ready
>>>> for
>>>>>> 4.7. :-)
>>>>>
>>>>> Since we now seem to all agree that a different approach is going to
>>>>> be taken, I think we indeed should revert f5a32c5b8e ("x86/HVM:
>>>>> differentiate IO/mem resources tracked by ioreq server"). Please
>>>>> voice objections to the plan pretty soon.
>>>>
>>>> FWIW, after this discussion, I don't have an objection to the basic
>>>> interface in this series as it is, since it addresses my request that it
>>>> be memory-based, and it could be switched to using p2m types
>>>> behind-the-scenes -- with the exception of the knob to control how many
>>>> ranges are allowed (since it exposes the internal implementation).
>>>>
>>>> I wouldn't object to the current implementation going in as it was in v9
>>>> (apparently), and then changing the type stuff around behind the scenes
>>>> later as an optimization.  I also don't think it would be terribly
>>>> difficult to change the implementation as it is to just use write_dm for
>>>> a single IOREQ server.  We can rename it ioreq_server and expand it
>>>> later.  Sorry if this wasn't clear from my comments before.
>>>>
>>>
>>> The problem is that, since you objected to wp_mem being treated the
>> same as mmio, we had to introduce a new range type to the map/unmap
>> hypercalls and that will become redundant if we steer by type. If we could
>> have just increased the size of the rangeset for mmio and used that *for
>> now* then weeks of work could have been saved going down this dead end.
>>
>> So first of all, let me say that I handled things respect to this
>> thread rather poorly in a lot of ways, and you're right to be
>> frustrated.  All I can say is, I'm sorry and I'll try to do better.
>>
>> I'm not sure I understand what you're saying with this line: "We had
>> to introduce a new range type to the map/unmap hypercalls that will
>> become redundant if we steer by type".
>>
> 
> What I means is that if we are going to do away with the concept of 'wp mem' and replace it with 'special type for steering to ioreq server' then we only need range types of pci, portio and mmio as we had before.

I'm still confused.

To me, there are two distinct things here: the interface and the
implementation.

>From an interface perspective, ioreq servers need to be able to ask Xen
to intercept writes to specific memory regions.  I insisted that this
interface be specifically designed for memory, not calling them MMIO
regions (since it's actually memory and not MMIO regions); and I said
that the explosion in number of required rangesets demonstrated that
rangesets were a bad fit to implement this interface.

What you did in an earlier version of this series (correct me if I'm
wrong) is to make a separate hypercall for memory, but still keep using
the same internal implementation (i.e., still having a write_dm p2m type
and using rangesets to determine which ioreq server to give the
notification to).  But since the interface for memory looks exactly the
same as the interface for MMIO, at some point this morphed back to "use
xen_hvm_io_range but with a different range type (i.e., WP_MEM)".

>From an *interface* perspective that makes sense, because in both cases
you want to be able to specify a domain, an ioreq server, and a range of
physical addresses.  I don't have any objection to the change you made
to hvm_op.h in this version of the series.

But from an *implementation* perspective, you're back to the very thing
I objected to -- having a large and potentially unbounded number of
rangesets, and baking that implementation into the interface by
requiring the administrator to specify the maxiumum number of rangesets
with a HVM_PARAM.

My suggestion was that you retain the same interface that you exposed in
hvm_op.h (adding WP_MEM), but instead of using rangesets to determine
which ioreq server to send the notification to, use p2m types instead.
The interface to qemu can be exactly the same as it is now, but you
won't need to increase the number of rangesets.  In fact, if you only
allow one ioreq server to register for WP_MEM at a time, then you don't
even  need to change the p2m code.

One way or another, you still want the ioreq server to be able to
intercept writes to guest memory, so I don't understand in what way "we
are going to do away with the concept of 'wp mem'".

The only question is whether it's going to go through xen_hvm_io_range
or some other hypecall -- and I don't particularly care which one it
ends up being, as long as it doesn't require setting this magic
potentially unbounded parameter.

 -George

  reply	other threads:[~2016-02-22 16:45 UTC|newest]

Thread overview: 109+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-29 10:45 [PATCH v12 0/3] Refactor ioreq server for better performance Yu Zhang
2016-01-29 10:45 ` [PATCH v12 1/3] Refactor rangeset structure " Yu Zhang
2016-01-29 10:45 ` [PATCH v12 2/3] Differentiate IO/mem resources tracked by ioreq server Yu Zhang
2016-01-29 10:45 ` [PATCH v3 3/3] tools: introduce parameter max_wp_ram_ranges Yu Zhang
2016-01-29 16:33   ` Jan Beulich
2016-01-30 14:38     ` Yu, Zhang
2016-02-01  7:52       ` Jan Beulich
2016-02-01 12:02         ` Wei Liu
2016-02-01 12:15           ` Jan Beulich
2016-02-01 12:49             ` Wei Liu
2016-02-01 13:07               ` Jan Beulich
2016-02-01 15:14                 ` Yu, Zhang
2016-02-01 16:16                   ` Jan Beulich
2016-02-01 16:33                     ` Yu, Zhang
2016-02-01 16:19                   ` Yu, Zhang
2016-02-01 16:35                     ` Jan Beulich
2016-02-01 16:37                       ` Yu, Zhang
2016-02-01 17:05                         ` Ian Jackson
2016-02-02  8:04                           ` Yu, Zhang
2016-02-02 11:51                             ` Wei Liu
2016-02-02 13:56                               ` Yu, Zhang
2016-02-02 10:32                           ` Jan Beulich
2016-02-02 10:56                             ` Yu, Zhang
2016-02-02 11:12                               ` Jan Beulich
2016-02-02 14:01                                 ` Yu, Zhang
2016-02-02 14:42                                   ` Jan Beulich
2016-02-02 15:00                                     ` Yu, Zhang
2016-02-02 15:21                                       ` Jan Beulich
2016-02-02 15:19                                         ` Yu, Zhang
2016-02-03  7:10                                         ` Yu, Zhang
2016-02-03  8:32                                           ` Jan Beulich
2016-02-03 12:20                                             ` Paul Durrant
2016-02-03 12:35                                               ` Jan Beulich
2016-02-03 12:50                                                 ` Paul Durrant
2016-02-03 13:00                                                   ` Jan Beulich
2016-02-03 13:07                                                     ` Paul Durrant
2016-02-03 13:17                                                       ` Jan Beulich
2016-02-03 13:18                                                         ` Paul Durrant
2016-02-03 14:43                                                           ` Ian Jackson
2016-02-03 15:10                                                             ` Paul Durrant
2016-02-03 17:50                                                               ` George Dunlap
2016-02-04  8:50                                                                 ` Yu, Zhang
2016-02-03 17:41                                                             ` George Dunlap
2016-02-03 18:21                                                               ` George Dunlap
2016-02-03 18:26                                                                 ` George Dunlap
2016-02-03 18:39                                                                 ` Andrew Cooper
2016-02-03 19:12                                                                   ` George Dunlap
2016-02-04  8:51                                                                     ` Yu, Zhang
2016-02-04 10:49                                                                       ` George Dunlap
2016-02-04 11:08                                                                         ` Ian Campbell
2016-02-04 11:19                                                                           ` Ian Campbell
2016-02-04  8:50                                                                 ` Yu, Zhang
2016-02-04  9:28                                                                   ` Paul Durrant
2016-02-04  9:38                                                                     ` Yu, Zhang
2016-02-04  9:49                                                                       ` Paul Durrant
2016-02-04 10:34                                                                       ` Jan Beulich
2016-02-04 13:33                                                                         ` Ian Jackson
2016-02-04 13:47                                                                           ` Paul Durrant
2016-02-04 14:12                                                                             ` Jan Beulich
2016-02-04 14:25                                                                               ` Paul Durrant
2016-02-04 15:06                                                                                 ` Ian Jackson
2016-02-04 15:51                                                                                   ` Paul Durrant
2016-02-05  3:47                                                                                     ` Tian, Kevin
2016-02-05  3:35                                                                               ` Tian, Kevin
2016-02-04 14:08                                                                           ` Jan Beulich
2016-02-04 17:12                                                                             ` George Dunlap
2016-02-05  4:18                                                                               ` Tian, Kevin
2016-02-05  8:41                                                                                 ` Yu, Zhang
2016-02-05  8:32                                                                               ` Jan Beulich
2016-02-05  9:24                                                                                 ` Paul Durrant
2016-02-05 10:41                                                                                   ` Jan Beulich
2016-02-05 11:14                                                                                   ` George Dunlap
2016-02-05 11:24                                                                                     ` Paul Durrant
2016-02-16  7:22                                                                                       ` Tian, Kevin
2016-02-16  8:50                                                                                         ` Paul Durrant
2016-02-16 10:33                                                                                           ` Jan Beulich
2016-02-16 11:11                                                                                             ` Paul Durrant
2016-02-17  3:18                                                                                               ` Tian, Kevin
2016-02-17  8:58                                                                                                 ` Paul Durrant
2016-02-17  9:32                                                                                                   ` Jan Beulich
2016-02-17  9:58                                                                                                   ` Tian, Kevin
2016-02-17 10:03                                                                                                     ` Paul Durrant
2016-02-17 10:22                                                                                                     ` Jan Beulich
2016-02-17 10:24                                                                                                       ` Paul Durrant
2016-02-17 10:25                                                                                                         ` Tian, Kevin
2016-02-17 11:01                                                                                                       ` George Dunlap
2016-02-17 11:12                                                                                                         ` Paul Durrant
2016-02-22 15:56                                                                                                           ` George Dunlap
2016-02-22 16:02                                                                                                             ` Paul Durrant
2016-02-22 16:45                                                                                                               ` George Dunlap [this message]
2016-02-22 17:01                                                                                                                 ` Paul Durrant
2016-02-22 17:23                                                                                                                   ` George Dunlap
2016-02-22 17:34                                                                                                                     ` Paul Durrant
2016-02-05  8:41                                                                               ` Yu, Zhang
2016-02-04 11:06                                                                       ` George Dunlap
2016-02-05  2:01                                                                         ` Zhiyuan Lv
2016-02-05  3:44                                                                           ` Tian, Kevin
2016-02-05  8:38                                                                             ` Jan Beulich
2016-02-05 11:05                                                                             ` George Dunlap
2016-02-05 15:13                                                                               ` Zhiyuan Lv
2016-02-05 20:14                                                                                 ` George Dunlap
2016-02-05  8:40                                                                         ` Yu, Zhang
2016-02-04 10:06                                                               ` Ian Campbell
2016-02-05  3:31                                                                 ` Tian, Kevin
2016-02-02 11:31                             ` Andrew Cooper
2016-02-02 11:43                               ` Jan Beulich
2016-02-02 14:20                                 ` Andrew Cooper
2016-02-01 11:57   ` Wei Liu
2016-02-01 15:15     ` 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=56CB3B3D.1020704@citrix.com \
    --to=george.dunlap@citrix.com \
    --cc=Andrew.Cooper3@citrix.com \
    --cc=Ian.Campbell@citrix.com \
    --cc=Ian.Jackson@citrix.com \
    --cc=JBeulich@suse.com \
    --cc=Paul.Durrant@citrix.com \
    --cc=Stefano.Stabellini@citrix.com \
    --cc=keir@xen.org \
    --cc=kevin.tian@intel.com \
    --cc=wei.liu2@citrix.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 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.