linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH V2 0/8] btrfs: convert kmaps to core page calls
@ 2021-02-10  6:22 ira.weiny
  2021-02-10  6:22 ` [PATCH V2 1/8] mm/highmem: Lift memcpy_[to|from]_page to core ira.weiny
                   ` (8 more replies)
  0 siblings, 9 replies; 31+ messages in thread
From: ira.weiny @ 2021-02-10  6:22 UTC (permalink / raw)
  To: Andrew Morton, David Sterba
  Cc: Ira Weiny, clm, josef, Christoph Hellwig, linux-kernel, linux-fsdevel

From: Ira Weiny <ira.weiny@intel.com>

Changes from V1:
	Rework commit messages because they were very weak
	Change 'fs/btrfs: X' to 'btrfs: x'
		https://lore.kernel.org/lkml/20210209151442.GU1993@suse.cz/
	Per Andrew
		Split out changes to highmem.h
			The addition memcpy, memmove, and memset page functions
			The change from kmap_atomic to kmap_local_page
			The addition of BUG_ON
			The conversion of memzero_page to zero_user in iov_iter
		Change BUG_ON to VM_BUG_ON
	While we are refactoring adjust the line length down per Chaitany


There are many places where kmap/<operation>/kunmap patterns occur.  We lift a
couple of these patterns to the core common functions and use them as well as
existing core functions in the btrfs file system.  At the same time we convert
those core functions to use kmap_local_page() which is more efficient in those
calls.

Per the conversation on V1 it looks like Andrew would like this to go through
the btrfs tree.  I think that is fine.  The other users of
memcpy_[to|from]_page are probably not ready and I believe could be taken in an
early rc after David submits.

Is that ok with you David?

Thanks,
Ira

Ira Weiny (8):
  mm/highmem: Lift memcpy_[to|from]_page to core
  mm/highmem: Convert memcpy_[to|from]_page() to kmap_local_page()
  mm/highmem: Introduce memcpy_page(), memmove_page(), and memset_page()
  mm/highmem: Add VM_BUG_ON() to mem*_page() calls
  iov_iter: Remove memzero_page() in favor of zero_user()
  btrfs: use memcpy_[to|from]_page() and kmap_local_page()
  btrfs: use copy_highpage() instead of 2 kmaps()
  btrfs: convert to zero_user()

 fs/btrfs/compression.c  | 11 +++-----
 fs/btrfs/extent_io.c    | 22 +++-------------
 fs/btrfs/inode.c        | 33 ++++++++----------------
 fs/btrfs/lzo.c          |  4 +--
 fs/btrfs/raid56.c       | 10 +-------
 fs/btrfs/reflink.c      | 12 ++-------
 fs/btrfs/send.c         |  7 ++----
 fs/btrfs/zlib.c         | 10 +++-----
 fs/btrfs/zstd.c         | 11 +++-----
 include/linux/highmem.h | 56 +++++++++++++++++++++++++++++++++++++++++
 lib/iov_iter.c          | 26 +++----------------
 11 files changed, 89 insertions(+), 113 deletions(-)

-- 
2.28.0.rc0.12.gb6a658bd00c9


^ permalink raw reply	[flat|nested] 31+ messages in thread

end of thread, other threads:[~2021-02-11 21:33 UTC | newest]

Thread overview: 31+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-10  6:22 [PATCH V2 0/8] btrfs: convert kmaps to core page calls ira.weiny
2021-02-10  6:22 ` [PATCH V2 1/8] mm/highmem: Lift memcpy_[to|from]_page to core ira.weiny
2021-02-10  6:33   ` Chaitanya Kulkarni
2021-02-10 12:53   ` Christoph Hellwig
2021-02-10  6:22 ` [PATCH V2 2/8] mm/highmem: Convert memcpy_[to|from]_page() to kmap_local_page() ira.weiny
2021-02-10  6:37   ` Chaitanya Kulkarni
2021-02-10 12:54   ` Christoph Hellwig
2021-02-10  6:22 ` [PATCH V2 3/8] mm/highmem: Introduce memcpy_page(), memmove_page(), and memset_page() ira.weiny
2021-02-10  6:46   ` Chaitanya Kulkarni
2021-02-10 12:54   ` Christoph Hellwig
2021-02-10  6:22 ` [PATCH V2 4/8] mm/highmem: Add VM_BUG_ON() to mem*_page() calls ira.weiny
2021-02-10  6:57   ` Chaitanya Kulkarni
2021-02-10 16:31     ` Ira Weiny
2021-02-10 12:55   ` Christoph Hellwig
2021-02-10 16:29     ` Ira Weiny
2021-02-10 16:41       ` Christoph Hellwig
2021-02-10 17:04         ` Ira Weiny
2021-02-10 18:56       ` Matthew Wilcox
2021-02-10 21:22         ` Ira Weiny
2021-02-11 18:52           ` David Sterba
2021-02-10 17:49   ` [PATCH V2.1] " ira.weiny
2021-02-10  6:22 ` [PATCH V2 5/8] iov_iter: Remove memzero_page() in favor of zero_user() ira.weiny
2021-02-10 12:55   ` Christoph Hellwig
2021-02-10  6:22 ` [PATCH V2 6/8] btrfs: use memcpy_[to|from]_page() and kmap_local_page() ira.weiny
2021-02-10 12:56   ` Christoph Hellwig
2021-02-10  6:22 ` [PATCH V2 7/8] btrfs: use copy_highpage() instead of 2 kmaps() ira.weiny
2021-02-10 12:56   ` Christoph Hellwig
2021-02-10  6:22 ` [PATCH V2 8/8] btrfs: convert to zero_user() ira.weiny
2021-02-10 12:57   ` Christoph Hellwig
2021-02-11 19:38 ` [PATCH V2 0/8] btrfs: convert kmaps to core page calls David Sterba
2021-02-11 21:32   ` Ira Weiny

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).