1 |
Rich Freeman <rich0@g.o> schrieb: |
2 |
|
3 |
> On Sat, Jun 21, 2014 at 10:27 AM, Peter Humphrey <peter@××××××××××××.uk> |
4 |
> wrote: |
5 |
>> |
6 |
>> I found that fstrim can't work on f2fs file systems. I don't know whether |
7 |
>> discard works yet. |
8 |
> |
9 |
> Fstrim is to be preferred over discard in general. However, I suspect |
10 |
> neither is needed for something like f2fs. Being log-based it doesn't |
11 |
> really overwrite data in place. I suspect that it waits until an |
12 |
> entire region of the disk is unused and then it TRIMs the whole |
13 |
> region. |
14 |
|
15 |
F2fs prefers to fill an entire erase block before touching the next. It also |
16 |
tries to coalese small writes into 16k blocks before submitting them to |
17 |
disk. And according to the docs it supports trim/discard internally. |
18 |
|
19 |
> However, I haven't actually used it and only know the little I've read |
20 |
> about it. That is the principle of a log-based filesystem. |
21 |
|
22 |
There's an article at LWN [1] and in the comments you can find a few |
23 |
important information about the technical details. |
24 |
|
25 |
Posted Oct 11, 2012 21:11 UTC (Thu) by arnd: |
26 |
| * Wear leveling usually works by having a pool of available erase blocks |
27 |
| in the drive. When you write to a new location, the drive takes on block |
28 |
| out of that pool and writes the data there. When the drive thinks you |
29 |
| are done writing to one block, it cleans up any partially written data |
30 |
| and puts a different block back into the pool. |
31 |
| * f2fs tries to group writes into larger operations of at least page size |
32 |
| (16KB or more) to be efficient, current FTLs are horribly bad at 4KB |
33 |
| page size writes. It also tries to fill erase blocks (multiples of 2MB) |
34 |
| in the order that the devices can handle. |
35 |
| * logfs actually works on block devices but hasn't been actively worked on |
36 |
| over the last few years. f2fs also promises better performance by using |
37 |
| only 6 erase blocks concurrently rather than 12 in the case of logfs. A |
38 |
| lot of the underlying principles are the same though. |
39 |
| * The "industry" is moving away from raw flash interfaces towards eMMC and |
40 |
| related technologies (UFS, SD, ...). We are not going back to raw flash |
41 |
| any time soon, which is unfortunate for a number of reasons but also has |
42 |
| a few significant advantages. Having the FTL take care of bad block |
43 |
| management and wear leveling is one such advantage, at least if they get |
44 |
| it right. |
45 |
|
46 |
According to wikipedia [2], some more interesting features are on the way, |
47 |
like compression and data deduplication to lower the impact of writes. |
48 |
|
49 |
[1]: http://lwn.net/Articles/518988/ |
50 |
[2]: http://en.wikipedia.org/wiki/F2FS |
51 |
|
52 |
-- |
53 |
Replies to list only preferred. |