Re: [PATCH v2] drm/i915: Replace kmap() with kmap_local_page()

2023-06-26 Thread Tvrtko Ursulin
On 20/06/2023 14:23, Ira Weiny wrote: Sumitra Sharma wrote: On Sun, Jun 18, 2023 at 11:11:08AM -0700, Ira Weiny wrote: Sumitra Sharma wrote: kmap() has been deprecated in favor of the kmap_local_page() due to high cost, restricted mapping space, the overhead of a global lock for

Re: [PATCH v2] drm/i915: Replace kmap() with kmap_local_page()

2023-06-23 Thread Fabio M. De Francesco
On sabato 17 giugno 2023 20:04:20 CEST Sumitra Sharma wrote: > kmap() has been deprecated in favor of the kmap_local_page() > due to high cost, restricted mapping space, the overhead of a > global lock for synchronization, and making the process sleep > in the absence of free slots. > >

Re: [PATCH v2] drm/i915: Replace kmap() with kmap_local_page()

2023-06-22 Thread Tvrtko Ursulin
On 21/06/2023 19:51, Thomas Hellström (Intel) wrote: On 6/21/23 18:35, Ira Weiny wrote: Thomas Hellström (Intel) wrote: I think one thing worth mentioning in the context of this patch is that IIRC kmap_local_page() will block offlining of the mapping CPU until kunmap_local(), so while I

Re: [PATCH v2] drm/i915: Replace kmap() with kmap_local_page()

2023-06-21 Thread Intel
On 6/21/23 18:35, Ira Weiny wrote: Thomas Hellström (Intel) wrote: I think one thing worth mentioning in the context of this patch is that IIRC kmap_local_page() will block offlining of the mapping CPU until kunmap_local(), so while I haven't seen any guidelines around the usage of this api

Re: [PATCH v2] drm/i915: Replace kmap() with kmap_local_page()

2023-06-21 Thread Ira Weiny
Thomas Hellström (Intel) wrote: > > I think one thing worth mentioning in the context of this patch is that > IIRC kmap_local_page() will block offlining of the mapping CPU until > kunmap_local(), so while I haven't seen any guidelines around the usage > of this api for long-held mappings, I

Re: [PATCH v2] drm/i915: Replace kmap() with kmap_local_page()

2023-06-21 Thread Fabio M. De Francesco
On mercoledì 21 giugno 2023 11:06:51 CEST Thomas Hellström (Intel) wrote: > > I think one thing worth mentioning in the context of this patch is that > IIRC kmap_local_page() will block offlining of the mapping CPU until > kunmap_local(), Migration is disabled. > so while I haven't seen any

Re: [PATCH v2] drm/i915: Replace kmap() with kmap_local_page()

2023-06-21 Thread Intel
On 6/20/23 20:07, Sumitra Sharma wrote: On Tue, Jun 20, 2023 at 06:23:38AM -0700, Ira Weiny wrote: Sumitra Sharma wrote: On Sun, Jun 18, 2023 at 11:11:08AM -0700, Ira Weiny wrote: Sumitra Sharma wrote: kmap() has been deprecated in favor of the kmap_local_page() due to high cost,

Re: [PATCH v2] drm/i915: Replace kmap() with kmap_local_page()

2023-06-20 Thread Sumitra Sharma
On Tue, Jun 20, 2023 at 06:23:38AM -0700, Ira Weiny wrote: > Sumitra Sharma wrote: > > On Sun, Jun 18, 2023 at 11:11:08AM -0700, Ira Weiny wrote: > > > Sumitra Sharma wrote: > > > > kmap() has been deprecated in favor of the kmap_local_page() > > > > due to high cost, restricted mapping space,

Re: [PATCH v2] drm/i915: Replace kmap() with kmap_local_page()

2023-06-20 Thread Ira Weiny
Sumitra Sharma wrote: > On Sun, Jun 18, 2023 at 11:11:08AM -0700, Ira Weiny wrote: > > Sumitra Sharma wrote: > > > kmap() has been deprecated in favor of the kmap_local_page() > > > due to high cost, restricted mapping space, the overhead of a > > > global lock for synchronization, and making the

Re: [PATCH v2] drm/i915: Replace kmap() with kmap_local_page()

2023-06-19 Thread Sumitra Sharma
On Sun, Jun 18, 2023 at 11:11:08AM -0700, Ira Weiny wrote: > Sumitra Sharma wrote: > > kmap() has been deprecated in favor of the kmap_local_page() > > due to high cost, restricted mapping space, the overhead of a > > global lock for synchronization, and making the process sleep > > in the absence

Re: [PATCH v2] drm/i915: Replace kmap() with kmap_local_page()

2023-06-19 Thread Tvrtko Ursulin
On 19/06/2023 08:59, Thomas Hellström (Intel) wrote: On 6/18/23 20:11, Ira Weiny wrote: Sumitra Sharma wrote: kmap() has been deprecated in favor of the kmap_local_page() due to high cost, restricted mapping space, the overhead of a global lock for synchronization, and making the process

Re: [PATCH v2] drm/i915: Replace kmap() with kmap_local_page()

2023-06-19 Thread Intel
On 6/18/23 20:11, Ira Weiny wrote: Sumitra Sharma wrote: kmap() has been deprecated in favor of the kmap_local_page() due to high cost, restricted mapping space, the overhead of a global lock for synchronization, and making the process sleep in the absence of free slots. kmap_local_page() is

Re: [PATCH v2] drm/i915: Replace kmap() with kmap_local_page()

2023-06-18 Thread Ira Weiny
Sumitra Sharma wrote: > kmap() has been deprecated in favor of the kmap_local_page() > due to high cost, restricted mapping space, the overhead of a > global lock for synchronization, and making the process sleep > in the absence of free slots. > > kmap_local_page() is faster than kmap() and

[PATCH v2] drm/i915: Replace kmap() with kmap_local_page()

2023-06-18 Thread Sumitra Sharma
kmap() has been deprecated in favor of the kmap_local_page() due to high cost, restricted mapping space, the overhead of a global lock for synchronization, and making the process sleep in the absence of free slots. kmap_local_page() is faster than kmap() and offers thread-local and CPU-local

[PATCH V2] drm/i915: Replace kmap() with kmap_local_page()

2021-12-21 Thread ira . weiny
From: Ira Weiny kmap() is being deprecated and these usages are all local to the thread so there is no reason kmap_local_page() can't be used. Replace kmap() calls with kmap_local_page(). Signed-off-by: Ira Weiny --- NOTE: I'm sending as a follow on to the V1 patch. Please let me know if