linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: tm@tao.ma
To: "Andreas Dilger" <adilger.kernel@dilger.ca>
Cc: "Lukas Czerner" <lczerner@redhat.com>, "Tao Ma" <tm@tao.ma>,
	linux-ext4@vger.kernel.org, "Theodore Ts'o" <tytso@mit.edu>
Subject: Re: speed up group trim
Date: Mon, 24 Jan 2011 18:53:21 -0700	[thread overview]
Message-ID: <feb4ec15d3913393777662cebb65986b.squirrel@mail.tao.ma> (raw)
In-Reply-To: <C2FEF4DB-531E-4541-8332-A8845396EAC7@dilger.ca>

> On 2011-01-24, at 06:39, Lukas Czerner wrote:
>>> I don't know either. But that is the user's choice of 'minlen' and we
>>> can't
>>> provent them from doing like that.
>>>
>>> Here is a scenario:
>>> 1. run with minlen=1mb, he got that only 1G get trimmed. but the free
>>> space is
>>> more than 3gb actually because of the fragmentation.
>>> 2. So he decide to run with minlen=512kb or even smaller len to see
>>> whether
>>> more space can be trimmed.
>>>
>>> Is it possible? I guess the answer is yes.
>>
>> Hi,
>>
>> I think that this is actually quite useful *feature*. I can imagine that
>> people might want to run FITRIM with bigger minlen (megabytes or tens of
>> megabytes) weekly, as it is much faster, especially on fragmented
>> filesystem. Then, they might want to run FITRIM with smaller minlen
>> (4kB)
>> monthly to reclaim even the smaller (or all of them) extents.
>>
>> But I like Andreas' idea, it should improve FITRIM performance
>> significantly (since we are doing mkfs trim). Minlen can be stored in
>> high bits of bb_state as number of blocks.
>
> I'd rather just add a proper field in ext4_group_info to store the length.
>  I don't think this will change the actual memory usage, since this is
> already a fairly large and odd-sized structure.
yeah, a proper field should be fine.
First, we don't store it in the disk, so we don't care for the layout
compatibility problem.
Second, we don't have much group in the volume. So a new field wouldn't
cost much for us like inodes.

Regards,
Tao


      reply	other threads:[~2011-01-25  1:53 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-21  2:32 [PATCH] ext4: speed up group trim with the right free block count Tao Ma
2011-01-21 10:49 ` Lukas Czerner
2011-01-21 17:53   ` speed up group trim Andreas Dilger
2011-01-22  8:32     ` Tao Ma
2011-01-24  1:33       ` Andreas Dilger
2011-01-24  2:07         ` Tao Ma
2011-01-24 13:39           ` Lukas Czerner
2011-01-24 18:51             ` Andreas Dilger
2011-01-25  1:53               ` tm [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=feb4ec15d3913393777662cebb65986b.squirrel@mail.tao.ma \
    --to=tm@tao.ma \
    --cc=adilger.kernel@dilger.ca \
    --cc=lczerner@redhat.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=tytso@mit.edu \
    /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).