From: Qu Wenruo <quwenruo.btrfs@gmx.com>
To: Nikolay Borisov <nborisov@suse.com>,
David Sterba <dsterba@suse.com>,
linux-btrfs@vger.kernel.org
Cc: willy@infradead.org
Subject: Re: [PATCH v2] btrfs: use preallocated pages for super block write
Date: Fri, 10 Jun 2022 15:55:38 +0800 [thread overview]
Message-ID: <1440ccc5-3df9-a613-b923-ecc4a3e6e2cf@gmx.com> (raw)
In-Reply-To: <237c58a0-dfc2-a99c-9559-394831de0ee4@suse.com>
On 2022/6/10 15:39, Nikolay Borisov wrote:
>
>
> On 10.06.22 г. 10:33 ч., Qu Wenruo wrote:
>>
>>
>> On 2022/6/10 15:23, Nikolay Borisov wrote:
>>>
>>>
>>> On 10.06.22 г. 3:07 ч., Qu Wenruo wrote:
>>>>
>>>>
>>>> On 2022/6/10 00:46, David Sterba wrote:
>>>>> Currently the super block page is from the mapping of the block
>>>>> device,
>>>>> this is result of direct conversion from the previous buffer_head
>>>>> to bio
>>>>> API. We don't use the page cache or the mapping anywhere else, the
>>>>> page
>>>>> is a temporary space for the associated bio.
>>>>>
>>>>> Allocate pages for all super block copies at device allocation time,
>>>>> also to avoid any later allocation problems when writing the super
>>>>> block. This simplifies the page reference tracking, but the page
>>>>> lock is
>>>>> still used as waiting mechanism for the write and write error is
>>>>> tracked
>>>>> in the page.
>>>>>
>>>>> As there is a separate page for each super block copy all can be
>>>>> submitted in parallel, as before.
>>>>
>>>> Is there any history on why we want parallel super block submission?
>>>
>>> Because it's in the transaction critical path so it affects latency of
>>> operations.
>>
>> Not exactly.
>>
>> Super block writeback happens with TRANS_STATE_UNBLOCKED status, which
>> means new transaction can already be started.
>
> You are right, in this case then I guess we can still stay with a single
> page and synchronous writeout but this needs to be explicitly mentioned
> in the changelog.
Then I would be way more happier to convert all these bio submission
path to submit_bio_wait(), which makes our error handling easier and get
rid of the super stupid endio function.
Thanks,
Qu
>
> <snip>
next prev parent reply other threads:[~2022-06-10 7:56 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-09 16:46 [PATCH v2] btrfs: use preallocated pages for super block write David Sterba
2022-06-09 21:00 ` Matthew Wilcox
2022-06-09 22:54 ` David Sterba
2022-06-09 22:58 ` Qu Wenruo
2022-06-09 22:59 ` David Sterba
2022-06-09 23:15 ` Qu Wenruo
2022-06-09 23:35 ` David Sterba
2022-06-10 1:40 ` Matthew Wilcox
2022-06-10 2:46 ` Qu Wenruo
2022-06-10 3:31 ` Matthew Wilcox
2022-06-10 4:53 ` Qu Wenruo
2022-06-10 0:07 ` Qu Wenruo
2022-06-10 7:23 ` Nikolay Borisov
2022-06-10 7:33 ` Qu Wenruo
2022-06-10 7:39 ` Nikolay Borisov
2022-06-10 7:55 ` Qu Wenruo [this message]
2022-06-10 8:39 ` Filipe Manana
2022-06-10 8:44 ` Qu Wenruo
2022-06-10 8:49 ` Qu Wenruo
2022-06-10 9:07 ` Qu Wenruo
2022-06-10 12:06 ` Nikolay Borisov
2022-06-11 13:30 ` Anand Jain
2022-06-13 6:37 ` Nikolay Borisov
2022-06-13 6:35 ` Nikolay Borisov
2022-06-21 13:24 ` 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=1440ccc5-3df9-a613-b923-ecc4a3e6e2cf@gmx.com \
--to=quwenruo.btrfs@gmx.com \
--cc=dsterba@suse.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=nborisov@suse.com \
--cc=willy@infradead.org \
/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