[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH RFC PKS/PMEM 22/58] fs/f2fs: Utilize new kmap_thread()
 
- To: Ira Weiny <ira.weiny@xxxxxxxxx>
 
- From: Eric Biggers <ebiggers@xxxxxxxxxx>
 
- Date: Mon, 12 Oct 2020 09:19:46 -0700
 
- Cc: Matthew Wilcox <willy@xxxxxxxxxxxxx>,	Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>,	Thomas Gleixner <tglx@xxxxxxxxxxxxx>,	Ingo Molnar <mingo@xxxxxxxxxx>, Borislav Petkov <bp@xxxxxxxxx>,	Andy Lutomirski <luto@xxxxxxxxxx>,	Peter Zijlstra <peterz@xxxxxxxxxxxxx>, linux-aio@xxxxxxxxx,	linux-efi@xxxxxxxxxxxxxxx, kvm@xxxxxxxxxxxxxxx,	linux-doc@xxxxxxxxxxxxxxx, linux-mmc@xxxxxxxxxxxxxxx,	Dave Hansen <dave.hansen@xxxxxxxxxxxxxxx>,	dri-devel@xxxxxxxxxxxxxxxxxxxxx, linux-mm@xxxxxxxxx,	target-devel@xxxxxxxxxxxxxxx, linux-mtd@xxxxxxxxxxxxxxxxxxx,	linux-kselftest@xxxxxxxxxxxxxxx, samba-technical@xxxxxxxxxxxxxxx,	ceph-devel@xxxxxxxxxxxxxxx, drbd-dev@xxxxxxxxxxxxxxxx,	devel@xxxxxxxxxxxxxxxxxxxx, linux-cifs@xxxxxxxxxxxxxxx,	linux-nilfs@xxxxxxxxxxxxxxx, linux-scsi@xxxxxxxxxxxxxxx,	linux-nvdimm@xxxxxxxxxxxx, linux-rdma@xxxxxxxxxxxxxxx,	x86@xxxxxxxxxx, amd-gfx@xxxxxxxxxxxxxxxxxxxxx,	linux-afs@xxxxxxxxxxxxxxxxxxx, cluster-devel@xxxxxxxxxx,	linux-cachefs@xxxxxxxxxx, intel-wired-lan@xxxxxxxxxxxxxxxx,	xen-devel@xxxxxxxxxxxxxxxxxxxx, linux-ext4@xxxxxxxxxxxxxxx,	Fenghua Yu <fenghua.yu@xxxxxxxxx>, ecryptfs@xxxxxxxxxxxxxxx,	linux-um@xxxxxxxxxxxxxxxxxxx, intel-gfx@xxxxxxxxxxxxxxxxxxxxx,	linux-erofs@xxxxxxxxxxxxxxxx, reiserfs-devel@xxxxxxxxxxxxxxx,	linux-block@xxxxxxxxxxxxxxx, linux-bcache@xxxxxxxxxxxxxxx,	Jaegeuk Kim <jaegeuk@xxxxxxxxxx>,	Dan Williams <dan.j.williams@xxxxxxxxx>, io-uring@xxxxxxxxxxxxxxx,	linux-nfs@xxxxxxxxxxxxxxx, linux-ntfs-dev@xxxxxxxxxxxxxxxxxxxxx,	netdev@xxxxxxxxxxxxxxx, kexec@xxxxxxxxxxxxxxxxxxx,	linux-kernel@xxxxxxxxxxxxxxx,	linux-f2fs-devel@xxxxxxxxxxxxxxxxxxxxx,	linux-fsdevel@xxxxxxxxxxxxxxx, bpf@xxxxxxxxxxxxxxx,	linuxppc-dev@xxxxxxxxxxxxxxxx, linux-btrfs@xxxxxxxxxxxxxxx
 
- Delivery-date: Mon, 12 Oct 2020 16:20:11 +0000
 
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
 
 
 
On Sun, Oct 11, 2020 at 11:56:35PM -0700, Ira Weiny wrote:
> > 
> > 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
 
 
    
     |