Thread (92 messages) 92 messages, 15 authors, 2020-11-10

Re: [PATCH RFC PKS/PMEM 22/58] fs/f2fs: Utilize new kmap_thread()

From: Eric Biggers <ebiggers@kernel.org>
Date: 2020-10-12 16:19:59
Also in: amd-gfx, bpf, ceph-devel, dri-devel, intel-gfx, intel-wired-lan, io-uring, kexec, kvm, linux-bcache, linux-block, linux-btrfs, linux-cifs, linux-doc, linux-efi, linux-ext4, linux-f2fs-devel, linux-fsdevel, linux-kselftest, linux-mm, linux-mmc, linux-nfs, linux-rdma, linux-scsi, linux-um, lkml, netdev, nvdimm, target-devel, xen-devel

On Sun, Oct 11, 2020 at 11:56:35PM -0700, Ira Weiny wrote:
quoted
And I still don't really understand.  After this patchset, there is still code
nearly identical to the above (doing a temporary mapping just for a memcpy) that
would still be using kmap_atomic().
I don't understand.  You mean there would be other call sites calling:

kmap_atomic()
memcpy()
kunmap_atomic()
Yes, there are tons of places that do this.  Try 'git grep -A6 kmap_atomic'
and look for memcpy().

Hence why I'm asking what will be the "recommended" way to do this...
kunmap_thread() or kmap_atomic()?
And since I don't know the call site details if there are kmap_thread() calls
which are better off as kmap_atomic() calls I think it is worth converting
them.  But I made the assumption that kmap users would already be calling
kmap_atomic() if they could (because it is more efficient).
Not necessarily.  In cases where either one is correct, people might not have
put much thought into which of kmap() and kmap_atomic() they are using.

- Eric
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help