public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: Zhao Liu <zhao1.liu@linux.intel.com>,
	Jani Nikula <jani.nikula@linux.intel.com>,
	Joonas Lahtinen <joonas.lahtinen@linux.intel.com>,
	Rodrigo Vivi <rodrigo.vivi@intel.com>,
	David Airlie <airlied@gmail.com>, Daniel Vetter <daniel@ffwll.ch>,
	Ira Weiny <ira.weiny@intel.com>,
	"Fabio M . De Francesco" <fmdefrancesco@gmail.com>,
	intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
	linux-kernel@vger.kernel.org
Cc: Dave Hansen <dave.hansen@intel.com>,
	Zhenyu Wang <zhenyu.z.wang@intel.com>,
	Zhao Liu <zhao1.liu@intel.com>
Subject: Re: [PATCH v3 0/9] drm/i915: Replace kmap_atomic() with kmap_local_page()
Date: Thu, 14 Dec 2023 14:35:26 +0000	[thread overview]
Message-ID: <c968f151-6445-4ab4-9d2f-c59568665707@linux.intel.com> (raw)
In-Reply-To: <2abe6f02-b93e-4207-b9be-e9185c7b69e5@linux.intel.com>


On 14/12/2023 13:45, Tvrtko Ursulin wrote:
> 
> Hi Zhao,
> 
> On 14/12/2023 13:19, Zhao Liu wrote:
>> Hi maintainers,
>>
>> Just kindly ping.
>> May I ask if this refresh version could be merged into the next tree of
>> the i915?
> 
> I certainly spotted your series last week or so but then it slipped my 
> mind to go through it. Should be able to go through it today or tomorrow.

It all looks good to me. I only needed to queue a re-test in our CI 
since v3 failed BAT, but pretty sure it wasn't at fault. Once I am 
satisfied with the results I will merge the series. Thanks for the 
cleanups and your patience!

Regards,

Tvrtko


