All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nikolay Borisov <nborisov@suse.com>
To: Sweet Tea Dorminy <sweettea-kernel@dorminy.me>,
	Chris Mason <clm@fb.com>, Josef Bacik <josef@toxicpanda.com>,
	David Sterba <dsterba@suse.com>, Nick Terrell <terrelln@fb.com>,
	linux-kernel@vger.kernel.org, linux-btrfs@vger.kernel.org,
	kernel-team@fb.com
Subject: Re: [PATCH 2/2] btrfs: Allocate page arrays using bulk page allocator.
Date: Tue, 29 Mar 2022 21:31:27 +0300	[thread overview]
Message-ID: <9c49bded-dbdc-8b8b-e6d4-f71fa7d33cbc@suse.com> (raw)
In-Reply-To: <9cbd861d3b302e19b990848ea747d2ea91d01aed.1648497027.git.sweettea-kernel@dorminy.me>



On 28.03.22 г. 23:14 ч., Sweet Tea Dorminy wrote:
> While calling alloc_page() in a loop is an effective way to populate an
> array of pages, the kernel provides a method to allocate pages in bulk.
> alloc_pages_bulk_array() populates the NULL slots in a page array, trying to
> grab more than one page at a time.
> 
> Unfortunately, it doesn't guarantee allocating all slots in the array,
> but it's easy to call it in a loop and return an error if no progress
> occurs. Similar code can be found in xfs/xfs_buf.c:xfs_buf_alloc_pages().
> 
> Signed-off-by: Sweet Tea Dorminy <sweettea-kernel@dorminy.me>

Reviewed-by: Nikolay Borisov <nborisov@suse.com>

  reply	other threads:[~2022-03-29 18:31 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [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-28 20:14     ` Sweet Tea Dorminy
2022-03-29 18:31     ` Nikolay Borisov [this message]
2022-03-28 20:14 [PATCH 0/2] btrfs: Allocate page arrays more efficiently Sweet Tea Dorminy
2022-03-28 21:58 ` David Sterba

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9c49bded-dbdc-8b8b-e6d4-f71fa7d33cbc@suse.com \
    --to=nborisov@suse.com \
    --cc=clm@fb.com \
    --cc=dsterba@suse.com \
    --cc=josef@toxicpanda.com \
    --cc=kernel-team@fb.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sweettea-kernel@dorminy.me \
    --cc=terrelln@fb.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.