From: "Chris Mason" <clm@fb.com>
To: Roman Gushchin <guro@fb.com>
Cc: Josef Bacik <josef@toxicpanda.com>,
David Sterba <dsterba@suse.com>, <linux-btrfs@vger.kernel.org>,
<linux-kernel@vger.kernel.org>, <kernel-team@fb.com>,
Rik van Riel <riel@surriel.com>
Subject: Re: [PATCH] btrfs: implement migratepage callback
Date: Wed, 04 Mar 2020 14:53:21 -0500 [thread overview]
Message-ID: <EE31DE08-36D3-4A5F-910D-9264FF973C30@fb.com> (raw)
In-Reply-To: <20200304195002.3854765-1-guro@fb.com>
On 4 Mar 2020, at 14:50, Roman Gushchin wrote:
> Currently btrfs doesn't provide a migratepage callback. It means that
> fallback_migrate_page() is used to migrate btrfs pages.
>
> fallback_migrate_page() cannot move dirty pages, instead it tries to
> flush them (in sync mode) or just fails (in async mode).
>
> In the sync mode pages which are scheduled to be processed by
> btrfs_writepage_fixup_worker() can't be effectively flushed by the
> migration code, because there is no established way to wait for the
> completion of the delayed work.
>
> It all leads to page migration failures.
>
> To fix it the patch implements a btrs-specific migratepage callback,
> which is similar to iomap_migrate_page() used by some other fs, except
> it does take care of the PagePrivate2 flag which is used for data
> ordering purposes.
Since the default migratepage didn’t copy PagePrivate2, didn’t you
find it was also causing pages to get funneled into the fixup worker
flow?
-chris
next prev parent reply other threads:[~2020-03-04 19:53 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-04 19:50 [PATCH] btrfs: implement migratepage callback Roman Gushchin
2020-03-04 19:53 ` Chris Mason [this message]
2020-03-04 20:19 ` Roman Gushchin
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=EE31DE08-36D3-4A5F-910D-9264FF973C30@fb.com \
--to=clm@fb.com \
--cc=dsterba@suse.com \
--cc=guro@fb.com \
--cc=josef@toxicpanda.com \
--cc=kernel-team@fb.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=riel@surriel.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