[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: Dave Hansen <dave.hansen@xxxxxxxxx>
- From: Matthew Wilcox <willy@xxxxxxxxxxxxx>
- Date: Mon, 12 Oct 2020 17:44:38 +0100
- Cc: Eric Biggers <ebiggers@xxxxxxxxxx>, Ira Weiny <ira.weiny@xxxxxxxxx>, 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:45:12 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On Mon, Oct 12, 2020 at 09:28:29AM -0700, Dave Hansen wrote:
> kmap_atomic() is always preferred over kmap()/kmap_thread().
> kmap_atomic() is _much_ more lightweight since its TLB invalidation is
> always CPU-local and never broadcast.
>
> So, basically, unless you *must* sleep while the mapping is in place,
> kmap_atomic() is preferred.
But kmap_atomic() disables preemption, so the _ideal_ interface would map
it only locally, then on preemption make it global. I don't even know
if that _can_ be done. But this email makes it seem like kmap_atomic()
has no downsides.
|