[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20201124060755.1405602-1-ira.weiny@intel.com>
Date: Mon, 23 Nov 2020 22:07:38 -0800
From: ira.weiny@...el.com
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: Ira Weiny <ira.weiny@...el.com>,
Thomas Gleixner <tglx@...utronix.de>,
Dave Hansen <dave.hansen@...el.com>,
Matthew Wilcox <willy@...radead.org>,
Christoph Hellwig <hch@...radead.org>,
Dan Williams <dan.j.williams@...el.com>,
Al Viro <viro@...iv.linux.org.uk>,
Eric Biggers <ebiggers@...nel.org>,
Luis Chamberlain <mcgrof@...nel.org>,
Patrik Jakobsson <patrik.r.jakobsson@...il.com>,
Jani Nikula <jani.nikula@...ux.intel.com>,
Joonas Lahtinen <joonas.lahtinen@...ux.intel.com>,
Rodrigo Vivi <rodrigo.vivi@...el.com>,
David Howells <dhowells@...hat.com>, Chris Mason <clm@...com>,
Josef Bacik <josef@...icpanda.com>,
David Sterba <dsterba@...e.com>,
Steve French <sfrench@...ba.org>,
Jaegeuk Kim <jaegeuk@...nel.org>, Chao Yu <yuchao0@...wei.com>,
Nicolas Pitre <nico@...xnic.net>,
"Martin K. Petersen" <martin.petersen@...cle.com>,
Brian King <brking@...ibm.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Alexei Starovoitov <ast@...nel.org>,
Daniel Borkmann <daniel@...earbox.net>,
Jérôme Glisse <jglisse@...hat.com>,
Kirti Wankhede <kwankhede@...dia.com>,
linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org
Subject: [PATCH 00/17] kmap: Create mem*_page interfaces
From: Ira Weiny <ira.weiny@...el.com>
The following pattern is used often:
kmap()
memcpy(), memmove(), or memset()
kunmap()
The problem with this is 2 fold: 1) This is best done with k[un]map_atomic().
2) kmap() is expanding and evolving beyond the use of highmem.
To the second point we have new functionality being placed behind kmap, such as
PKS, which has nothing to do with highmem. Also we have new kmap interfaces,
kmap_local() which allow for a more fined grained mapping of pages and would be
very appropriate for the above pattern.
iov_iter.c already defined 3 functions which do most of what we want.
memcpy_from_page()
memcpy_to_page()
memzero_page()
Lift these to the core and enhance with memcpy_page(), memmove_page(), and
memset_page(). Then replace the patterns throughout the kernel as appropriate.
Once the kmap_local() implementation is finalized the kmap_atomic() can be
replaced with kmap_local(). For the moment use kmap_atomic().
Ira Weiny (17):
mm/highmem: Lift memcpy_[to|from]_page and memset_page to core
drivers/firmware_loader: Use new memcpy_[to|from]_page()
drivers/gpu: Convert to mem*_page()
fs/afs: Convert to memzero_page()
fs/btrfs: Convert to memzero_page()
fs/hfs: Convert to mem*_page() interface
fs/cifs: Convert to memcpy_page()
fs/hfsplus: Convert to mem*_page()
fs/f2fs: Remove f2fs_copy_page()
fs/freevxfs: Use memcpy_to_page()
fs/reiserfs: Use memcpy_from_page()
fs/cramfs: Use memcpy_from_page()
drivers/target: Convert to mem*_page()
drivers/scsi: Use memcpy_to_page()
drivers/staging: Use memcpy_to/from_page()
lib: Use mempcy_to/from_page()
samples: Use memcpy_to/from_page()
drivers/base/firmware_loader/fallback.c | 11 +++--
drivers/gpu/drm/gma500/gma_display.c | 7 ++-
drivers/gpu/drm/gma500/mmu.c | 4 +-
drivers/gpu/drm/i915/gem/i915_gem_shmem.c | 6 +--
drivers/gpu/drm/i915/gt/intel_gtt.c | 9 +---
drivers/gpu/drm/i915/gt/shmem_utils.c | 8 ++--
drivers/scsi/ipr.c | 11 +----
drivers/staging/rts5208/rtsx_transport.c | 8 ++--
drivers/target/target_core_rd.c | 6 +--
drivers/target/target_core_transport.c | 10 ++---
fs/afs/write.c | 5 +--
fs/btrfs/inode.c | 21 +++------
fs/cifs/smb2ops.c | 10 ++---
fs/cramfs/inode.c | 3 +-
fs/f2fs/f2fs.h | 10 -----
fs/f2fs/file.c | 3 +-
fs/freevxfs/vxfs_immed.c | 6 +--
fs/hfs/bnode.c | 13 ++----
fs/hfsplus/bnode.c | 53 +++++++----------------
fs/reiserfs/journal.c | 9 ++--
include/linux/pagemap.h | 49 +++++++++++++++++++++
lib/iov_iter.c | 21 ---------
lib/test_bpf.c | 11 +----
lib/test_hmm.c | 10 +----
samples/vfio-mdev/mbochs.c | 8 ++--
25 files changed, 119 insertions(+), 193 deletions(-)
--
2.28.0.rc0.12.gb6a658bd00c9
Powered by blists - more mailing lists