[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH RFC PKS/PMEM 16/58] fs/gfs2: Utilize new kmap_thread()
- To: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>, Thomas Gleixner <tglx@xxxxxxxxxxxxx>, Ingo Molnar <mingo@xxxxxxxxxx>, Borislav Petkov <bp@xxxxxxxxx>, Andy Lutomirski <luto@xxxxxxxxxx>, Peter Zijlstra <peterz@xxxxxxxxxxxxx>
- From: ira.weiny@xxxxxxxxx
- Date: Fri, 9 Oct 2020 12:49:51 -0700
- Cc: Ira Weiny <ira.weiny@xxxxxxxxx>, Bob Peterson <rpeterso@xxxxxxxxxx>, Andreas Gruenbacher <agruenba@xxxxxxxxxx>, 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: Fri, 09 Oct 2020 19:51:48 +0000
- Ironport-sdr: FSckl3oZnJbJGVIGFWQtPrkxhCD1TiJIJwZd6ZBxOGULnZQ/lEw9wNGzMvWdPMesk5C6Ybblwm 1voMWuWWnFJQ==
- Ironport-sdr: /XLKsCzQipLZYQ1rW+ETY2grttZNamy0/VnWHXeIGpFKMMZaq8ytLhObxugEuPiPsSx/1cqrId IdubLVsw8k0A==
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
From: Ira Weiny <ira.weiny@xxxxxxxxx>
The kmap() calls in this FS are localized to a single thread. To avoid
the over head of global PKRS updates use the new kmap_thread() call.
Cc: Bob Peterson <rpeterso@xxxxxxxxxx>
Cc: Andreas Gruenbacher <agruenba@xxxxxxxxxx>
Signed-off-by: Ira Weiny <ira.weiny@xxxxxxxxx>
---
fs/gfs2/bmap.c | 4 ++--
fs/gfs2/ops_fstype.c | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/fs/gfs2/bmap.c b/fs/gfs2/bmap.c
index 0f69fbd4af66..375af4528411 100644
--- a/fs/gfs2/bmap.c
+++ b/fs/gfs2/bmap.c
@@ -67,7 +67,7 @@ static int gfs2_unstuffer_page(struct gfs2_inode *ip, struct
buffer_head *dibh,
}
if (!PageUptodate(page)) {
- void *kaddr = kmap(page);
+ void *kaddr = kmap_thread(page);
u64 dsize = i_size_read(inode);
if (dsize > gfs2_max_stuffed_size(ip))
@@ -75,7 +75,7 @@ static int gfs2_unstuffer_page(struct gfs2_inode *ip, struct
buffer_head *dibh,
memcpy(kaddr, dibh->b_data + sizeof(struct gfs2_dinode), dsize);
memset(kaddr + dsize, 0, PAGE_SIZE - dsize);
- kunmap(page);
+ kunmap_thread(page);
SetPageUptodate(page);
}
diff --git a/fs/gfs2/ops_fstype.c b/fs/gfs2/ops_fstype.c
index 6d18d2c91add..a5d20d9b504a 100644
--- a/fs/gfs2/ops_fstype.c
+++ b/fs/gfs2/ops_fstype.c
@@ -263,9 +263,9 @@ static int gfs2_read_super(struct gfs2_sbd *sdp, sector_t
sector, int silent)
__free_page(page);
return -EIO;
}
- p = kmap(page);
+ p = kmap_thread(page);
gfs2_sb_in(sdp, p);
- kunmap(page);
+ kunmap_thread(page);
__free_page(page);
return gfs2_check_sb(sdp, silent);
}
--
2.28.0.rc0.12.gb6a658bd00c9
|