linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] btrfs: Allocate page arrays more efficiently.
@ 2022-03-28 20:14 Sweet Tea Dorminy
  2022-03-28 21:58 ` David Sterba
  0 siblings, 1 reply; 10+ messages in thread
From: Sweet Tea Dorminy @ 2022-03-28 20:14 UTC (permalink / raw)
  To: Chris Mason, Josef Bacik, David Sterba, Nick Terrell,
	linux-kernel, linux-btrfs, kernel-team
  Cc: Sweet Tea Dorminy

In several places, btrfs allocates an array of pages, one at a time.  In
addition to duplicating code, the mm subsystem provides a helper to
allocate multiple pages at once into an array which is suited for our
usecase. In the fast path, the batching can result in better allocation
decisions and less locking. This changeset first adjusts the users to
call a common array-of-pages allocation function, then adjusts that
common function to use the batch page allocator.

Sweet Tea Dorminy (2):
  btrfs: Factor out allocating an array of pages.
  btrfs: Allocate page arrays using bulk page allocator.

 fs/btrfs/check-integrity.c |  8 +++-----
 fs/btrfs/compression.c     | 37 +++++++++++++++--------------------
 fs/btrfs/ctree.c           | 32 ++++++++++++++++++++++++++++++
 fs/btrfs/ctree.h           |  2 ++
 fs/btrfs/extent_io.c       | 40 +++++++++++++++++++++++---------------
 fs/btrfs/inode.c           | 10 ++++------
 fs/btrfs/raid56.c          | 30 ++++------------------------
 7 files changed, 85 insertions(+), 74 deletions(-)

-- 
2.35.1


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

end of thread, other threads:[~2022-03-30 19:01 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <cover.1648497027.git.sweettea-kernel@dorminy.me>
2022-03-28 20:14 ` [PATCH 1/2] btrfs: Factor out allocating an array of pages Sweet Tea Dorminy
2022-03-28 23:09   ` David Sterba
2022-03-30 19:01     ` Sweet Tea Dorminy
2022-03-29 10:04   ` Filipe Manana
2022-03-29 18:30   ` Nikolay Borisov
2022-03-28 20:14 ` [PATCH 2/2] btrfs: Allocate page arrays using bulk page allocator Sweet Tea Dorminy
2022-03-28 20:14   ` Sweet Tea Dorminy
2022-03-29 18:31   ` Nikolay Borisov
2022-03-28 20:14 [PATCH 0/2] btrfs: Allocate page arrays more efficiently Sweet Tea Dorminy
2022-03-28 21:58 ` David Sterba

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).