linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Qu Wenruo <quwenruo@cn.fujitsu.com>
To: <dsterba@suse.cz>,
	Satoru Takeuchi <takeuchi_satoru@jp.fujitsu.com>,
	btrfs <linux-btrfs@vger.kernel.org>
Subject: Re: Btrfsck memory usage reduce idea
Date: Mon, 21 Mar 2016 10:15:55 +0800	[thread overview]
Message-ID: <56EF595B.7080509@cn.fujitsu.com> (raw)
In-Reply-To: <20160318181854.GF21722@twin.jikos.cz>



David Sterba wrote on 2016/03/18 19:18 +0100:
> On Tue, Mar 08, 2016 at 04:46:41PM +0800, Qu Wenruo wrote:
>>> 1. Could you tell me what you'd like to do?
>>>
>>>      a) Provide completely the same function with current
>>>         implementation by other, more efficient way.
>>
>> Same function, but less efficient.
>> It may takes longer time, more IO, but less memory.
>
> IOW, there will be two options for the use to choose from, right? That's
> what I'd expect. Be able to check the filesystem on a machine with less
> memory at the cost of IO, but also do the faster check on a different
> machine.
>

I was planning to use the new extent tree check to replace current one, 
as a rework.
Am I always reworking things? :)

The point that I didn't want to keep the current behavior is, the old 
one is just OK or OOM, no one would know if it will OOM until it happens.

But the new one would be much flex than current behavior.
As it fully uses the IO cache provided by kernel.

For machine with lot of memory, the whole IO will be cached except the 
first read.
Making the difference between new and old implementation quite small.

For machine with less memory or the fs is just too large, at least 
btrfsck won't cause OOM.


Another point is, the new implementation would be smaller and simpler.
For non performance critical case, the simpler code the better.

But that's not settled yet, maybe just like 
multi-snapshot+quota+rebalance case, the old implementation may be times 
faster on some special case.
So my teammate and I will keeps the old one until enough feedback.

Thanks,
Qu

>> And some error message will be output at different time.
>> E.g, error message for missing backref may be output at fs tree checking
>> time, instead of extent tree checking time.
>
> This is acceptable.
>
>



  reply	other threads:[~2016-03-21  2:16 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-07  5:42 Btrfsck memory usage reduce idea Qu Wenruo
2016-03-08  8:28 ` Satoru Takeuchi
2016-03-08  8:46   ` Qu Wenruo
2016-03-09  0:13     ` Satoru Takeuchi
2016-03-18 18:18     ` David Sterba
2016-03-21  2:15       ` Qu Wenruo [this message]
2016-03-21  9:43         ` Duncan
2016-03-22 14:49         ` David Sterba
2016-03-23  1:12           ` Qu Wenruo

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=56EF595B.7080509@cn.fujitsu.com \
    --to=quwenruo@cn.fujitsu.com \
    --cc=dsterba@suse.cz \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=takeuchi_satoru@jp.fujitsu.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;
as well as URLs for NNTP newsgroup(s).