All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sumitra Sharma <sumitraartsy@gmail.com>
To: Ira Weiny <ira.weiny@intel.com>
Cc: Sumitra Sharma <sumitraartsy@gmail.com>,
	Deepak R Varma <drv@mailo.com>, Fabio <fmdefrancesco@gmail.com>,
	intel-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org,
	dri-devel@lists.freedesktop.org, Daniel Vetter <daniel@ffwll.ch>,
	Rodrigo Vivi <rodrigo.vivi@intel.com>,
	David Airlie <airlied@gmail.com>
Subject: Re: [Intel-gfx] [PATCH v2] drm/i915: Replace kmap() with kmap_local_page()
Date: Mon, 19 Jun 2023 08:45:50 -0700	[thread overview]
Message-ID: <20230619154550.GB412243@sumitra.com> (raw)
In-Reply-To: <648f48bc3d3c2_1de3f9294a3@iweiny-mobl.notmuch>

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 of free slots.
> > 
> > kmap_local_page() is faster than kmap() and offers thread-local
> > and CPU-local mappings, take pagefaults in a local kmap region
> > and preserves preemption by saving the mappings of outgoing tasks
> > and restoring those of the incoming one during a context switch.
> > 
> > The mapping is kept thread local in the function
> > “i915_vma_coredump_create” in i915_gpu_error.c
> > 
> > Therefore, replace kmap() with kmap_local_page().
> > 
> > Suggested-by: Ira Weiny <ira.weiny@intel.com>
> > 
> 
> NIT: No need for the line break between Suggested-by and your signed off line.
> 

Hi Ira,

What does NIT stand for? 

Thank you. I will take care about the line breaks.

> > Signed-off-by: Sumitra Sharma <sumitraartsy@gmail.com>
> > ---
> > 
> > Changes in v2:
> > 	- Replace kmap() with kmap_local_page().
> 
> Generally it is customary to attribute a change like this to those who
> suggested it in a V1 review.
> 
> For example:
> 
>  	- Tvrtko/Thomas: Use kmap_local_page() instead of page_address()
> 
> Also I don't see Thomas on the new email list.  Since he took the time to
> review V1 he might want to check this version out.  I've added him to the
> 'To:' list.
> 
> Also a link to V1 is nice.  B4 formats it like this:
> 
> - Link to v1: https://lore.kernel.org/all/20230614123556.GA381200@sumitra.com/
> 
> All that said the code looks good to me.  So with the above changes.
> 
> Reviewed-by: Ira Weiny <ira.weiny@intel.com>
> 

I have noted down the points mentioned above. Thank you again.

I am not supposed to create another version of this patch for 
adding the above mentions, as you and Thomas both gave this patch 
a reviewed-by tag. Right?


Thanks & regards
Sumitra

PS: I am new to the open source vocabulary terms.

