[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH RFC PKS/PMEM 24/58] fs/freevxfs: Utilize new kmap_thread()
 
- To: Christoph Hellwig <hch@xxxxxxxxxxxxx>
 
- From: Ira Weiny <ira.weiny@xxxxxxxxx>
 
- Date: Tue, 13 Oct 2020 13:52:49 -0700
 
- Cc: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>,	Thomas Gleixner <tglx@xxxxxxxxxxxxx>,	Ingo Molnar <mingo@xxxxxxxxxx>, Borislav Petkov <bp@xxxxxxxxx>,	Andy Lutomirski <luto@xxxxxxxxxx>,	Peter Zijlstra <peterz@xxxxxxxxxxxxx>, x86@xxxxxxxxxx,	Dave Hansen <dave.hansen@xxxxxxxxxxxxxxx>,	Dan Williams <dan.j.williams@xxxxxxxxx>,	Fenghua Yu <fenghua.yu@xxxxxxxxx>, linux-doc@xxxxxxxxxxxxxxx,	linux-kernel@xxxxxxxxxxxxxxx, linux-nvdimm@xxxxxxxxxxxx,	linux-fsdevel@xxxxxxxxxxxxxxx, linux-mm@xxxxxxxxx,	linux-kselftest@xxxxxxxxxxxxxxx, linuxppc-dev@xxxxxxxxxxxxxxxx,	kvm@xxxxxxxxxxxxxxx, netdev@xxxxxxxxxxxxxxx, bpf@xxxxxxxxxxxxxxx,	kexec@xxxxxxxxxxxxxxxxxxx, linux-bcache@xxxxxxxxxxxxxxx,	linux-mtd@xxxxxxxxxxxxxxxxxxx, devel@xxxxxxxxxxxxxxxxxxxx,	linux-efi@xxxxxxxxxxxxxxx, linux-mmc@xxxxxxxxxxxxxxx,	linux-scsi@xxxxxxxxxxxxxxx, target-devel@xxxxxxxxxxxxxxx,	linux-nfs@xxxxxxxxxxxxxxx, ceph-devel@xxxxxxxxxxxxxxx,	linux-ext4@xxxxxxxxxxxxxxx, linux-aio@xxxxxxxxx,	io-uring@xxxxxxxxxxxxxxx, linux-erofs@xxxxxxxxxxxxxxxx,	linux-um@xxxxxxxxxxxxxxxxxxx, linux-ntfs-dev@xxxxxxxxxxxxxxxxxxxxx,	reiserfs-devel@xxxxxxxxxxxxxxx,	linux-f2fs-devel@xxxxxxxxxxxxxxxxxxxxx, linux-nilfs@xxxxxxxxxxxxxxx,	cluster-devel@xxxxxxxxxx, ecryptfs@xxxxxxxxxxxxxxx,	linux-cifs@xxxxxxxxxxxxxxx, linux-btrfs@xxxxxxxxxxxxxxx,	linux-afs@xxxxxxxxxxxxxxxxxxx, linux-rdma@xxxxxxxxxxxxxxx,	amd-gfx@xxxxxxxxxxxxxxxxxxxxx, dri-devel@xxxxxxxxxxxxxxxxxxxxx,	intel-gfx@xxxxxxxxxxxxxxxxxxxxx, drbd-dev@xxxxxxxxxxxxxxxx,	linux-block@xxxxxxxxxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxxx,	linux-cachefs@xxxxxxxxxx, samba-technical@xxxxxxxxxxxxxxx,	intel-wired-lan@xxxxxxxxxxxxxxxx
 
- Delivery-date: Tue, 13 Oct 2020 20:53:46 +0000
 
- Ironport-sdr: /MmXQRYQvgBcEGfKoNhk9f2PS3vj/cqNlTfxp9L8WVqmrKA6ZTOXRPZQp7VD83GPrBTMTzbctC VysZucckUx8g==
 
- Ironport-sdr: 6pC5EU5QwoXbsJ9AhSALdpEnefHex0iyEFu7THvX1eaSFNd77CbWePaQQdxa3yUvYDZ6VBgRvg Vwn0OOQPMwwA==
 
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
 
 
 
On Tue, Oct 13, 2020 at 12:25:44PM +0100, Christoph Hellwig wrote:
> > -   kaddr = kmap(pp);
> > +   kaddr = kmap_thread(pp);
> >     memcpy(kaddr, vip->vii_immed.vi_immed + offset, PAGE_SIZE);
> > -   kunmap(pp);
> > +   kunmap_thread(pp);
> 
> You only Cced me on this particular patch, which means I have absolutely
> no idea what kmap_thread and kunmap_thread actually do, and thus can't
> provide an informed review.
Sorry the list was so big I struggled with who to CC and on which patches.
> 
> That being said I think your life would be a lot easier if you add
> helpers for the above code sequence and its counterpart that copies
> to a potential hughmem page first, as that hides the implementation
> details from most users.
Matthew Wilcox and Al Viro have suggested similar ideas.
https://lore.kernel.org/lkml/20201013205012.GI2046448@xxxxxxxxxxxxxxxxxxxxxxxxx/
Ira
 
 
    
     |