All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Zhang, Yu" <yu.c.zhang@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>,
	Daniel Vetter <daniel@ffwll.ch>,
	"Tian, Kevin" <kevin.tian@intel.com>,
	"Song, Jike" <jike.song@intel.com>,
	"Vetter, Daniel" <daniel.vetter@intel.com>,
	"intel-gfx@lists.freedesktop.org"
	<intel-gfx@lists.freedesktop.org>
Subject: Re: [PATCH 2/8] drm/i915: Adds graphic address space ballooning logic
Date: Fri, 26 Sep 2014 16:26:20 +0800	[thread overview]
Message-ID: <5425232C.3030107@linux.intel.com> (raw)
In-Reply-To: <20140924132118.GA30278@nuc-i3427.alporthouse.com>

Hi Chris & Daniel,

   Thanks for your comments. Following are my understandings about the 
changes needed for this patch:

1> We do not need the guard page anymore between different VMs. For the 
very last physical GTT entry, let's keep it pointing to a guard page.

2> To reserve the GMs in our balloon code, drm_mm_reserve_node() is 
preferred than the current drm_mm_insert_node_in_range_generic().

   Am I correct? Please correct me if anything wrong. Thanks! :)

Yu


On 9/24/2014 9:21 PM, Chris Wilson wrote:
> On Wed, Sep 24, 2014 at 08:35:50PM +0800, Zhang, Yu wrote:
>> Hi Daniel & Chris,
>>
>>    Thank you very much for your comments, And sorry for my late
>> reply.:) I was focusing on other tasks previously.
>>    See my questions below:
>>
>> On 9/23/2014 7:25 PM, Daniel Vetter wrote:
>>> On Tue, Sep 23, 2014 at 10:19:02AM +0100, Chris Wilson wrote:
>>>> On Tue, Sep 23, 2014 at 10:26:26AM +0200, Daniel Vetter wrote:
>>>>> On Fri, Sep 19, 2014 at 09:00:00PM +0100, Chris Wilson wrote:
>>>>>> On Fri, Sep 19, 2014 at 06:21:46PM +0000, Tian, Kevin wrote:
>>>>>>>> From: Chris Wilson
>>>>>>>> The implementation also looks backwards. To work correctly with the GTT
>>>>>>>> allocator, you need to preallocate the reserved space such that it can
>>>>>>>> only allocate from the allowed ranges. Similarly, it should evict any
>>>>>>>> conflicting nodes when deballooning.
>>>>>>>
>>>>>>> Could you elaborate a bit for above suggestion?
>>>>>>
>>>>>> My expectation was that the dev_priv->gtt.base.vm would contain exactly
>>>>>> two holes after setup (in the mappable and non-mappable range). To do
>>>>>> that you would explicitly reserve everything barred from this client
>>>>>> using a set of drm_mm_reserve_node()
>>>>>
>>>>> Essentially a reserve_node implements what you open-code with
>>>>> insert_node_range right now.
>>>>
>>>> Heh, there is a big difference. One inserts exactly where you ask and
>>>> fails if it conflicts, the other inserts where it feels like within that
>>>> range.
>>
>> Do you mean drm_mm_search_free_in_range_generic() may not get
>> reserve the exact range we are expecting to? Is this why you'd
>> prefer the drm_mm_reserve_node()?
>>
>> Besides, the ggtt_vm->mm is just initialized right before the
>> ballooning code in routine i915_gem_setup_global_gtt(), so is there
>> any chance the range to be partitioned out is already reserved by
>> someone else?
>
> No. It is just that drm_mm_reserve_node() was added to have the precise
> semantics expected here with the strict checks. And should work better
> with dynamic ballooning...
> -Chris
>

  reply	other threads:[~2014-09-26  8:32 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-19 18:47 [PATCH 0/8] Add enlightenments for vGPU Jike Song
2014-09-19 18:47 ` [PATCH 1/8] drm/i915: Introduce a PV INFO page structure for Intel GVT-g Jike Song
2014-09-19  7:25   ` Chris Wilson
2014-09-19 10:23     ` Jike Song
2014-09-29 11:44     ` Jike Song
2014-09-29 12:08       ` Yu, Zhang
2014-09-29 12:16       ` Chris Wilson
2014-09-29 12:40         ` Jike Song
2014-10-10  8:23           ` Yu, Zhang
2014-09-19 16:02   ` Daniel Vetter
2014-09-19 16:07     ` Daniel Vetter
2014-09-19 21:39     ` Tian, Kevin
2014-09-19 18:47 ` [PATCH 2/8] drm/i915: Adds graphic address space ballooning logic Jike Song
2014-09-19  8:05   ` Chris Wilson
2014-09-19 16:04     ` Daniel Vetter
2014-09-19 18:21     ` Tian, Kevin
2014-09-19 20:00       ` Chris Wilson
2014-09-23  8:26         ` Daniel Vetter
2014-09-23  9:19           ` Chris Wilson
2014-09-23 11:25             ` Daniel Vetter
2014-09-24 12:35               ` Zhang, Yu
2014-09-24 13:21                 ` Chris Wilson
2014-09-26  8:26                   ` Zhang, Yu [this message]
2014-09-26  8:48                     ` Chris Wilson
2014-09-26  8:46                       ` Yu, Zhang
2014-09-24 13:23                 ` Daniel Vetter
2014-09-19 18:47 ` [PATCH 3/8] drm/i915: Partition the fence registers for vgpu in i915 driver Jike Song
2014-09-19 18:47 ` [PATCH 4/8] drm/i915: Disable framebuffer compression for i915 driver in VM Jike Song
2014-09-19  8:07   ` Chris Wilson
2014-09-22  7:10     ` Jike Song
2014-09-22 11:28       ` Chris Wilson
2014-09-19 18:47 ` [PATCH 5/8] drm/i915: Add the display switch logic for vgpu in i915 driver Jike Song
2014-09-19  8:14   ` Chris Wilson
2014-09-19 11:37     ` Wang, Zhi A
2014-09-19 16:09   ` Daniel Vetter
2014-09-29  6:31     ` Zhiyuan Lv
2014-09-29 12:30       ` Daniel Vetter
2014-09-30 10:25         ` Zhiyuan Lv
2014-09-30 10:56           ` Daniel Vetter
2014-09-19 18:47 ` [PATCH 6/8] drm/i915: Disable power management for i915 driver in VM Jike Song
2014-09-19  8:16   ` Chris Wilson
2014-09-19 18:47 ` [PATCH 7/8] drm/i915: Create vgpu specific write MMIO to reduce traps Jike Song
2014-09-19  6:59   ` Chris Wilson
2014-09-19  7:43     ` Jike Song
2014-09-19 18:47 ` [PATCH 8/8] drm/i915: Support alias ppgtt in VM if ppgtt is enabled Jike Song
2014-09-19  8:25   ` Chris Wilson
2014-09-22 11:17     ` Jike Song
2014-09-22 11:27       ` Chris Wilson

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=5425232C.3030107@linux.intel.com \
    --to=yu.c.zhang@linux.intel.com \
    --cc=chris@chris-wilson.co.uk \
    --cc=daniel.vetter@intel.com \
    --cc=daniel@ffwll.ch \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jike.song@intel.com \
    --cc=kevin.tian@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.