Re: [RFC PATCH 23/28] drm/xe: Add SVM VRAM migration

2024-09-03 Thread Simona Vetter
On Mon, Sep 02, 2024 at 10:20:07PM +, Matthew Brost wrote: > On Mon, Sep 02, 2024 at 02:48:55PM +0200, Daniel Vetter wrote: > > On Thu, Aug 29, 2024 at 10:12:53PM +, Matthew Brost wrote: > > > On Thu, Aug 29, 2024 at 01:02:54PM +0200, Daniel Vetter wrote: > > > > On Thu, Aug 29, 2024 at 11:

Re: [RFC PATCH 23/28] drm/xe: Add SVM VRAM migration

2024-09-02 Thread Matthew Brost
On Mon, Sep 02, 2024 at 02:48:55PM +0200, Daniel Vetter wrote: > On Thu, Aug 29, 2024 at 10:12:53PM +, Matthew Brost wrote: > > On Thu, Aug 29, 2024 at 01:02:54PM +0200, Daniel Vetter wrote: > > > On Thu, Aug 29, 2024 at 11:53:58AM +0200, Thomas Hellström wrote: > > > > But as Sima pointed out

Re: [RFC PATCH 23/28] drm/xe: Add SVM VRAM migration

2024-09-02 Thread Daniel Vetter
On Thu, Aug 29, 2024 at 09:48:11PM +, Matthew Brost wrote: > On Thu, Aug 29, 2024 at 11:24:26AM +0200, Christian König wrote: > >Am 28.08.24 um 18:06 schrieb Daniel Vetter: > > > > A lot to unpack here. Will try to address as much as I can in this > single reply to both of you (Daniel, Ch

Re: [RFC PATCH 23/28] drm/xe: Add SVM VRAM migration

2024-09-02 Thread Daniel Vetter
On Mon, Sep 02, 2024 at 01:01:45PM +0200, Christian König wrote: > Am 30.08.24 um 00:12 schrieb Matthew Brost: > > On Thu, Aug 29, 2024 at 01:02:54PM +0200, Daniel Vetter wrote: > > > On Thu, Aug 29, 2024 at 11:53:58AM +0200, Thomas Hellström wrote: > > > > But as Sima pointed out in private commun

Re: [RFC PATCH 23/28] drm/xe: Add SVM VRAM migration

2024-09-02 Thread Daniel Vetter
On Thu, Aug 29, 2024 at 10:12:53PM +, Matthew Brost wrote: > On Thu, Aug 29, 2024 at 01:02:54PM +0200, Daniel Vetter wrote: > > On Thu, Aug 29, 2024 at 11:53:58AM +0200, Thomas Hellström wrote: > > > But as Sima pointed out in private communication, exhaustive eviction > > > is not really neede

Re: [RFC PATCH 23/28] drm/xe: Add SVM VRAM migration

2024-09-02 Thread Christian König
Am 30.08.24 um 00:12 schrieb Matthew Brost: On Thu, Aug 29, 2024 at 01:02:54PM +0200, Daniel Vetter wrote: On Thu, Aug 29, 2024 at 11:53:58AM +0200, Thomas Hellström wrote: But as Sima pointed out in private communication, exhaustive eviction is not really needed for faulting to make (crawling)

Re: [RFC PATCH 23/28] drm/xe: Add SVM VRAM migration

2024-08-29 Thread Matthew Brost
On Thu, Aug 29, 2024 at 10:12:53PM +, Matthew Brost wrote: > On Thu, Aug 29, 2024 at 01:02:54PM +0200, Daniel Vetter wrote: > > On Thu, Aug 29, 2024 at 11:53:58AM +0200, Thomas Hellström wrote: > > > But as Sima pointed out in private communication, exhaustive eviction > > > is not really neede

Re: [RFC PATCH 23/28] drm/xe: Add SVM VRAM migration

2024-08-29 Thread Matthew Brost
On Thu, Aug 29, 2024 at 01:02:54PM +0200, Daniel Vetter wrote: > On Thu, Aug 29, 2024 at 11:53:58AM +0200, Thomas Hellström wrote: > > But as Sima pointed out in private communication, exhaustive eviction > > is not really needed for faulting to make (crawling) progress. > > Watermarks and VRAM try

Re: [RFC PATCH 23/28] drm/xe: Add SVM VRAM migration

2024-08-29 Thread Matthew Brost
On Thu, Aug 29, 2024 at 04:30:11PM +0200, Christian König wrote: > > > Am 29.08.24 um 11:53 schrieb Thomas Hellström: > > Hi, Christian, > > > > On Thu, 2024-08-29 at 11:24 +0200, Christian König wrote: > > ... > > > > > > > - Unified eviction is required (SVM VRAM and TTM BOs need to be > > >

Re: [RFC PATCH 23/28] drm/xe: Add SVM VRAM migration

2024-08-29 Thread Matthew Brost
On Thu, Aug 29, 2024 at 11:24:26AM +0200, Christian König wrote: >Am 28.08.24 um 18:06 schrieb Daniel Vetter: > A lot to unpack here. Will try to address as much as I can in this single reply to both of you (Daniel, Christian). > On Tue, Aug 27, 2024 at 07:48:56PM -0700, Matthew Brost wrote:

Re: [RFC PATCH 23/28] drm/xe: Add SVM VRAM migration

2024-08-29 Thread Christian König
Am 29.08.24 um 11:53 schrieb Thomas Hellström: Hi, Christian, On Thu, 2024-08-29 at 11:24 +0200, Christian König wrote: ... - Unified eviction is required (SVM VRAM and TTM BOs need to be able to    evict each other). So core mm handles this by just roughly equally shrinking everything. S

Re: [RFC PATCH 23/28] drm/xe: Add SVM VRAM migration

2024-08-29 Thread Daniel Vetter
On Thu, Aug 29, 2024 at 11:53:58AM +0200, Thomas Hellström wrote: > But as Sima pointed out in private communication, exhaustive eviction > is not really needed for faulting to make (crawling) progress. > Watermarks and VRAM trylock shrinking should suffice, since we're > strictly only required to

Re: [RFC PATCH 23/28] drm/xe: Add SVM VRAM migration

2024-08-29 Thread Thomas Hellström
Hi, Christian, On Thu, 2024-08-29 at 11:24 +0200, Christian König wrote: > ... > > > - Unified eviction is required (SVM VRAM and TTM BOs need to be > > > able to > > >    evict each other). > > So core mm handles this by just roughly equally shrinking > > everything. > > Seems to work, and it

Re: [RFC PATCH 23/28] drm/xe: Add SVM VRAM migration

2024-08-29 Thread Christian König
Am 28.08.24 um 18:06 schrieb Daniel Vetter: On Tue, Aug 27, 2024 at 07:48:56PM -0700, Matthew Brost wrote: Migration is implemented with range granularity, with VRAM backing being a VM private TTM BO (i.e., shares dma-resv with VM). The lifetime of the TTM BO is limited to when the SVM range is

Re: [RFC PATCH 23/28] drm/xe: Add SVM VRAM migration

2024-08-28 Thread Daniel Vetter
On Wed, Aug 28, 2024 at 06:06:47PM +0200, Daniel Vetter wrote: > On Tue, Aug 27, 2024 at 07:48:56PM -0700, Matthew Brost wrote: > > Migration is implemented with range granularity, with VRAM backing being > > a VM private TTM BO (i.e., shares dma-resv with VM). The lifetime of the > > TTM BO is lim

Re: [RFC PATCH 23/28] drm/xe: Add SVM VRAM migration

2024-08-28 Thread Daniel Vetter
On Tue, Aug 27, 2024 at 07:48:56PM -0700, Matthew Brost wrote: > Migration is implemented with range granularity, with VRAM backing being > a VM private TTM BO (i.e., shares dma-resv with VM). The lifetime of the > TTM BO is limited to when the SVM range is in VRAM (i.e., when a VRAM > SVM range is

[RFC PATCH 23/28] drm/xe: Add SVM VRAM migration

2024-08-27 Thread Matthew Brost
Migration is implemented with range granularity, with VRAM backing being a VM private TTM BO (i.e., shares dma-resv with VM). The lifetime of the TTM BO is limited to when the SVM range is in VRAM (i.e., when a VRAM SVM range is migrated to SRAM, the TTM BO is destroyed). The design choice for usi