[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH RFC PKS/PMEM 20/58] fs/jffs2: 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:55 -0700
- Cc: Ira Weiny <ira.weiny@xxxxxxxxx>, David Woodhouse <dwmw2@xxxxxxxxxxxxx>, Richard Weinberger <richard@xxxxxx>, 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:52:03 +0000
- Ironport-sdr: tfPYQjWZcvUNnpYePsAkAMaOg6Pbh7V3JU1drmegAKrQ3tb8GFnTuTFhk8DBuRopBRHq/BF4wa BVH26UoDbF/A==
- Ironport-sdr: eWSKFRksQmWHvS1j4lFouXjU/VQ78asIZFlodYo3aryNHFOArT/TLAMBqja15iBonRYEaVT+Tm vvSyZvytK3gg==
- 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: David Woodhouse <dwmw2@xxxxxxxxxxxxx>
Cc: Richard Weinberger <richard@xxxxxx>
Signed-off-by: Ira Weiny <ira.weiny@xxxxxxxxx>
---
fs/jffs2/file.c | 4 ++--
fs/jffs2/gc.c | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/fs/jffs2/file.c b/fs/jffs2/file.c
index f8fb89b10227..3e6d54f9b011 100644
--- a/fs/jffs2/file.c
+++ b/fs/jffs2/file.c
@@ -88,7 +88,7 @@ static int jffs2_do_readpage_nolock (struct inode *inode,
struct page *pg)
BUG_ON(!PageLocked(pg));
- pg_buf = kmap(pg);
+ pg_buf = kmap_thread(pg);
/* FIXME: Can kmap fail? */
ret = jffs2_read_inode_range(c, f, pg_buf, pg->index << PAGE_SHIFT,
@@ -103,7 +103,7 @@ static int jffs2_do_readpage_nolock (struct inode *inode,
struct page *pg)
}
flush_dcache_page(pg);
- kunmap(pg);
+ kunmap_thread(pg);
jffs2_dbg(2, "readpage finished\n");
return ret;
diff --git a/fs/jffs2/gc.c b/fs/jffs2/gc.c
index 373b3b7c9f44..a7259783ab84 100644
--- a/fs/jffs2/gc.c
+++ b/fs/jffs2/gc.c
@@ -1335,7 +1335,7 @@ static int jffs2_garbage_collect_dnode(struct
jffs2_sb_info *c, struct jffs2_era
return PTR_ERR(page);
}
- pg_ptr = kmap(page);
+ pg_ptr = kmap_thread(page);
mutex_lock(&f->sem);
offset = start;
@@ -1400,7 +1400,7 @@ static int jffs2_garbage_collect_dnode(struct
jffs2_sb_info *c, struct jffs2_era
}
}
- kunmap(page);
+ kunmap_thread(page);
put_page(page);
return ret;
}
--
2.28.0.rc0.12.gb6a658bd00c9
|