From: David Sterba <dsterba@suse.cz>
To: Sweet Tea Dorminy <sweettea-kernel@dorminy.me>
Cc: dsterba@suse.cz, 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, Nikolay Borisov <nborisov@suse.com>
Subject: Re: [PATCH v3 2/2] btrfs: allocate page arrays using bulk page allocator
Date: Fri, 1 Apr 2022 15:26:00 +0200 [thread overview]
Message-ID: <20220401132600.GI15609@twin.jikos.cz> (raw)
In-Reply-To: <f9493291-9981-d684-bf49-a551aaf08061@dorminy.me>
On Thu, Mar 31, 2022 at 02:19:07PM -0400, Sweet Tea Dorminy wrote:
> > Also in the xfs code there's memalloc_retry_wait() which is supposed to be
> > called when repeated memory allocation is retried. What was the reason
> > you removed it?
>
> Trying to keep the behavior as close as possible to the existing behavior.
I see, makes sense.
> The current behavior of each alloc_page loop is to fail if alloc_page()
> fails; in the worst case, alloc_pages_bulk_array() calls alloc_page()
> after trying to get a batch, so I figured the worst case is still
> basically a loop calling alloc_page() and failing if it ever fails.
>
> Reading up on it, though, arguably the memalloc_retry_wait() should
> already be in all the callsites, so maybe I should insert a patch in the
> middle that just adds the memalloc_retry_wait() into
> btrfs_alloc_page_array()? Since it's an orthogonal fixup to either the
> refactoring or the conversion to alloc_pages_bulk_array()?
Yeah a separate patch with the reasonig about the potential effects is
better. The v3 is now in misc-next with the suggested loop refactoring,
so please send the memalloc_retry_wait() update on top of that. Thanks.
prev parent reply other threads:[~2022-04-01 13:30 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-30 20:11 [PATCH v3 0/2] btrfs: allocate page arrays more efficiently Sweet Tea Dorminy
2022-03-30 20:11 ` [PATCH v3 1/2] btrfs: factor out allocating an array of pages Sweet Tea Dorminy
2022-03-31 17:26 ` David Sterba
2022-03-30 20:11 ` [PATCH v3 2/2] btrfs: allocate page arrays using bulk page allocator Sweet Tea Dorminy
2022-03-31 17:35 ` David Sterba
2022-03-31 18:19 ` Sweet Tea Dorminy
2022-04-01 13:26 ` David Sterba [this message]
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=20220401132600.GI15609@twin.jikos.cz \
--to=dsterba@suse.cz \
--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=nborisov@suse.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®