2013-08-04 22:09:40 +08:00
|
|
|
What: /sys/fs/f2fs/<disk>/gc_max_sleep_time
|
|
|
|
Date: July 2013
|
|
|
|
Contact: "Namjae Jeon" <namjae.jeon@samsung.com>
|
|
|
|
Description:
|
|
|
|
Controls the maximun sleep time for gc_thread. Time
|
|
|
|
is in milliseconds.
|
|
|
|
|
|
|
|
What: /sys/fs/f2fs/<disk>/gc_min_sleep_time
|
|
|
|
Date: July 2013
|
|
|
|
Contact: "Namjae Jeon" <namjae.jeon@samsung.com>
|
|
|
|
Description:
|
|
|
|
Controls the minimum sleep time for gc_thread. Time
|
|
|
|
is in milliseconds.
|
|
|
|
|
|
|
|
What: /sys/fs/f2fs/<disk>/gc_no_gc_sleep_time
|
|
|
|
Date: July 2013
|
|
|
|
Contact: "Namjae Jeon" <namjae.jeon@samsung.com>
|
|
|
|
Description:
|
|
|
|
Controls the default sleep time for gc_thread. Time
|
|
|
|
is in milliseconds.
|
2013-08-04 22:10:15 +08:00
|
|
|
|
|
|
|
What: /sys/fs/f2fs/<disk>/gc_idle
|
|
|
|
Date: July 2013
|
|
|
|
Contact: "Namjae Jeon" <namjae.jeon@samsung.com>
|
|
|
|
Description:
|
|
|
|
Controls the victim selection policy for garbage collection.
|
2014-01-09 20:00:06 +08:00
|
|
|
|
|
|
|
What: /sys/fs/f2fs/<disk>/reclaim_segments
|
|
|
|
Date: October 2013
|
|
|
|
Contact: "Jaegeuk Kim" <jaegeuk.kim@samsung.com>
|
|
|
|
Description:
|
|
|
|
Controls the issue rate of segment discard commands.
|
|
|
|
|
|
|
|
What: /sys/fs/f2fs/<disk>/ipu_policy
|
|
|
|
Date: November 2013
|
|
|
|
Contact: "Jaegeuk Kim" <jaegeuk.kim@samsung.com>
|
|
|
|
Description:
|
|
|
|
Controls the in-place-update policy.
|
|
|
|
|
|
|
|
What: /sys/fs/f2fs/<disk>/min_ipu_util
|
|
|
|
Date: November 2013
|
|
|
|
Contact: "Jaegeuk Kim" <jaegeuk.kim@samsung.com>
|
|
|
|
Description:
|
|
|
|
Controls the FS utilization condition for the in-place-update
|
|
|
|
policies.
|
|
|
|
|
2014-09-11 07:53:02 +08:00
|
|
|
What: /sys/fs/f2fs/<disk>/min_fsync_blocks
|
|
|
|
Date: September 2014
|
|
|
|
Contact: "Jaegeuk Kim" <jaegeuk@kernel.org>
|
|
|
|
Description:
|
|
|
|
Controls the dirty page count condition for the in-place-update
|
|
|
|
policies.
|
|
|
|
|
2018-08-10 08:53:34 +08:00
|
|
|
What: /sys/fs/f2fs/<disk>/min_seq_blocks
|
|
|
|
Date: August 2018
|
|
|
|
Contact: "Jaegeuk Kim" <jaegeuk@kernel.org>
|
|
|
|
Description:
|
|
|
|
Controls the dirty page count condition for batched sequential
|
|
|
|
writes in ->writepages.
|
|
|
|
|
|
|
|
|
2017-10-28 16:52:29 +08:00
|
|
|
What: /sys/fs/f2fs/<disk>/min_hot_blocks
|
|
|
|
Date: March 2017
|
|
|
|
Contact: "Jaegeuk Kim" <jaegeuk@kernel.org>
|
|
|
|
Description:
|
|
|
|
Controls the dirty page count condition for redefining hot data.
|
|
|
|
|
2017-10-28 16:52:33 +08:00
|
|
|
What: /sys/fs/f2fs/<disk>/min_ssr_sections
|
|
|
|
Date: October 2017
|
|
|
|
Contact: "Chao Yu" <yuchao0@huawei.com>
|
|
|
|
Description:
|
|
|
|
Controls the fee section threshold to trigger SSR allocation.
|
|
|
|
|
2014-01-09 20:00:06 +08:00
|
|
|
What: /sys/fs/f2fs/<disk>/max_small_discards
|
|
|
|
Date: November 2013
|
|
|
|
Contact: "Jaegeuk Kim" <jaegeuk.kim@samsung.com>
|
|
|
|
Description:
|
|
|
|
Controls the issue rate of small discard commands.
|
|
|
|
|
f2fs: introduce discard_granularity sysfs entry
Commit d618ebaf0aa8 ("f2fs: enable small discard by default") enables
f2fs to issue 4K size discard in real-time discard mode. However, issuing
smaller discard may cost more lifetime but releasing less free space in
flash device. Since f2fs has ability of separating hot/cold data and
garbage collection, we can expect that small-sized invalid region would
expand soon with OPU, deletion or garbage collection on valid datas, so
it's better to delay or skip issuing smaller size discards, it could help
to reduce overmuch consumption of IO bandwidth and lifetime of flash
storage.
This patch makes f2fs selectng 64K size as its default minimal
granularity, and issue discard with the size which is not smaller than
minimal granularity. Also it exposes discard granularity as sysfs entry
for configuration in different scenario.
Jaegeuk Kim:
We must issue all the accumulated discard commands when fstrim is called.
So, I've added pend_list_tag[] to indicate whether we should issue the
commands or not. If tag sets P_ACTIVE or P_TRIM, we have to issue them.
P_TRIM is set once at a time, given fstrim trigger.
In addition, issue_discard_thread is calling too much due to the number of
discard commands remaining in the pending list. I added a timer to control
it likewise gc_thread.
Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2017-08-07 23:09:56 +08:00
|
|
|
What: /sys/fs/f2fs/<disk>/discard_granularity
|
|
|
|
Date: July 2017
|
|
|
|
Contact: "Chao Yu" <yuchao0@huawei.com>
|
|
|
|
Description:
|
|
|
|
Controls discard granularity of inner discard thread, inner thread
|
|
|
|
will not issue discards with size that is smaller than granularity.
|
|
|
|
The unit size is one block, now only support configuring in range
|
|
|
|
of [1, 512].
|
|
|
|
|
2019-01-15 02:42:11 +08:00
|
|
|
What: /sys/fs/f2fs/<disk>/umount_discard_timeout
|
|
|
|
Date: January 2019
|
|
|
|
Contact: "Jaegeuk Kim" <jaegeuk@kernel.org>
|
|
|
|
Description:
|
|
|
|
Set timeout to issue discard commands during umount.
|
|
|
|
Default: 5 secs
|
|
|
|
|
2014-01-09 20:00:06 +08:00
|
|
|
What: /sys/fs/f2fs/<disk>/max_victim_search
|
|
|
|
Date: January 2014
|
|
|
|
Contact: "Jaegeuk Kim" <jaegeuk.kim@samsung.com>
|
|
|
|
Description:
|
|
|
|
Controls the number of trials to find a victim segment.
|
2014-03-19 12:31:37 +08:00
|
|
|
|
2018-10-25 16:19:28 +08:00
|
|
|
What: /sys/fs/f2fs/<disk>/migration_granularity
|
|
|
|
Date: October 2018
|
|
|
|
Contact: "Chao Yu" <yuchao0@huawei.com>
|
|
|
|
Description:
|
|
|
|
Controls migration granularity of garbage collection on large
|
|
|
|
section, it can let GC move partial segment{s} of one section
|
|
|
|
in one GC cycle, so that dispersing heavy overhead GC to
|
|
|
|
multiple lightweight one.
|
|
|
|
|
2014-03-19 12:40:09 +08:00
|
|
|
What: /sys/fs/f2fs/<disk>/dir_level
|
|
|
|
Date: March 2014
|
|
|
|
Contact: "Jaegeuk Kim" <jaegeuk.kim@samsung.com>
|
|
|
|
Description:
|
|
|
|
Controls the directory level for large directory.
|
|
|
|
|
2014-03-19 12:31:37 +08:00
|
|
|
What: /sys/fs/f2fs/<disk>/ram_thresh
|
|
|
|
Date: March 2014
|
|
|
|
Contact: "Jaegeuk Kim" <jaegeuk.kim@samsung.com>
|
|
|
|
Description:
|
|
|
|
Controls the memory footprint used by f2fs.
|
2015-01-27 09:41:23 +08:00
|
|
|
|
2017-06-12 09:44:26 +08:00
|
|
|
What: /sys/fs/f2fs/<disk>/batched_trim_sections
|
2015-01-27 09:41:23 +08:00
|
|
|
Date: February 2015
|
|
|
|
Contact: "Jaegeuk Kim" <jaegeuk@kernel.org>
|
|
|
|
Description:
|
|
|
|
Controls the trimming rate in batch mode.
|
2018-04-09 10:25:23 +08:00
|
|
|
<deprecated>
|
2015-10-06 05:49:57 +08:00
|
|
|
|
|
|
|
What: /sys/fs/f2fs/<disk>/cp_interval
|
|
|
|
Date: October 2015
|
|
|
|
Contact: "Jaegeuk Kim" <jaegeuk@kernel.org>
|
|
|
|
Description:
|
|
|
|
Controls the checkpoint timing.
|
2015-10-12 17:08:48 +08:00
|
|
|
|
2016-01-09 08:57:48 +08:00
|
|
|
What: /sys/fs/f2fs/<disk>/idle_interval
|
|
|
|
Date: January 2016
|
|
|
|
Contact: "Jaegeuk Kim" <jaegeuk@kernel.org>
|
|
|
|
Description:
|
2018-09-19 16:48:47 +08:00
|
|
|
Controls the idle timing for all paths other than
|
|
|
|
discard and gc path.
|
|
|
|
|
|
|
|
What: /sys/fs/f2fs/<disk>/discard_idle_interval
|
|
|
|
Date: September 2018
|
|
|
|
Contact: "Chao Yu" <yuchao0@huawei.com>
|
|
|
|
Contact: "Sahitya Tummala" <stummala@codeaurora.org>
|
|
|
|
Description:
|
|
|
|
Controls the idle timing for discard path.
|
|
|
|
|
|
|
|
What: /sys/fs/f2fs/<disk>/gc_idle_interval
|
|
|
|
Date: September 2018
|
|
|
|
Contact: "Chao Yu" <yuchao0@huawei.com>
|
|
|
|
Contact: "Sahitya Tummala" <stummala@codeaurora.org>
|
|
|
|
Description:
|
|
|
|
Controls the idle timing for gc path.
|
2016-01-09 08:57:48 +08:00
|
|
|
|
2017-10-28 16:52:29 +08:00
|
|
|
What: /sys/fs/f2fs/<disk>/iostat_enable
|
|
|
|
Date: August 2017
|
|
|
|
Contact: "Chao Yu" <yuchao0@huawei.com>
|
|
|
|
Description:
|
|
|
|
Controls to enable/disable IO stat.
|
|
|
|
|
2015-10-12 17:08:48 +08:00
|
|
|
What: /sys/fs/f2fs/<disk>/ra_nid_pages
|
|
|
|
Date: October 2015
|
|
|
|
Contact: "Chao Yu" <chao2.yu@samsung.com>
|
|
|
|
Description:
|
|
|
|
Controls the count of nid pages to be readaheaded.
|
2016-01-18 18:32:58 +08:00
|
|
|
|
|
|
|
What: /sys/fs/f2fs/<disk>/dirty_nats_ratio
|
|
|
|
Date: January 2016
|
|
|
|
Contact: "Chao Yu" <chao2.yu@samsung.com>
|
|
|
|
Description:
|
|
|
|
Controls dirty nat entries ratio threshold, if current
|
|
|
|
ratio exceeds configured threshold, checkpoint will
|
|
|
|
be triggered for flushing dirty nat entries.
|
2016-01-27 09:57:30 +08:00
|
|
|
|
|
|
|
What: /sys/fs/f2fs/<disk>/lifetime_write_kbytes
|
|
|
|
Date: January 2016
|
|
|
|
Contact: "Shuoran Liu" <liushuoran@huawei.com>
|
|
|
|
Description:
|
|
|
|
Shows total written kbytes issued to disk.
|
2017-06-12 22:30:44 +08:00
|
|
|
|
2018-04-24 01:26:30 +08:00
|
|
|
What: /sys/fs/f2fs/<disk>/features
|
2017-10-28 16:52:29 +08:00
|
|
|
Date: July 2017
|
|
|
|
Contact: "Jaegeuk Kim" <jaegeuk@kernel.org>
|
|
|
|
Description:
|
|
|
|
Shows all enabled features in current device.
|
|
|
|
|
2017-06-12 22:30:44 +08:00
|
|
|
What: /sys/fs/f2fs/<disk>/inject_rate
|
|
|
|
Date: May 2016
|
|
|
|
Contact: "Sheng Yong" <shengyong1@huawei.com>
|
|
|
|
Description:
|
|
|
|
Controls the injection rate.
|
|
|
|
|
|
|
|
What: /sys/fs/f2fs/<disk>/inject_type
|
|
|
|
Date: May 2016
|
|
|
|
Contact: "Sheng Yong" <shengyong1@huawei.com>
|
|
|
|
Description:
|
|
|
|
Controls the injection type.
|
2017-06-26 16:24:41 +08:00
|
|
|
|
|
|
|
What: /sys/fs/f2fs/<disk>/reserved_blocks
|
|
|
|
Date: June 2017
|
|
|
|
Contact: "Chao Yu" <yuchao0@huawei.com>
|
|
|
|
Description:
|
2017-10-27 20:45:05 +08:00
|
|
|
Controls target reserved blocks in system, the threshold
|
|
|
|
is soft, it could exceed current available user space.
|
|
|
|
|
|
|
|
What: /sys/fs/f2fs/<disk>/current_reserved_blocks
|
|
|
|
Date: October 2017
|
|
|
|
Contact: "Yunlong Song" <yunlong.song@huawei.com>
|
|
|
|
Contact: "Chao Yu" <yuchao0@huawei.com>
|
|
|
|
Description:
|
|
|
|
Shows current reserved blocks in system, it may be temporarily
|
|
|
|
smaller than target_reserved_blocks, but will gradually
|
|
|
|
increase to target_reserved_blocks when more free blocks are
|
|
|
|
freed by user later.
|
2017-08-07 13:09:00 +08:00
|
|
|
|
|
|
|
What: /sys/fs/f2fs/<disk>/gc_urgent
|
|
|
|
Date: August 2017
|
|
|
|
Contact: "Jaegeuk Kim" <jaegeuk@kernel.org>
|
|
|
|
Description:
|
|
|
|
Do background GC agressively
|
|
|
|
|
|
|
|
What: /sys/fs/f2fs/<disk>/gc_urgent_sleep_time
|
|
|
|
Date: August 2017
|
|
|
|
Contact: "Jaegeuk Kim" <jaegeuk@kernel.org>
|
|
|
|
Description:
|
|
|
|
Controls sleep time of GC urgent mode
|
2017-11-22 18:23:38 +08:00
|
|
|
|
|
|
|
What: /sys/fs/f2fs/<disk>/readdir_ra
|
|
|
|
Date: November 2017
|
|
|
|
Contact: "Sheng Yong" <shengyong1@huawei.com>
|
|
|
|
Description:
|
|
|
|
Controls readahead inode block in readdir.
|
2018-02-26 22:04:13 +08:00
|
|
|
|
|
|
|
What: /sys/fs/f2fs/<disk>/extension_list
|
|
|
|
Date: Feburary 2018
|
|
|
|
Contact: "Chao Yu" <yuchao0@huawei.com>
|
|
|
|
Description:
|
|
|
|
Used to control configure extension list:
|
|
|
|
- Query: cat /sys/fs/f2fs/<disk>/extension_list
|
2018-02-28 17:07:27 +08:00
|
|
|
- Add: echo '[h/c]extension' > /sys/fs/f2fs/<disk>/extension_list
|
|
|
|
- Del: echo '[h/c]!extension' > /sys/fs/f2fs/<disk>/extension_list
|
|
|
|
- [h] means add/del hot file extension
|
|
|
|
- [c] means add/del cold file extension
|
2019-05-30 08:49:06 +08:00
|
|
|
|
|
|
|
What: /sys/fs/f2fs/<disk>/unusable
|
|
|
|
Date April 2019
|
|
|
|
Contact: "Daniel Rosenberg" <drosen@google.com>
|
|
|
|
Description:
|
|
|
|
If checkpoint=disable, it displays the number of blocks that are unusable.
|
|
|
|
If checkpoint=enable it displays the enumber of blocks that would be unusable
|
|
|
|
if checkpoint=disable were to be set.
|
2019-07-24 07:05:28 +08:00
|
|
|
|
|
|
|
What: /sys/fs/f2fs/<disk>/encoding
|
|
|
|
Date July 2019
|
|
|
|
Contact: "Daniel Rosenberg" <drosen@google.com>
|
|
|
|
Description:
|
|
|
|
Displays name and version of the encoding set for the filesystem.
|
|
|
|
If no encoding is set, displays (none)
|