public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Michel Thierry <michel.thierry@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [RFC 00/38] PPGTT dynamic page allocations
Date: Tue, 4 Nov 2014 13:54:58 +0100	[thread overview]
Message-ID: <20141104125458.GN26941@phenom.ffwll.local> (raw)
In-Reply-To: <1412701894-28905-1-git-send-email-michel.thierry@intel.com>

On Tue, Oct 07, 2014 at 06:10:56PM +0100, Michel Thierry wrote:
> This is based on the first 55 patches of Ben's 48b addressing work, taking
> into consideration the latest changes in (mainly aliasing) ppgtt rules.
> 
> Because of these changes in the tree, the first 17 patches of the original
> series are no longer needed, and some patches required more rework than others.
> 
> For GEN8, it has also been extended to work in logical ring submission (lrc)
> mode, as it looks like it will be the preferred mode of operation.
> I also tried to update the lrc code at the same time the ppgtt refactoring
> occurred, leaving only one patch that is exclusively for lrc.
> 
> I'm asking for comments, as this is the foundation for 48b virtual addressing
> in Broadwell. 
> 
> This list can be seen in 3 parts:
> [01-24] Include code rework for PPGTT (all GENs).
> [25-28] Adds page table allocation for GEN6/GEN7
> [29-38] Enables dynamic allocation in GEN8. It is enabled for both legacy
> and execlist submission modes.
> 
> Ben Widawsky (37):
>   drm/i915: Add some extra guards in evict_vm
>   drm/i915/trace: Fix offsets for 64b
>   drm/i915: Wrap VMA binding
>   drm/i915: Make pin global flags explicit
>   drm/i915: Split out aliasing binds
>   drm/i915: fix gtt_total_entries()
>   drm/i915: Rename to GEN8_LEGACY_PDPES
>   drm/i915: Split out verbose PPGTT dumping
>   drm/i915: s/pd/pdpe, s/pt/pde
>   drm/i915: rename map/unmap to dma_map/unmap
>   drm/i915: Setup less PPGTT on failed pagedir
>   drm/i915: Un-hardcode number of page directories
>   drm/i915: Make gen6_write_pdes gen6_map_page_tables
>   drm/i915: Range clearing is PPGTT agnostic
>   drm/i915: Page table helpers, and define renames
>   drm/i915: construct page table abstractions
>   drm/i915: Complete page table structures
>   drm/i915: Create page table allocators
>   drm/i915: Generalize GEN6 mapping
>   drm/i915: Clean up pagetable DMA map & unmap
>   drm/i915: Always dma map page table allocations
>   drm/i915: Consolidate dma mappings
>   drm/i915: Always dma map page directory allocations
>   drm/i915: Track GEN6 page table usage
>   drm/i915: Extract context switch skip logic
>   drm/i915: Track page table reload need
>   drm/i915: Initialize all contexts
>   drm/i915: Finish gen6/7 dynamic page table allocation
>   drm/i915/bdw: Use dynamic allocation idioms on free
>   drm/i915/bdw: pagedirs rework allocation
>   drm/i915/bdw: pagetable allocation rework
>   drm/i915/bdw: Make the pdp switch a bit less hacky
>   drm/i915: num_pd_pages/num_pd_entries isn't useful
>   drm/i915: Extract PPGTT param from pagedir alloc
>   drm/i915/bdw: Split out mappings
>   drm/i915/bdw: begin bitmap tracking
>   drm/i915/bdw: Dynamic page table allocations
> 
> Michel Thierry (1):
>   drm/i915/bdw: Dynamic page table allocations in lrc mode

Ok, high level review:

- The first part of this series seems to shuffle the code around in the
  vma binding code. If we actually want to fix this I think we need a
  REBIND flag and push the logic for rewriting ptes into the vma_bind
  hooks. There's no other way really to fix this, and the breakage for
  aliasing ppgtt this current code produces is what's blocking the cmd
  parser atm.

- Imo mergin the vma_bind/insert_entries hooks isn't useful, they imo
  provide good abstraction. Ofc we should move the vma_bind/unbind
  funcstion into the vm functions, since the vfunc dictionary varies by vm
  and not by vma. And they only really provide good abstraction if we
  first fix up the binding mess.

- The code massively shuffles around the pte and page table handling code,
  promising a lot better future. But I simply don't get it - to me this
  all looks like massive amounts of churn for no clear gain.

- Imo the really critical part of dynamic pagetable alloc is where exactly
  we add this new memory allocation point and how we handle failures. But
  since there's so much churn that I somehow can't see through I can't
  have a solid opinion on the proposed design.

So overall I think we should untangle this series first and throw out as
much churn as possible. E.g. the binding rework is very much separate imo.
Or someone needs to explain to my why we need all this code reflow.

With that out of the way reviewing the changes due to dynamic page table
alloc should be fairly simple. My expectation would have been that we'd
add a new interface to allocate vm ranges and essentially leave all the
current vma binding unchanged. Having the separate vm range extension is
somewhat important since the drm_mm allocator has a bit the tendency to
just walk up the address space, wasting piles of free space lower down.

Or like I've said maybe I just don't see the real issues and have way too
naive opinion here.

Cheers, Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2014-11-04 12:54 UTC|newest]

Thread overview: 53+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-07 17:10 [RFC 00/38] PPGTT dynamic page allocations Michel Thierry
2014-10-07 17:10 ` [RFC 01/38] drm/i915: Add some extra guards in evict_vm Michel Thierry
2014-10-08 13:36   ` Daniel Vetter
2014-10-07 17:10 ` [RFC 02/38] drm/i915/trace: Fix offsets for 64b Michel Thierry
2014-10-07 17:10 ` [RFC 03/38] drm/i915: Wrap VMA binding Michel Thierry
2014-10-07 17:11 ` [RFC 04/38] drm/i915: Make pin global flags explicit Michel Thierry
2014-10-08 13:36   ` Daniel Vetter
2014-10-07 17:11 ` [RFC 05/38] drm/i915: Split out aliasing binds Michel Thierry
2014-10-08 13:41   ` Daniel Vetter
2014-10-07 17:11 ` [RFC 06/38] drm/i915: fix gtt_total_entries() Michel Thierry
2014-10-08 13:52   ` Daniel Vetter
2014-10-07 17:11 ` [RFC 07/38] drm/i915: Rename to GEN8_LEGACY_PDPES Michel Thierry
2014-10-07 17:11 ` [RFC 08/38] drm/i915: Split out verbose PPGTT dumping Michel Thierry
2014-10-07 17:11 ` [RFC 09/38] drm/i915: s/pd/pdpe, s/pt/pde Michel Thierry
2014-10-08 13:55   ` Daniel Vetter
2014-10-07 17:11 ` [RFC 10/38] drm/i915: rename map/unmap to dma_map/unmap Michel Thierry
2014-10-07 17:11 ` [RFC 11/38] drm/i915: Setup less PPGTT on failed pagedir Michel Thierry
2014-10-07 17:11 ` [RFC 12/38] drm/i915: Un-hardcode number of page directories Michel Thierry
2014-10-07 17:11 ` [RFC 13/38] drm/i915: Make gen6_write_pdes gen6_map_page_tables Michel Thierry
2014-10-08 14:04   ` Daniel Vetter
2014-10-07 17:11 ` [RFC 14/38] drm/i915: Range clearing is PPGTT agnostic Michel Thierry
2014-10-07 17:11 ` [RFC 15/38] drm/i915: Page table helpers, and define renames Michel Thierry
2014-10-07 17:11 ` [RFC 16/38] drm/i915: construct page table abstractions Michel Thierry
2014-10-07 17:11 ` [RFC 17/38] drm/i915: Complete page table structures Michel Thierry
2014-10-07 17:11 ` [RFC 18/38] drm/i915: Create page table allocators Michel Thierry
2014-10-07 17:11 ` [RFC 19/38] drm/i915: Generalize GEN6 mapping Michel Thierry
2014-10-07 17:11 ` [RFC 20/38] drm/i915: Clean up pagetable DMA map & unmap Michel Thierry
2014-10-07 17:11 ` [RFC 21/38] drm/i915: Always dma map page table allocations Michel Thierry
2014-10-07 17:11 ` [RFC 22/38] drm/i915: Consolidate dma mappings Michel Thierry
2014-10-07 17:11 ` [RFC 23/38] drm/i915: Always dma map page directory allocations Michel Thierry
2014-10-07 17:11 ` [RFC 24/38] drm/i915: Track GEN6 page table usage Michel Thierry
2014-10-07 17:11 ` [RFC 25/38] drm/i915: Extract context switch skip logic Michel Thierry
2014-10-07 17:11 ` [RFC 26/38] drm/i915: Track page table reload need Michel Thierry
2014-10-07 17:11 ` [RFC 27/38] drm/i915: Initialize all contexts Michel Thierry
2014-10-07 17:11 ` [RFC 28/38] drm/i915: Finish gen6/7 dynamic page table allocation Michel Thierry
2014-10-07 17:11 ` [RFC 29/38] drm/i915/bdw: Use dynamic allocation idioms on free Michel Thierry
2014-10-07 17:11 ` [RFC 30/38] drm/i915/bdw: pagedirs rework allocation Michel Thierry
2014-10-07 17:11 ` [RFC 31/38] drm/i915/bdw: pagetable allocation rework Michel Thierry
2014-10-07 17:11 ` [RFC 32/38] drm/i915/bdw: Make the pdp switch a bit less hacky Michel Thierry
2014-10-07 17:11 ` [RFC 33/38] drm/i915: num_pd_pages/num_pd_entries isn't useful Michel Thierry
2014-10-07 17:11 ` [RFC 34/38] drm/i915: Extract PPGTT param from pagedir alloc Michel Thierry
2014-10-07 17:11 ` [RFC 35/38] drm/i915/bdw: Split out mappings Michel Thierry
2014-10-07 17:11 ` [RFC 36/38] drm/i915/bdw: begin bitmap tracking Michel Thierry
2014-10-07 17:11 ` [RFC 37/38] drm/i915/bdw: Dynamic page table allocations Michel Thierry
2014-10-07 17:11 ` [RFC 38/38] drm/i915/bdw: Dynamic page table allocations in lrc mode Michel Thierry
2014-10-08  7:13 ` [RFC 00/38] PPGTT dynamic page allocations Chris Wilson
2014-11-04 12:44   ` Daniel Vetter
2014-11-04 13:01     ` Chris Wilson
2014-11-05  9:19       ` Daniel Vetter
2014-11-05  9:50         ` Chris Wilson
2014-11-05  9:58           ` Chris Wilson
2014-11-04 12:54 ` Daniel Vetter [this message]
2014-11-04 16:29   ` Michel Thierry

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=20141104125458.GN26941@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=michel.thierry@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