> > 	- Change commit subject and message.
> > 
> >  drivers/gpu/drm/i915/i915_gpu_error.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/i915_gpu_error.c b/drivers/gpu/drm/i915/i915_gpu_error.c
> > index f020c0086fbc..bc41500eedf5 100644
> > --- a/drivers/gpu/drm/i915/i915_gpu_error.c
> > +++ b/drivers/gpu/drm/i915/i915_gpu_error.c
> > @@ -1164,9 +1164,9 @@ i915_vma_coredump_create(const struct intel_gt *gt,
> >  
> >  			drm_clflush_pages(&page, 1);
> >  
> > -			s = kmap(page);
> > +			s = kmap_local_page(page);
> >  			ret = compress_page(compress, s, dst, false);
> > -			kunmap(page);
> > +			kunmap_local(s);
> >  
> >  			drm_clflush_pages(&page, 1);
> >  
> > -- 
> > 2.25.1
> > 
> 
> 

WARNING: multiple messages have this Message-ID (diff)
From: Sumitra Sharma <sumitraartsy@gmail.com>
To: Ira Weiny <ira.weiny@intel.com>
Cc: "Tvrtko Ursulin" <tvrtko.ursulin@linux.intel.com>,
	"Sumitra Sharma" <sumitraartsy@gmail.com>,
	"Deepak R Varma" <drv@mailo.com>, Fabio <fmdefrancesco@gmail.com>,
	intel-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org,
	dri-devel@lists.freedesktop.org,
	"Rodrigo Vivi" <rodrigo.vivi@intel.com>,
	"Thomas Hellström (Intel)" <thomas_os@shipmail.org>
Subject: Re: [PATCH v2] drm/i915: Replace kmap() with kmap_local_page()
Date: Mon, 19 Jun 2023 08:45:50 -0700	[thread overview]
Message-ID: <20230619154550.GB412243@sumitra.com> (raw)
In-Reply-To: <648f48bc3d3c2_1de3f9294a3@iweiny-mobl.notmuch>

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 of free slots.
> > 
> > kmap_local_page() is faster than kmap() and offers thread-local
> > and CPU-local mappings, take pagefaults in a local kmap region
> > and preserves preemption by saving the mappings of outgoing tasks
> > and restoring those of the incoming one during a context switch.
> > 
> > The mapping is kept thread local in the function
> > “i915_vma_coredump_create” in i915_gpu_error.c
> > 
> > Therefore, replace kmap() with kmap_local_page().
> > 
> > Suggested-by: Ira Weiny <ira.weiny@intel.com>
> > 
> 
> NIT: No need for the line break between Suggested-by and your signed off line.
> 

Hi Ira,

What does NIT stand for? 

Thank you. I will take care about the line breaks.

> > Signed-off-by: Sumitra Sharma <sumitraartsy@gmail.com>
> > ---
> > 
> > Changes in v2:
> > 	- Replace kmap() with kmap_local_page().
> 
> Generally it is customary to attribute a change like this to those who
> suggested it in a V1 review.
> 
> For example:
> 
>  	- Tvrtko/Thomas: Use kmap_local_page() instead of page_address()
> 
> Also I don't see Thomas on the new email list.  Since he took the time to
> review V1 he might want to check this version out.  I've added him to the
> 'To:' list.
> 
> Also a link to V1 is nice.  B4 formats it like this:
> 
> - Link to v1: https://lore.kernel.org/all/20230614123556.GA381200@sumitra.com/
> 
> All that said the code looks good to me.  So with the above changes.
> 
> Reviewed-by: Ira Weiny <ira.weiny@intel.com>
> 

I have noted down the points mentioned above. Thank you again.

I am not supposed to create another version of this patch for 
adding the above mentions, as you and Thomas both gave this patch 
a reviewed-by tag. Right?


Thanks & regards
Sumitra

PS: I am new to the open source vocabulary terms.

> > 	- Change commit subject and message.
> > 
> >  drivers/gpu/drm/i915/i915_gpu_error.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/i915_gpu_error.c b/drivers/gpu/drm/i915/i915_gpu_error.c
> > index f020c0086fbc..bc41500eedf5 100644
> > --- a/drivers/gpu/drm/i915/i915_gpu_error.c
> > +++ b/drivers/gpu/drm/i915/i915_gpu_error.c
> > @@ -1164,9 +1164,9 @@ i915_vma_coredump_create(const struct intel_gt *gt,
> >  
> >  			drm_clflush_pages(&page, 1);
> >  
> > -			s = kmap(page);
> > +			s = kmap_local_page(page);
> >  			ret = compress_page(compress, s, dst, false);
> > -			kunmap(page);
> > +			kunmap_local(s);
> >  
> >  			drm_clflush_pages(&page, 1);
> >  
> > -- 
> > 2.25.1
> > 
> 
> 

WARNING: multiple messages have this Message-ID (diff)
From: Sumitra Sharma <sumitraartsy@gmail.com>
To: Ira Weiny <ira.weiny@intel.com>
Cc: "Jani Nikula" <jani.nikula@linux.intel.com>,
	"Joonas Lahtinen" <joonas.lahtinen@linux.intel.com>,
	"Rodrigo Vivi" <rodrigo.vivi@intel.com>,
	"Tvrtko Ursulin" <tvrtko.ursulin@linux.intel.com>,
	"David Airlie" <airlied@gmail.com>,
	"Daniel Vetter" <daniel@ffwll.ch>,
	intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
	linux-kernel@vger.kernel.org,
	"Thomas Hellström (Intel)" <thomas_os@shipmail.org>,
	Fabio <fmdefrancesco@gmail.com>, "Deepak R Varma" <drv@mailo.com>,
	"Sumitra Sharma" <sumitraartsy@gmail.com>
Subject: Re: [PATCH v2] drm/i915: Replace kmap() with kmap_local_page()
Date: Mon, 19 Jun 2023 08:45:50 -0700	[thread overview]
Message-ID: <20230619154550.GB412243@sumitra.com> (raw)
In-Reply-To: <648f48bc3d3c2_1de3f9294a3@iweiny-mobl.notmuch>

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 of free slots.
> > 
> > kmap_local_page() is faster than kmap() and offers thread-local
> > and CPU-local mappings, take pagefaults in a local kmap region
> > and preserves preemption by saving the mappings of outgoing tasks
> > and restoring those of the incoming one during a context switch.
> > 
> > The mapping is kept thread local in the function
> > “i915_vma_coredump_create” in i915_gpu_error.c
> > 
> > Therefore, replace kmap() with kmap_local_page().
> > 
> > Suggested-by: Ira Weiny <ira.weiny@intel.com>
> > 
> 
> NIT: No need for the line break between Suggested-by and your signed off line.
> 

Hi Ira,

What does NIT stand for? 

Thank you. I will take care about the line breaks.

> > Signed-off-by: Sumitra Sharma <sumitraartsy@gmail.com>
> > ---
> > 
> > Changes in v2:
> > 	- Replace kmap() with kmap_local_page().
> 
> Generally it is customary to attribute a change like this to those who
> suggested it in a V1 review.
> 
> For example:
> 
>  	- Tvrtko/Thomas: Use kmap_local_page() instead of page_address()
> 
> Also I don't see Thomas on the new email list.  Since he took the time to
> review V1 he might want to check this version out.  I've added him to the
> 'To:' list.
> 
> Also a link to V1 is nice.  B4 formats it like this:
> 
> - Link to v1: https://lore.kernel.org/all/20230614123556.GA381200@sumitra.com/
> 
> All that said the code looks good to me.  So with the above changes.
> 
> Reviewed-by: Ira Weiny <ira.weiny@intel.com>
> 

I have noted down the points mentioned above. Thank you again.

I am not supposed to create another version of this patch for 
adding the above mentions, as you and Thomas both gave this patch 
a reviewed-by tag. Right?


Thanks & regards
Sumitra

PS: I am new to the open source vocabulary terms.

> > 	- Change commit subject and message.
> > 
> >  drivers/gpu/drm/i915/i915_gpu_error.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/i915_gpu_error.c b/drivers/gpu/drm/i915/i915_gpu_error.c
> > index f020c0086fbc..bc41500eedf5 100644
> > --- a/drivers/gpu/drm/i915/i915_gpu_error.c
> > +++ b/drivers/gpu/drm/i915/i915_gpu_error.c
> > @@ -1164,9 +1164,9 @@ i915_vma_coredump_create(const struct intel_gt *gt,
> >  
> >  			drm_clflush_pages(&page, 1);
> >  
> > -			s = kmap(page);
> > +			s = kmap_local_page(page);
> >  			ret = compress_page(compress, s, dst, false);
> > -			kunmap(page);
> > +			kunmap_local(s);
> >  
> >  			drm_clflush_pages(&page, 1);
> >  
> > -- 
> > 2.25.1
> > 
> 
> 

  parent reply	other threads:[~2023-06-20 18:28 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-17 18:04 [Intel-gfx] [PATCH v2] drm/i915: Replace kmap() with kmap_local_page() Sumitra Sharma
2023-06-17 18:04 ` Sumitra Sharma
2023-06-17 18:04 ` Sumitra Sharma
2023-06-18 18:11 ` [Intel-gfx] " Ira Weiny
2023-06-18 18:11   ` Ira Weiny
2023-06-18 18:11   ` Ira Weiny
2023-06-19  7:59   ` [Intel-gfx] " Thomas Hellström (Intel)
2023-06-19  7:59     ` Thomas Hellström (Intel)
2023-06-19  7:59     ` Thomas Hellström (Intel)
2023-06-19  8:44     ` [Intel-gfx] " Tvrtko Ursulin
2023-06-19  8:44       ` Tvrtko Ursulin
2023-06-19  8:44       ` Tvrtko Ursulin
2023-06-19 15:45   ` Sumitra Sharma [this message]
2023-06-19 15:45     ` Sumitra Sharma
2023-06-19 15:45     ` Sumitra Sharma
2023-06-20 13:23     ` [Intel-gfx] " Ira Weiny
2023-06-20 13:23       ` Ira Weiny
2023-06-20 13:23       ` Ira Weiny
2023-06-20 18:07       ` [Intel-gfx] " Sumitra Sharma
2023-06-20 18:07         ` Sumitra Sharma
2023-06-20 18:07         ` Sumitra Sharma
2023-06-21  9:06         ` [Intel-gfx] " Thomas Hellström (Intel)
2023-06-21  9:06           ` Thomas Hellström (Intel)
2023-06-21  9:06           ` Thomas Hellström (Intel)
2023-06-21 13:24           ` [Intel-gfx] " Fabio M. De Francesco
2023-06-21 13:24             ` Fabio M. De Francesco
2023-06-21 13:24             ` Fabio M. De Francesco
2023-06-21 16:35           ` [Intel-gfx] " Ira Weiny
2023-06-21 16:35             ` Ira Weiny
2023-06-21 16:35             ` Ira Weiny
2023-06-21 18:51             ` [Intel-gfx] " Thomas Hellström (Intel)
2023-06-21 18:51               ` Thomas Hellström (Intel)
2023-06-21 18:51               ` Thomas Hellström (Intel)
2023-06-22  9:40               ` [Intel-gfx] " Tvrtko Ursulin
2023-06-22  9:40                 ` Tvrtko Ursulin
2023-06-22  9:40                 ` Tvrtko Ursulin
2023-06-26  9:02       ` [Intel-gfx] " Tvrtko Ursulin
2023-06-26  9:02         ` Tvrtko Ursulin
2023-06-26  9:02         ` Tvrtko Ursulin
2023-06-21  1:09 ` [Intel-gfx] ✗ Fi.CI.BAT: failure for drm/i915: Replace kmap() with kmap_local_page() (rev6) Patchwork
2023-06-21 22:30 ` [Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915: Replace kmap() with kmap_local_page() (rev7) Patchwork
2023-06-22 12:29 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
2023-06-24  0:10 ` [Intel-gfx] [PATCH v2] drm/i915: Replace kmap() with kmap_local_page() Fabio M. De Francesco
2023-06-24  0:10   ` Fabio M. De Francesco
2023-06-24  0:10   ` Fabio M. De Francesco
  -- strict thread matches above, loose matches on Subject: below --
2021-12-10 23:23 [PATCH 1/7] " ira.weiny
2021-12-22  6:08 ` [Intel-gfx] [PATCH V2] " ira.weiny

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=20230619154550.GB412243@sumitra.com \
    --to=sumitraartsy@gmail.com \
    --cc=airlied@gmail.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=drv@mailo.com \
    --cc=fmdefrancesco@gmail.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=ira.weiny@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rodrigo.vivi@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 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.