> Regards,
> 
> Tvrtko
> 
>>
>> Thanks,
>> Zhao
>>
>> On Sun, Dec 03, 2023 at 09:29:38PM +0800, Zhao Liu wrote:
>>> Date: Sun, 3 Dec 2023 21:29:38 +0800
>>> From: Zhao Liu <zhao1.liu@linux.intel.com>
>>> Subject: [PATCH v3 0/9] drm/i915: Replace kmap_atomic() with
>>>   kmap_local_page()
>>> X-Mailer: git-send-email 2.34.1
>>>
>>> From: Zhao Liu <zhao1.liu@intel.com>
>>>
>>> Hi all,
>>>
>>> I refreshed this v3 by rebasing v2 [1] on the commit 968f35f4ab1c
>>> ("Merge tag 'v6.7-rc3-smb3-client-fixes' of git://git.samba.org/sfrench/
>>> cifs-2.6").
>>>
>>> Based on the current code, I rechecked the substitutions in v2 and they
>>> still stand and are valid, so no code change in v3.
>>>
>>> Thanks for all the review! And sorry v2 was missed, I'll pay more
>>> attention to this v3.
>>>
>>>
>>> Purpose of This Patchset
>>> ========================
>>>
>>> The purpose of this pacthset is to replace all uses of kmap_atomic() in
>>> i915 with kmap_local_page() because the use of kmap_atomic() is being
>>> deprecated in favor of kmap_local_page()[2]. And 92b64bd (mm/highmem:
>>> add notes about conversions from kmap{,_atomic}()) has declared the
>>> deprecation of kmap_atomic().
>>>
>>>
>>> Motivation for Deprecating kmap_atomic() and Using kmap_local_page()
>>> ====================================================================
>>>
>>> The main difference between atomic and local mappings is that local
>>> mappings doesn't disable page faults or preemption (the preemption is
>>> disabled for !PREEMPT_RT case, otherwise it only disables migration).
>>>
>>> With kmap_local_page(), we can avoid the often unwanted side effect of
>>> unnecessary page faults and preemption disables.
>>>
>>>
>>> Patch summary
>>> =============
>>>
>>> Patch 1, 4-6 and 8-9 replace kmap_atomic()/kunmap_atomic() with
>>>          kmap_local_page()/kunmap_local() directly. With these local
>>>          mappings, the page faults and preemption are allowed.
>>>
>>> Patch 2 and 7 use memcpy_from_page() and memcpy_to_page() to replace
>>>          kmap_atomic()/kunmap_atomic(). These two variants of memcpy()
>>>          are based on the local mapping, so page faults and preemption
>>>          are also allowed in these two interfaces.
>>>
>>> Patch 3 replaces kmap_atomic()/kunmap_atomic() with kmap_local_page()/
>>>          kunmap_local() and also disable page fault since the for 
>>> special
>>>          handling (pls see the commit message).
>>>
>>>
>>> Reference
>>> =========
>>>
>>> [1]: 
>>> https://lore.kernel.org/all/20230329073220.3982460-1-zhao1.liu@linux.intel.com/
>>> [2]: 
>>> https://lore.kernel.org/all/20220813220034.806698-1-ira.weiny@intel.com
>>>
>>>
>>> Thanks and Best Regards,
>>> Zhao
>>>
>>> ---
>>> Changlog:
>>>
>>> Changes since v2:
>>> * Rebased on 968f35f4ab1c ("Merge tag 'v6.7-rc3-smb3-client-fixes' of
>>>    git://git.samba.org/sfrench/cifs-2.6").
>>> * Removed changelog (of v2) in commit message.
>>> * Fixed typo in cover letter (Fabio).
>>> * Added Reviewed-by tags from Ira and Fabio.
>>>
>>> Changes since v1:
>>> * Dropped hot plug related description in commit message since it has
>>>    nothing to do with kmap_local_page().
>>> * Emphasized the motivation for using kmap_local_page() in commit
>>>    message.
>>> * Rebased patch 1 on f47e630 (drm/i915/gem: Typecheck page lookups) to
>>>    keep the "idx" variable of type pgoff_t here.
>>> * Used memcpy_from_page() and memcpy_to_page() to replace
>>>    kmap_local_page() + memcpy() in patch 2.
>>>
>>> ---
>>> Zhao Liu (9):
>>>    drm/i915: Use kmap_local_page() in gem/i915_gem_object.c
>>>    drm/i915: Use memcpy_[from/to]_page() in gem/i915_gem_pyhs.c
>>>    drm/i915: Use kmap_local_page() in gem/i915_gem_shmem.c
>>>    drm/i915: Use kmap_local_page() in gem/selftests/huge_pages.c
>>>    drm/i915: Use kmap_local_page() in gem/selftests/i915_gem_coherency.c
>>>    drm/i915: Use kmap_local_page() in gem/selftests/i915_gem_context.c
>>>    drm/i915: Use memcpy_from_page() in gt/uc/intel_uc_fw.c
>>>    drm/i915: Use kmap_local_page() in i915_cmd_parser.c
>>>    drm/i915: Use kmap_local_page() in gem/i915_gem_execbuffer.c
>>>
>>>   drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c       | 10 +++++-----
>>>   drivers/gpu/drm/i915/gem/i915_gem_object.c           |  8 +++-----
>>>   drivers/gpu/drm/i915/gem/i915_gem_phys.c             | 10 ++--------
>>>   drivers/gpu/drm/i915/gem/i915_gem_shmem.c            |  6 ++++--
>>>   drivers/gpu/drm/i915/gem/selftests/huge_pages.c      |  6 +++---
>>>   .../gpu/drm/i915/gem/selftests/i915_gem_coherency.c  | 12 ++++--------
>>>   .../gpu/drm/i915/gem/selftests/i915_gem_context.c    |  8 ++++----
>>>   drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c             |  5 +----
>>>   drivers/gpu/drm/i915/i915_cmd_parser.c               |  4 ++--
>>>   9 files changed, 28 insertions(+), 41 deletions(-)
>>>
>>> -- 
>>> 2.34.1
>>>

  reply	other threads:[~2023-12-14 14:35 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-03 13:29 [PATCH v3 0/9] drm/i915: Replace kmap_atomic() with kmap_local_page() Zhao Liu
2023-12-03 13:29 ` [PATCH v3 1/9] drm/i915: Use kmap_local_page() in gem/i915_gem_object.c Zhao Liu
2023-12-03 13:29 ` [PATCH v3 2/9] drm/i915: Use memcpy_[from/to]_page() in gem/i915_gem_pyhs.c Zhao Liu
2023-12-03 13:29 ` [PATCH v3 3/9] drm/i915: Use kmap_local_page() in gem/i915_gem_shmem.c Zhao Liu
2023-12-03 13:29 ` [PATCH v3 4/9] drm/i915: Use kmap_local_page() in gem/selftests/huge_pages.c Zhao Liu
2023-12-03 13:29 ` [PATCH v3 5/9] drm/i915: Use kmap_local_page() in gem/selftests/i915_gem_coherency.c Zhao Liu
2023-12-03 13:29 ` [PATCH v3 6/9] drm/i915: Use kmap_local_page() in gem/selftests/i915_gem_context.c Zhao Liu
2023-12-03 13:29 ` [PATCH v3 7/9] drm/i915: Use memcpy_from_page() in gt/uc/intel_uc_fw.c Zhao Liu
2023-12-03 13:29 ` [PATCH v3 8/9] drm/i915: Use kmap_local_page() in i915_cmd_parser.c Zhao Liu
2023-12-03 13:29 ` [PATCH v3 9/9] drm/i915: Use kmap_local_page() in gem/i915_gem_execbuffer.c Zhao Liu
2023-12-14 13:19 ` [PATCH v3 0/9] drm/i915: Replace kmap_atomic() with kmap_local_page() Zhao Liu
2023-12-14 13:45   ` Tvrtko Ursulin
2023-12-14 14:35     ` Tvrtko Ursulin [this message]
2023-12-14 15:04       ` Zhao Liu
2023-12-15  9:37         ` Tvrtko Ursulin

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=c968f151-6445-4ab4-9d2f-c59568665707@linux.intel.com \
    --to=tvrtko.ursulin@linux.intel.com \
    --cc=airlied@gmail.com \
    --cc=daniel@ffwll.ch \
    --cc=dave.hansen@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=fmdefrancesco@gmail.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=ira.weiny@intel.com \
    --cc=jani.nikula@linux.intel.com \
    --cc=joonas.lahtinen@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rodrigo.vivi@intel.com \
    --cc=zhao1.liu@intel.com \
    --cc=zhao1.liu@linux.intel.com \
    --cc=zhenyu.z.wang@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox