diff options
author | David Reaver <me@davidreaver.com> | 2025-01-08 22:21:30 +0300 |
---|---|---|
committer | Song Liu <song@kernel.org> | 2025-01-13 18:36:29 +0300 |
commit | 4fa91616c078c203f1ab6c43f9524b7e352c8217 (patch) | |
tree | b9b5d51bf095e7f86845af44ecafe1e5f0407d7e /rust/kernel/alloc.rs | |
parent | 127186cfb184eaccdfe948e6da66940cfa03efc5 (diff) | |
download | linux-4fa91616c078c203f1ab6c43f9524b7e352c8217.tar.xz |
md: Replace deprecated kmap_atomic() with kmap_local_page()
kmap_atomic() is deprecated and should be replaced with kmap_local_page()
[1][2]. kmap_local_page() is faster in kernels with HIGHMEM enabled, can
take page faults, and allows preemption.
According to [2], this is safe as long as the code between kmap_atomic()
and kunmap_atomic() does not implicitly depend on disabling page faults or
preemption. It appears to me that none of the call sites in this patch
depend on disabling page faults or preemption; they are all mapping a page
to simply extract some information from it or print some debug info.
[1] https://lwn.net/Articles/836144/
[2] https://docs.kernel.org/mm/highmem.html#temporary-virtual-mappings
Signed-off-by: David Reaver <me@davidreaver.com>
Link: https://lore.kernel.org/r/20250108192131.46843-1-me@davidreaver.com
Signed-off-by: Song Liu <song@kernel.org>
Diffstat (limited to 'rust/kernel/alloc.rs')
0 files changed, 0 insertions, 0 deletions