[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190612064243.55340-1-thellstrom@vmwopensource.org>
Date: Wed, 12 Jun 2019 08:42:34 +0200
From: Thomas Hellström (VMware)
<thellstrom@...opensource.org>
To: dri-devel@...ts.freedesktop.org
Cc: linux-graphics-maintainer@...are.com, pv-drivers@...are.com,
linux-kernel@...r.kernel.org, nadav.amit@...il.com,
Andrew Morton <akpm@...ux-foundation.org>,
Matthew Wilcox <willy@...radead.org>,
Will Deacon <will.deacon@....com>,
Peter Zijlstra <peterz@...radead.org>,
Rik van Riel <riel@...riel.com>,
Minchan Kim <minchan@...nel.org>,
Michal Hocko <mhocko@...e.com>,
Huang Ying <ying.huang@...el.com>,
Souptick Joarder <jrdr.linux@...il.com>,
Jérôme Glisse <jglisse@...hat.com>,
Christian König <christian.koenig@....com>,
linux-mm@...ck.org
Subject: [PATCH v5 0/9] Emulated coherent graphics memory
Planning to merge this through the drm/vmwgfx tree soon, so if there
are any objections, please speak up.
Graphics APIs like OpenGL 4.4 and Vulkan require the graphics driver
to provide coherent graphics memory, meaning that the GPU sees any
content written to the coherent memory on the next GPU operation that
touches that memory, and the CPU sees any content written by the GPU
to that memory immediately after any fence object trailing the GPU
operation has signaled.
Paravirtual drivers that otherwise require explicit synchronization
needs to do this by hooking up dirty tracking to pagefault handlers
and buffer object validation. This is a first attempt to do that for
the vmwgfx driver.
The mm patches has been out for RFC. I think I have addressed all the
feedback I got, except a possible softdirty breakage. But although the
dirty-tracking and softdirty may write-protect PTEs both care about,
that shouldn't really cause any operation interference. In particular
since we use the hardware dirty PTE bits and softdirty uses other PTE bits.
For the TTM changes they are hopefully in line with the long-term
strategy of making helpers out of what's left of TTM.
The code has been tested and excercised by a tailored version of mesa
where we disable all explicit synchronization and assume graphics memory
is coherent. The performance loss varies of course; a typical number is
around 5%.
Changes v1-v2:
- Addressed a number of typos and formatting issues.
- Added a usage warning for apply_to_pfn_range() and apply_to_page_range()
- Re-evaluated the decision to use apply_to_pfn_range() rather than
modifying the pagewalk.c. It still looks like generically handling the
transparent huge page cases requires the mmap_sem to be held at least
in read mode, so sticking with apply_to_pfn_range() for now.
- The TTM page-fault helper vma copy argument was scratched in favour of
a pageprot_t argument.
Changes v3:
- Adapted to upstream API changes.
Changes v4:
- Adapted to upstream mmu_notifier changes. (Jerome?)
- Fixed a couple of warnings on 32-bit x86
- Fixed image offset computation on multisample images.
Changes v5:
- Updated usage warning in patch 3/9 after review comments from Nadav Amit.
Cc: Andrew Morton <akpm@...ux-foundation.org>
Cc: Matthew Wilcox <willy@...radead.org>
Cc: Will Deacon <will.deacon@....com>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Rik van Riel <riel@...riel.com>
Cc: Minchan Kim <minchan@...nel.org>
Cc: Michal Hocko <mhocko@...e.com>
Cc: Huang Ying <ying.huang@...el.com>
Cc: Souptick Joarder <jrdr.linux@...il.com>
Cc: "Jérôme Glisse" <jglisse@...hat.com>
Cc: "Christian König" <christian.koenig@....com>
Cc: linux-mm@...ck.org
Powered by blists - more mailing lists