lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAH9JG2WYsybK6aTo3+S58JM568S_YG7YqhP2jfrQ4pQ12GA5UQ@mail.gmail.com>
Date:	Fri, 2 Dec 2011 09:01:10 +0900
From:	Kyungmin Park <kmpark@...radead.org>
To:	Eric Sandeen <sandeen@...hat.com>,
	Lukas Czerner <lczerner@...hat.com>
Cc:	tytso@....edu, tm@....ma, linux-ext4@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] Set the initial TRIM information as TRIMMED

On 12/2/11, Eric Sandeen <sandeen@...hat.com> wrote:
> On 12/1/11 1:00 AM, Kyungmin Park wrote:
>> From: Kyungmin Park <kyungmin.park@...sung.com>
>>
>> Now trim information doesn't stored at disk so every boot time. it's
>> cleared.
>> and do the trim all disk groups.
>> But assume that it's already trimmed at previous time so don't need to
>> trim it again. So set the intial state as trimmed.
>>
>> Signed-off-by: Kyungmin Park <kyungmin.park@...sung.com>
>> ---
>> diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c
>> index e2d8be8..97ef342 100644
>> --- a/fs/ext4/mballoc.c
>> +++ b/fs/ext4/mballoc.c
>> @@ -1098,6 +1098,12 @@ int ext4_mb_init_group(struct super_block *sb,
>> ext4_group_t group)
>>  		goto err;
>>  	}
>>  	mark_page_accessed(page);
>> +
>> +	/*
>> +	 * TRIM information is not stored at disk so set the initial
>> +	 * state as trimmed. Since previous time it's already trimmed all
>> +	 */
>> +	EXT4_MB_GRP_SET_TRIMMED(this_grp);
>
Hi,

> Hm, so if there were freed but un-trimmed blocks at this point, we will
> never trim them until we free _another_ block in the group, right?  That
> might be a reasonable tradeoff, but it is somewhat surprising behavior.
>
> i.e. say we do:
>
> mount /mnt
> rm -rf /mnt/very_big_file
> umount /mnt
>
> mount /mnt
> fitrim /mnt
another word, you can run fitrim after rm -rf
yes, it's trade-off.

In my case, phone scenario, no umount system and data partition. it's
burden to trim at boot time. it has still slower boot time.
some daemon or program run fitrm at filesystem. it consumes time and
hurt other boot processes.
>
> then we won't trim anything at all, right, despite there being many
> new free blocks?  Which would be rather unexpected.
>
> If we don't store the trimmed state on disk, I think we should
> probably stick with the slower first-time trim, and the more obvious
> behavior (all free blocks are always trimmed whenever a trim
> command is issued).

Umm how do you think, introduce the trim force command for this?

Thank you,
Kyungmin Park
>
> -Eric
>
>>  err:
>>  	ext4_mb_put_buddy_page_lock(&e4b);
>>  	return ret;
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
>> the body of a message to majordomo@...r.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