All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v6 0/9] Emulated coherent graphics memory
@ 2019-06-12 15:19 ` Thomas Hellström (VMware)
  0 siblings, 0 replies; 14+ messages in thread
From: Thomas Hellström (VMware) @ 2019-06-12 15:19 UTC (permalink / raw)
  To: dri-devel
  Cc: linux-graphics-maintainer, pv-drivers, linux-kernel, hch,
	Andrew Morton, Matthew Wilcox, Will Deacon, Peter Zijlstra,
	Rik van Riel, Minchan Kim, Michal Hocko, Huang Ying,
	Souptick Joarder, Jérôme Glisse, Christian König,
	linux-mm

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 exercised 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.
Changes v6:
- Updated exports of new functionality in patch 3/9 to EXPORT_SYMBOL_GPL
  after review comments from Christoph Hellwig.
  
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Matthew Wilcox <willy@infradead.org>
Cc: Will Deacon <will.deacon@arm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Rik van Riel <riel@surriel.com>
Cc: Minchan Kim <minchan@kernel.org>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Huang Ying <ying.huang@intel.com>
Cc: Souptick Joarder <jrdr.linux@gmail.com>
Cc: "Jérôme Glisse" <jglisse@redhat.com>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: linux-mm@kvack.org

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2019-06-12 15:21 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-12 15:19 [PATCH v6 0/9] Emulated coherent graphics memory Thomas Hellström (VMware)
2019-06-12 15:19 ` Thomas Hellström (VMware)
2019-06-12 15:19 ` [PATCH v6 1/9] mm: Allow the [page|pfn]_mkwrite callbacks to drop the mmap_sem Thomas Hellström (VMware)
2019-06-12 15:19   ` Thomas Hellström (VMware)
2019-06-12 15:19 ` [PATCH v6 2/9] mm: Add an apply_to_pfn_range interface Thomas Hellström (VMware)
2019-06-12 15:19 ` [PATCH v6 3/9] mm: Add write-protect and clean utilities for address space ranges Thomas Hellström (VMware)
2019-06-12 15:19 ` [PATCH v6 4/9] drm/ttm: Allow the driver to provide the ttm struct vm_operations_struct Thomas Hellström (VMware)
2019-06-12 15:19 ` [PATCH v6 5/9] drm/ttm: TTM fault handler helpers Thomas Hellström (VMware)
2019-06-12 15:19 ` [PATCH v6 6/9] drm/vmwgfx: Implement an infrastructure for write-coherent resources Thomas Hellström (VMware)
2019-06-12 15:19   ` Thomas Hellström (VMware)
2019-06-12 15:19 ` [PATCH v6 7/9] drm/vmwgfx: Use an RBtree instead of linked list for MOB resources Thomas Hellström (VMware)
2019-06-12 15:19 ` [PATCH v6 8/9] drm/vmwgfx: Implement an infrastructure for read-coherent resources Thomas Hellström (VMware)
2019-06-12 15:19   ` Thomas Hellström (VMware)
2019-06-12 15:19 ` [PATCH v6 9/9] drm/vmwgfx: Add surface dirty-tracking callbacks Thomas Hellström (VMware)

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.