2013-08-04 14:09:40 +00:00
|
|
|
What: /sys/fs/f2fs/<disk>/gc_max_sleep_time
|
|
|
|
Date: July 2013
|
|
|
|
Contact: "Namjae Jeon" <namjae.jeon@samsung.com>
|
2020-01-22 18:49:20 +00:00
|
|
|
Description: Controls the maximum sleep time for gc_thread. Time
|
|
|
|
is in milliseconds.
|
2013-08-04 14:09:40 +00:00
|
|
|
|
|
|
|
What: /sys/fs/f2fs/<disk>/gc_min_sleep_time
|
|
|
|
Date: July 2013
|
|
|
|
Contact: "Namjae Jeon" <namjae.jeon@samsung.com>
|
2020-01-22 18:49:20 +00:00
|
|
|
Description: Controls the minimum sleep time for gc_thread. Time
|
|
|
|
is in milliseconds.
|
2013-08-04 14:09:40 +00:00
|
|
|
|
|
|
|
What: /sys/fs/f2fs/<disk>/gc_no_gc_sleep_time
|
|
|
|
Date: July 2013
|
|
|
|
Contact: "Namjae Jeon" <namjae.jeon@samsung.com>
|
2020-01-22 18:49:20 +00:00
|
|
|
Description: Controls the default sleep time for gc_thread. Time
|
|
|
|
is in milliseconds.
|
2013-08-04 14:10:15 +00:00
|
|
|
|
|
|
|
What: /sys/fs/f2fs/<disk>/gc_idle
|
|
|
|
Date: July 2013
|
|
|
|
Contact: "Namjae Jeon" <namjae.jeon@samsung.com>
|
2020-01-22 18:49:20 +00:00
|
|
|
Description: Controls the victim selection policy for garbage collection.
|
2020-10-30 07:40:50 +00:00
|
|
|
Setting gc_idle = 0(default) will disable this option. Setting:
|
|
|
|
|
|
|
|
=========== ===============================================
|
|
|
|
gc_idle = 1 will select the Cost Benefit approach & setting
|
|
|
|
gc_idle = 2 will select the greedy approach & setting
|
|
|
|
gc_idle = 3 will select the age-threshold based approach.
|
|
|
|
=========== ===============================================
|
2014-01-09 12:00:06 +00:00
|
|
|
|
|
|
|
What: /sys/fs/f2fs/<disk>/reclaim_segments
|
|
|
|
Date: October 2013
|
|
|
|
Contact: "Jaegeuk Kim" <jaegeuk.kim@samsung.com>
|
2020-01-22 18:49:20 +00:00
|
|
|
Description: This parameter controls the number of prefree segments to be
|
|
|
|
reclaimed. If the number of prefree segments is larger than
|
|
|
|
the number of segments in the proportion to the percentage
|
|
|
|
over total volume size, f2fs tries to conduct checkpoint to
|
|
|
|
reclaim the prefree segments to free segments.
|
|
|
|
By default, 5% over total # of segments.
|
|
|
|
|
|
|
|
What: /sys/fs/f2fs/<disk>/main_blkaddr
|
2019-11-22 19:53:10 +00:00
|
|
|
Date: November 2019
|
|
|
|
Contact: "Ramon Pantin" <pantin@google.com>
|
2021-08-14 17:58:40 +00:00
|
|
|
Description: Shows first block address of MAIN area.
|
2019-11-22 19:53:10 +00:00
|
|
|
|
2014-01-09 12:00:06 +00:00
|
|
|
What: /sys/fs/f2fs/<disk>/ipu_policy
|
|
|
|
Date: November 2013
|
|
|
|
Contact: "Jaegeuk Kim" <jaegeuk.kim@samsung.com>
|
2020-01-22 18:49:20 +00:00
|
|
|
Description: Controls the in-place-update policy.
|
|
|
|
updates in f2fs. User can set:
|
2020-10-30 07:40:50 +00:00
|
|
|
|
|
|
|
==== =================
|
|
|
|
0x01 F2FS_IPU_FORCE
|
|
|
|
0x02 F2FS_IPU_SSR
|
|
|
|
0x04 F2FS_IPU_UTIL
|
|
|
|
0x08 F2FS_IPU_SSR_UTIL
|
|
|
|
0x10 F2FS_IPU_FSYNC
|
|
|
|
0x20 F2FS_IPU_ASYNC,
|
|
|
|
0x40 F2FS_IPU_NOCACHE
|
|
|
|
==== =================
|
|
|
|
|
2020-01-22 18:49:20 +00:00
|
|
|
Refer segment.h for details.
|
2014-01-09 12:00:06 +00:00
|
|
|
|
|
|
|
What: /sys/fs/f2fs/<disk>/min_ipu_util
|
|
|
|
Date: November 2013
|
|
|
|
Contact: "Jaegeuk Kim" <jaegeuk.kim@samsung.com>
|
2020-01-22 18:49:20 +00:00
|
|
|
Description: Controls the FS utilization condition for the in-place-update
|
|
|
|
policies. It is used by F2FS_IPU_UTIL and F2FS_IPU_SSR_UTIL policies.
|
2014-01-09 12:00:06 +00:00
|
|
|
|
2014-09-10 23:53:02 +00:00
|
|
|
What: /sys/fs/f2fs/<disk>/min_fsync_blocks
|
|
|
|
Date: September 2014
|
|
|
|
Contact: "Jaegeuk Kim" <jaegeuk@kernel.org>
|
2020-01-22 18:49:20 +00:00
|
|
|
Description: Controls the dirty page count condition for the in-place-update
|
|
|
|
policies.
|
2014-09-10 23:53:02 +00:00
|
|
|
|
2018-08-10 00:53:34 +00:00
|
|
|
What: /sys/fs/f2fs/<disk>/min_seq_blocks
|
|
|
|
Date: August 2018
|
|
|
|
Contact: "Jaegeuk Kim" <jaegeuk@kernel.org>
|
2020-01-22 18:49:20 +00:00
|
|
|
Description: Controls the dirty page count condition for batched sequential
|
|
|
|
writes in writepages.
|
2018-08-10 00:53:34 +00:00
|
|
|
|
2017-10-28 08:52:29 +00:00
|
|
|
What: /sys/fs/f2fs/<disk>/min_hot_blocks
|
|
|
|
Date: March 2017
|
|
|
|
Contact: "Jaegeuk Kim" <jaegeuk@kernel.org>
|
2020-01-22 18:49:20 +00:00
|
|
|
Description: Controls the dirty page count condition for redefining hot data.
|
2017-10-28 08:52:29 +00:00
|
|
|
|
2017-10-28 08:52:33 +00:00
|
|
|
What: /sys/fs/f2fs/<disk>/min_ssr_sections
|
|
|
|
Date: October 2017
|
|
|
|
Contact: "Chao Yu" <yuchao0@huawei.com>
|
2020-01-22 18:49:20 +00:00
|
|
|
Description: Controls the free section threshold to trigger SSR allocation.
|
|
|
|
If this is large, SSR mode will be enabled early.
|
2017-10-28 08:52:33 +00:00
|
|
|
|
2014-01-09 12:00:06 +00:00
|
|
|
What: /sys/fs/f2fs/<disk>/max_small_discards
|
|
|
|
Date: November 2013
|
|
|
|
Contact: "Jaegeuk Kim" <jaegeuk.kim@samsung.com>
|
2020-01-22 18:49:20 +00:00
|
|
|
Description: Controls the issue rate of discard commands that consist of small
|
|
|
|
blocks less than 2MB. The candidates to be discarded are cached until
|
|
|
|
checkpoint is triggered, and issued during the checkpoint.
|
|
|
|
By default, it is disabled with 0.
|
2014-01-09 12:00:06 +00:00
|
|
|
|
2020-01-22 18:49:20 +00: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
|
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 15:09:56 +00:00
|
|
|
will not issue discards with size that is smaller than granularity.
|
2020-01-22 18:49:20 +00:00
|
|
|
The unit size is one block(4KB), now only support configuring
|
|
|
|
in range of [1, 512]. Default value is 4(=16KB).
|
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 15:09:56 +00:00
|
|
|
|
2020-01-22 18:49:20 +00: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
|
2019-01-14 18:42:11 +00:00
|
|
|
|
2021-11-29 18:36:12 +00:00
|
|
|
What: /sys/fs/f2fs/<disk>/pending_discard
|
|
|
|
Date: November 2021
|
|
|
|
Contact: "Jaegeuk Kim" <jaegeuk@kernel.org>
|
|
|
|
Description: Shows the number of pending discard commands in the queue.
|
|
|
|
|
2014-01-09 12:00:06 +00:00
|
|
|
What: /sys/fs/f2fs/<disk>/max_victim_search
|
|
|
|
Date: January 2014
|
|
|
|
Contact: "Jaegeuk Kim" <jaegeuk.kim@samsung.com>
|
2020-01-22 18:49:20 +00:00
|
|
|
Description: Controls the number of trials to find a victim segment
|
|
|
|
when conducting SSR and cleaning operations. The default value
|
|
|
|
is 4096 which covers 8GB block address range.
|
2014-03-19 04:31:37 +00:00
|
|
|
|
2018-10-25 08:19:28 +00:00
|
|
|
What: /sys/fs/f2fs/<disk>/migration_granularity
|
|
|
|
Date: October 2018
|
|
|
|
Contact: "Chao Yu" <yuchao0@huawei.com>
|
2020-01-22 18:49:20 +00:00
|
|
|
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.
|
2018-10-25 08:19:28 +00:00
|
|
|
|
2014-03-19 04:40:09 +00:00
|
|
|
What: /sys/fs/f2fs/<disk>/dir_level
|
|
|
|
Date: March 2014
|
|
|
|
Contact: "Jaegeuk Kim" <jaegeuk.kim@samsung.com>
|
2020-01-22 18:49:20 +00:00
|
|
|
Description: Controls the directory level for large directory. If a
|
|
|
|
directory has a number of files, it can reduce the file lookup
|
|
|
|
latency by increasing this dir_level value. Otherwise, it
|
|
|
|
needs to decrease this value to reduce the space overhead.
|
|
|
|
The default value is 0.
|
2014-03-19 04:40:09 +00:00
|
|
|
|
2014-03-19 04:31:37 +00:00
|
|
|
What: /sys/fs/f2fs/<disk>/ram_thresh
|
|
|
|
Date: March 2014
|
|
|
|
Contact: "Jaegeuk Kim" <jaegeuk.kim@samsung.com>
|
2020-01-22 18:49:20 +00:00
|
|
|
Description: Controls the memory footprint used by free nids and cached
|
|
|
|
nat entries. By default, 1 is set, which indicates
|
|
|
|
10 MB / 1 GB RAM.
|
2015-01-27 01:41:23 +00:00
|
|
|
|
2017-06-12 01:44:26 +00:00
|
|
|
What: /sys/fs/f2fs/<disk>/batched_trim_sections
|
2015-01-27 01:41:23 +00:00
|
|
|
Date: February 2015
|
|
|
|
Contact: "Jaegeuk Kim" <jaegeuk@kernel.org>
|
2020-01-22 18:49:20 +00:00
|
|
|
Description: Controls the trimming rate in batch mode.
|
|
|
|
<deprecated>
|
2015-10-05 21:49:57 +00:00
|
|
|
|
|
|
|
What: /sys/fs/f2fs/<disk>/cp_interval
|
|
|
|
Date: October 2015
|
|
|
|
Contact: "Jaegeuk Kim" <jaegeuk@kernel.org>
|
2020-01-22 18:49:20 +00:00
|
|
|
Description: Controls the checkpoint timing, set to 60 seconds by default.
|
2015-10-12 09:08:48 +00:00
|
|
|
|
2016-01-09 00:57:48 +00:00
|
|
|
What: /sys/fs/f2fs/<disk>/idle_interval
|
|
|
|
Date: January 2016
|
|
|
|
Contact: "Jaegeuk Kim" <jaegeuk@kernel.org>
|
2020-01-22 18:49:20 +00:00
|
|
|
Description: Controls the idle timing of system, if there is no FS operation
|
|
|
|
during given interval.
|
|
|
|
Set to 5 seconds by default.
|
2018-09-19 08:48:47 +00:00
|
|
|
|
|
|
|
What: /sys/fs/f2fs/<disk>/discard_idle_interval
|
|
|
|
Date: September 2018
|
|
|
|
Contact: "Chao Yu" <yuchao0@huawei.com>
|
|
|
|
Contact: "Sahitya Tummala" <stummala@codeaurora.org>
|
2020-01-22 18:49:20 +00:00
|
|
|
Description: Controls the idle timing of discard thread given
|
|
|
|
this time interval.
|
|
|
|
Default is 5 secs.
|
2018-09-19 08:48:47 +00:00
|
|
|
|
|
|
|
What: /sys/fs/f2fs/<disk>/gc_idle_interval
|
|
|
|
Date: September 2018
|
|
|
|
Contact: "Chao Yu" <yuchao0@huawei.com>
|
|
|
|
Contact: "Sahitya Tummala" <stummala@codeaurora.org>
|
2020-01-22 18:49:20 +00:00
|
|
|
Description: Controls the idle timing for gc path. Set to 5 seconds by default.
|
2016-01-09 00:57:48 +00:00
|
|
|
|
2017-10-28 08:52:29 +00:00
|
|
|
What: /sys/fs/f2fs/<disk>/iostat_enable
|
|
|
|
Date: August 2017
|
|
|
|
Contact: "Chao Yu" <yuchao0@huawei.com>
|
2020-01-22 18:49:20 +00:00
|
|
|
Description: Controls to enable/disable IO stat.
|
2017-10-28 08:52:29 +00:00
|
|
|
|
2015-10-12 09:08:48 +00:00
|
|
|
What: /sys/fs/f2fs/<disk>/ra_nid_pages
|
|
|
|
Date: October 2015
|
|
|
|
Contact: "Chao Yu" <chao2.yu@samsung.com>
|
2020-01-22 18:49:20 +00:00
|
|
|
Description: Controls the count of nid pages to be readaheaded.
|
|
|
|
When building free nids, F2FS reads NAT blocks ahead for
|
|
|
|
speed up. Default is 0.
|
2016-01-18 10:32:58 +00:00
|
|
|
|
|
|
|
What: /sys/fs/f2fs/<disk>/dirty_nats_ratio
|
|
|
|
Date: January 2016
|
|
|
|
Contact: "Chao Yu" <chao2.yu@samsung.com>
|
2020-01-22 18:49:20 +00:00
|
|
|
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 01:57:30 +00:00
|
|
|
|
|
|
|
What: /sys/fs/f2fs/<disk>/lifetime_write_kbytes
|
|
|
|
Date: January 2016
|
|
|
|
Contact: "Shuoran Liu" <liushuoran@huawei.com>
|
2020-01-22 18:49:20 +00:00
|
|
|
Description: Shows total written kbytes issued to disk.
|
2017-06-12 14:30:44 +00:00
|
|
|
|
2018-04-23 17:26:30 +00:00
|
|
|
What: /sys/fs/f2fs/<disk>/features
|
2017-10-28 08:52:29 +00:00
|
|
|
Date: July 2017
|
|
|
|
Contact: "Jaegeuk Kim" <jaegeuk@kernel.org>
|
2021-06-03 19:31:08 +00:00
|
|
|
Description: <deprecated: should use /sys/fs/f2fs/<disk>/feature_list/
|
|
|
|
Shows all enabled features in current device.
|
|
|
|
Supported features:
|
|
|
|
encryption, blkzoned, extra_attr, projquota, inode_checksum,
|
|
|
|
flexible_inline_xattr, quota_ino, inode_crtime, lost_found,
|
|
|
|
verity, sb_checksum, casefold, readonly, compression, pin_file.
|
|
|
|
|
|
|
|
What: /sys/fs/f2fs/<disk>/feature_list/
|
|
|
|
Date: June 2021
|
|
|
|
Contact: "Jaegeuk Kim" <jaegeuk@kernel.org>
|
|
|
|
Description: Expand /sys/fs/f2fs/<disk>/features to meet sysfs rule.
|
|
|
|
Supported on-disk features:
|
|
|
|
encryption, block_zoned (aka blkzoned), extra_attr,
|
|
|
|
project_quota (aka projquota), inode_checksum,
|
|
|
|
flexible_inline_xattr, quota_ino, inode_crtime, lost_found,
|
|
|
|
verity, sb_checksum, casefold, readonly, compression.
|
|
|
|
Note that, pin_file is moved into /sys/fs/f2fs/features/.
|
|
|
|
|
|
|
|
What: /sys/fs/f2fs/features/
|
|
|
|
Date: July 2017
|
|
|
|
Contact: "Jaegeuk Kim" <jaegeuk@kernel.org>
|
|
|
|
Description: Shows all enabled kernel features.
|
|
|
|
Supported features:
|
|
|
|
encryption, block_zoned, extra_attr, project_quota,
|
|
|
|
inode_checksum, flexible_inline_xattr, quota_ino,
|
|
|
|
inode_crtime, lost_found, verity, sb_checksum,
|
|
|
|
casefold, readonly, compression, test_dummy_encryption_v2,
|
|
|
|
atomic_write, pin_file, encrypted_casefold.
|
2017-10-28 08:52:29 +00:00
|
|
|
|
2017-06-12 14:30:44 +00:00
|
|
|
What: /sys/fs/f2fs/<disk>/inject_rate
|
|
|
|
Date: May 2016
|
|
|
|
Contact: "Sheng Yong" <shengyong1@huawei.com>
|
2020-01-22 18:49:20 +00:00
|
|
|
Description: Controls the injection rate of arbitrary faults.
|
2017-06-12 14:30:44 +00:00
|
|
|
|
|
|
|
What: /sys/fs/f2fs/<disk>/inject_type
|
|
|
|
Date: May 2016
|
|
|
|
Contact: "Sheng Yong" <shengyong1@huawei.com>
|
2020-01-22 18:49:20 +00:00
|
|
|
Description: Controls the injection type of arbitrary faults.
|
|
|
|
|
|
|
|
What: /sys/fs/f2fs/<disk>/dirty_segments
|
|
|
|
Date: October 2017
|
|
|
|
Contact: "Jaegeuk Kim" <jaegeuk@kernel.org>
|
|
|
|
Description: Shows the number of dirty segments.
|
2017-06-26 08:24:41 +00:00
|
|
|
|
|
|
|
What: /sys/fs/f2fs/<disk>/reserved_blocks
|
|
|
|
Date: June 2017
|
|
|
|
Contact: "Chao Yu" <yuchao0@huawei.com>
|
2020-01-22 18:49:20 +00:00
|
|
|
Description: Controls target reserved blocks in system, the threshold
|
|
|
|
is soft, it could exceed current available user space.
|
2017-10-27 12:45:05 +00:00
|
|
|
|
|
|
|
What: /sys/fs/f2fs/<disk>/current_reserved_blocks
|
|
|
|
Date: October 2017
|
|
|
|
Contact: "Yunlong Song" <yunlong.song@huawei.com>
|
|
|
|
Contact: "Chao Yu" <yuchao0@huawei.com>
|
2020-01-22 18:49:20 +00:00
|
|
|
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 05:09:00 +00:00
|
|
|
|
|
|
|
What: /sys/fs/f2fs/<disk>/gc_urgent
|
|
|
|
Date: August 2017
|
|
|
|
Contact: "Jaegeuk Kim" <jaegeuk@kernel.org>
|
docs: typo fixes in Documentation/ABI/
Fix the following typos in the Documentation/ABI/ directory:
- In file obsolete/sysfs-cpuidle, change "obselete" for "obsolete".
- In file removed/sysfs-kernel-uids, change "propotional" for "proportional".
- In directory stable/, fix the following words: "associtated" for "associated",
"hexidecimal" for "hexadecimal", "vlue" for "value", "csed" for "caused" and
"wrtie" for "write". This updates a total of five files.
- In directory testing/, fix the following words: "subystem" for "subsystem",
"isochrnous" for "isochronous", "Desctiptors" for "Descriptors", "picutre" for
"picture", "capture" for "capture", "occured" for "ocurred", "connnected" for
"connected","agressively" for "aggressively","manufacturee" for "manufacturer"
and "transaction" for "transaction", "malformatted" for "incorrectly formated"
,"internel" for "internal", "writtento" for "written to", "specificed" for
"specified", "beyound" for "beyond", "Symetric" for "Symmetric". This updates
a total of eleven files.
Signed-off-by: Carlos Bilbao <bilbao@vt.edu>
Reviewed-by: Randy Dunlap <rdunlap@infradead.org>
Reviewed-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Link: https://lore.kernel.org/r/5710038.lOV4Wx5bFT@iron-maiden
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2021-05-13 13:31:10 +00:00
|
|
|
Description: Do background GC aggressively when set. When gc_urgent = 1,
|
2020-01-22 18:49:20 +00:00
|
|
|
background thread starts to do GC by given gc_urgent_sleep_time
|
2020-07-02 04:14:14 +00:00
|
|
|
interval. When gc_urgent = 2, F2FS will lower the bar of
|
|
|
|
checking idle in order to process outstanding discard commands
|
|
|
|
and GC a little bit aggressively. It is set to 0 by default.
|
2017-08-07 05:09:00 +00:00
|
|
|
|
|
|
|
What: /sys/fs/f2fs/<disk>/gc_urgent_sleep_time
|
|
|
|
Date: August 2017
|
|
|
|
Contact: "Jaegeuk Kim" <jaegeuk@kernel.org>
|
2020-01-22 18:49:20 +00:00
|
|
|
Description: Controls sleep time of GC urgent mode. Set to 500ms by default.
|
2017-11-22 10:23:38 +00:00
|
|
|
|
|
|
|
What: /sys/fs/f2fs/<disk>/readdir_ra
|
|
|
|
Date: November 2017
|
|
|
|
Contact: "Sheng Yong" <shengyong1@huawei.com>
|
2020-01-22 18:49:20 +00:00
|
|
|
Description: Controls readahead inode block in readdir. Enabled by default.
|
|
|
|
|
|
|
|
What: /sys/fs/f2fs/<disk>/gc_pin_file_thresh
|
|
|
|
Date: January 2018
|
|
|
|
Contact: Jaegeuk Kim <jaegeuk@kernel.org>
|
|
|
|
Description: This indicates how many GC can be failed for the pinned
|
|
|
|
file. If it exceeds this, F2FS doesn't guarantee its pinning
|
|
|
|
state. 2048 trials is set by default.
|
2018-02-26 14:04:13 +00:00
|
|
|
|
|
|
|
What: /sys/fs/f2fs/<disk>/extension_list
|
|
|
|
Date: Feburary 2018
|
|
|
|
Contact: "Chao Yu" <yuchao0@huawei.com>
|
2020-01-22 18:49:20 +00:00
|
|
|
Description: Used to control configure extension list:
|
|
|
|
- Query: cat /sys/fs/f2fs/<disk>/extension_list
|
|
|
|
- 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 00:49:06 +00:00
|
|
|
|
|
|
|
What: /sys/fs/f2fs/<disk>/unusable
|
|
|
|
Date April 2019
|
|
|
|
Contact: "Daniel Rosenberg" <drosen@google.com>
|
2020-01-22 18:49:20 +00:00
|
|
|
Description: If checkpoint=disable, it displays the number of blocks that
|
|
|
|
are unusable.
|
2021-02-23 01:31:43 +00:00
|
|
|
If checkpoint=enable it displays the number of blocks that
|
2020-01-22 18:49:20 +00:00
|
|
|
would be unusable if checkpoint=disable were to be set.
|
2019-07-23 23:05:28 +00:00
|
|
|
|
|
|
|
What: /sys/fs/f2fs/<disk>/encoding
|
|
|
|
Date July 2019
|
|
|
|
Contact: "Daniel Rosenberg" <drosen@google.com>
|
2020-01-22 18:49:20 +00:00
|
|
|
Description: Displays name and version of the encoding set for the filesystem.
|
|
|
|
If no encoding is set, displays (none)
|
2020-01-22 18:51:16 +00:00
|
|
|
|
|
|
|
What: /sys/fs/f2fs/<disk>/free_segments
|
|
|
|
Date: September 2019
|
|
|
|
Contact: "Hridya Valsaraju" <hridya@google.com>
|
|
|
|
Description: Number of free segments in disk.
|
|
|
|
|
|
|
|
What: /sys/fs/f2fs/<disk>/cp_foreground_calls
|
|
|
|
Date: September 2019
|
|
|
|
Contact: "Hridya Valsaraju" <hridya@google.com>
|
|
|
|
Description: Number of checkpoint operations performed on demand. Available when
|
|
|
|
CONFIG_F2FS_STAT_FS=y.
|
|
|
|
|
|
|
|
What: /sys/fs/f2fs/<disk>/cp_background_calls
|
|
|
|
Date: September 2019
|
|
|
|
Contact: "Hridya Valsaraju" <hridya@google.com>
|
|
|
|
Description: Number of checkpoint operations performed in the background to
|
|
|
|
free segments. Available when CONFIG_F2FS_STAT_FS=y.
|
|
|
|
|
|
|
|
What: /sys/fs/f2fs/<disk>/gc_foreground_calls
|
|
|
|
Date: September 2019
|
|
|
|
Contact: "Hridya Valsaraju" <hridya@google.com>
|
|
|
|
Description: Number of garbage collection operations performed on demand.
|
|
|
|
Available when CONFIG_F2FS_STAT_FS=y.
|
|
|
|
|
|
|
|
What: /sys/fs/f2fs/<disk>/gc_background_calls
|
|
|
|
Date: September 2019
|
|
|
|
Contact: "Hridya Valsaraju" <hridya@google.com>
|
|
|
|
Description: Number of garbage collection operations triggered in background.
|
|
|
|
Available when CONFIG_F2FS_STAT_FS=y.
|
|
|
|
|
|
|
|
What: /sys/fs/f2fs/<disk>/moved_blocks_foreground
|
|
|
|
Date: September 2019
|
|
|
|
Contact: "Hridya Valsaraju" <hridya@google.com>
|
|
|
|
Description: Number of blocks moved by garbage collection in foreground.
|
|
|
|
Available when CONFIG_F2FS_STAT_FS=y.
|
|
|
|
|
|
|
|
What: /sys/fs/f2fs/<disk>/moved_blocks_background
|
|
|
|
Date: September 2019
|
|
|
|
Contact: "Hridya Valsaraju" <hridya@google.com>
|
|
|
|
Description: Number of blocks moved by garbage collection in background.
|
|
|
|
Available when CONFIG_F2FS_STAT_FS=y.
|
|
|
|
|
|
|
|
What: /sys/fs/f2fs/<disk>/avg_vblocks
|
|
|
|
Date: September 2019
|
|
|
|
Contact: "Hridya Valsaraju" <hridya@google.com>
|
|
|
|
Description: Average number of valid blocks.
|
|
|
|
Available when CONFIG_F2FS_STAT_FS=y.
|
2020-02-26 03:08:16 +00:00
|
|
|
|
|
|
|
What: /sys/fs/f2fs/<disk>/mounted_time_sec
|
|
|
|
Date: February 2020
|
|
|
|
Contact: "Jaegeuk Kim" <jaegeuk@kernel.org>
|
|
|
|
Description: Show the mounted time in secs of this partition.
|
2020-04-02 16:32:35 +00:00
|
|
|
|
|
|
|
What: /sys/fs/f2fs/<disk>/data_io_flag
|
|
|
|
Date: April 2020
|
|
|
|
Contact: "Jaegeuk Kim" <jaegeuk@kernel.org>
|
|
|
|
Description: Give a way to attach REQ_META|FUA to data writes
|
|
|
|
given temperature-based bits. Now the bits indicate:
|
2020-10-30 07:40:50 +00:00
|
|
|
|
|
|
|
+-------------------+-------------------+
|
|
|
|
| REQ_META | REQ_FUA |
|
|
|
|
+------+------+-----+------+------+-----+
|
|
|
|
| 5 | 4 | 3 | 2 | 1 | 0 |
|
|
|
|
+------+------+-----+------+------+-----+
|
|
|
|
| Cold | Warm | Hot | Cold | Warm | Hot |
|
|
|
|
+------+------+-----+------+------+-----+
|
2020-03-30 03:30:59 +00:00
|
|
|
|
2020-06-04 18:49:43 +00:00
|
|
|
What: /sys/fs/f2fs/<disk>/node_io_flag
|
|
|
|
Date: June 2020
|
|
|
|
Contact: "Jaegeuk Kim" <jaegeuk@kernel.org>
|
|
|
|
Description: Give a way to attach REQ_META|FUA to node writes
|
|
|
|
given temperature-based bits. Now the bits indicate:
|
2020-10-30 07:40:50 +00:00
|
|
|
|
|
|
|
+-------------------+-------------------+
|
|
|
|
| REQ_META | REQ_FUA |
|
|
|
|
+------+------+-----+------+------+-----+
|
|
|
|
| 5 | 4 | 3 | 2 | 1 | 0 |
|
|
|
|
+------+------+-----+------+------+-----+
|
|
|
|
| Cold | Warm | Hot | Cold | Warm | Hot |
|
|
|
|
+------+------+-----+------+------+-----+
|
2020-06-04 18:49:43 +00:00
|
|
|
|
2020-03-30 03:30:59 +00:00
|
|
|
What: /sys/fs/f2fs/<disk>/iostat_period_ms
|
|
|
|
Date: April 2020
|
|
|
|
Contact: "Daeho Jeong" <daehojeong@google.com>
|
|
|
|
Description: Give a way to change iostat_period time. 3secs by default.
|
|
|
|
The new iostat trace gives stats gap given the period.
|
2020-12-03 17:52:45 +00:00
|
|
|
What: /sys/fs/f2fs/<disk>/max_io_bytes
|
|
|
|
Date: December 2020
|
|
|
|
Contact: "Jaegeuk Kim" <jaegeuk@kernel.org>
|
|
|
|
Description: This gives a control to limit the bio size in f2fs.
|
|
|
|
Default is zero, which will follow underlying block layer limit,
|
|
|
|
whereas, if it has a certain bytes value, f2fs won't submit a
|
|
|
|
bio larger than that size.
|
f2fs: introduce sb_status sysfs node
Introduce /sys/fs/f2fs/<devname>/stat/sb_status to show superblock
status in real time as a hexadecimal value.
value sb status macro description
0x1 SBI_IS_DIRTY, /* dirty flag for checkpoint */
0x2 SBI_IS_CLOSE, /* specify unmounting */
0x4 SBI_NEED_FSCK, /* need fsck.f2fs to fix */
0x8 SBI_POR_DOING, /* recovery is doing or not */
0x10 SBI_NEED_SB_WRITE, /* need to recover superblock */
0x20 SBI_NEED_CP, /* need to checkpoint */
0x40 SBI_IS_SHUTDOWN, /* shutdown by ioctl */
0x80 SBI_IS_RECOVERED, /* recovered orphan/data */
0x100 SBI_CP_DISABLED, /* CP was disabled last mount */
0x200 SBI_CP_DISABLED_QUICK, /* CP was disabled quickly */
0x400 SBI_QUOTA_NEED_FLUSH, /* need to flush quota info in CP */
0x800 SBI_QUOTA_SKIP_FLUSH, /* skip flushing quota in current CP */
0x1000 SBI_QUOTA_NEED_REPAIR, /* quota file may be corrupted */
0x2000 SBI_IS_RESIZEFS, /* resizefs is in process */
Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2021-01-14 01:41:27 +00:00
|
|
|
|
|
|
|
What: /sys/fs/f2fs/<disk>/stat/sb_status
|
|
|
|
Date: December 2020
|
|
|
|
Contact: "Chao Yu" <yuchao0@huawei.com>
|
|
|
|
Description: Show status of f2fs superblock in real time.
|
|
|
|
|
|
|
|
====== ===================== =================================
|
|
|
|
value sb status macro description
|
|
|
|
0x1 SBI_IS_DIRTY dirty flag for checkpoint
|
|
|
|
0x2 SBI_IS_CLOSE specify unmounting
|
|
|
|
0x4 SBI_NEED_FSCK need fsck.f2fs to fix
|
|
|
|
0x8 SBI_POR_DOING recovery is doing or not
|
|
|
|
0x10 SBI_NEED_SB_WRITE need to recover superblock
|
|
|
|
0x20 SBI_NEED_CP need to checkpoint
|
|
|
|
0x40 SBI_IS_SHUTDOWN shutdown by ioctl
|
|
|
|
0x80 SBI_IS_RECOVERED recovered orphan/data
|
|
|
|
0x100 SBI_CP_DISABLED CP was disabled last mount
|
|
|
|
0x200 SBI_CP_DISABLED_QUICK CP was disabled quickly
|
|
|
|
0x400 SBI_QUOTA_NEED_FLUSH need to flush quota info in CP
|
|
|
|
0x800 SBI_QUOTA_SKIP_FLUSH skip flushing quota in current CP
|
|
|
|
0x1000 SBI_QUOTA_NEED_REPAIR quota file may be corrupted
|
|
|
|
0x2000 SBI_IS_RESIZEFS resizefs is in process
|
|
|
|
====== ===================== =================================
|
2021-01-21 13:45:29 +00:00
|
|
|
|
|
|
|
What: /sys/fs/f2fs/<disk>/ckpt_thread_ioprio
|
|
|
|
Date: January 2021
|
|
|
|
Contact: "Daeho Jeong" <daehojeong@google.com>
|
|
|
|
Description: Give a way to change checkpoint merge daemon's io priority.
|
|
|
|
Its default value is "be,3", which means "BE" I/O class and
|
|
|
|
I/O priority "3". We can select the class between "rt" and "be",
|
|
|
|
and set the I/O priority within valid range of it. "," delimiter
|
|
|
|
is necessary in between I/O class and priority number.
|
2021-03-02 01:28:16 +00:00
|
|
|
|
|
|
|
What: /sys/fs/f2fs/<disk>/ovp_segments
|
|
|
|
Date: March 2021
|
|
|
|
Contact: "Jaegeuk Kim" <jaegeuk@kernel.org>
|
|
|
|
Description: Shows the number of overprovision segments.
|
2021-03-15 08:12:33 +00:00
|
|
|
|
|
|
|
What: /sys/fs/f2fs/<disk>/compr_written_block
|
|
|
|
Date: March 2021
|
|
|
|
Contact: "Daeho Jeong" <daehojeong@google.com>
|
|
|
|
Description: Show the block count written after compression since mount. Note
|
|
|
|
that when the compressed blocks are deleted, this count doesn't
|
|
|
|
decrease. If you write "0" here, you can initialize
|
|
|
|
compr_written_block and compr_saved_block to "0".
|
|
|
|
|
|
|
|
What: /sys/fs/f2fs/<disk>/compr_saved_block
|
|
|
|
Date: March 2021
|
|
|
|
Contact: "Daeho Jeong" <daehojeong@google.com>
|
|
|
|
Description: Show the saved block count with compression since mount. Note
|
|
|
|
that when the compressed blocks are deleted, this count doesn't
|
|
|
|
decrease. If you write "0" here, you can initialize
|
|
|
|
compr_written_block and compr_saved_block to "0".
|
|
|
|
|
|
|
|
What: /sys/fs/f2fs/<disk>/compr_new_inode
|
|
|
|
Date: March 2021
|
|
|
|
Contact: "Daeho Jeong" <daehojeong@google.com>
|
|
|
|
Description: Show the count of inode newly enabled for compression since mount.
|
|
|
|
Note that when the compression is disabled for the files, this count
|
|
|
|
doesn't decrease. If you write "0" here, you can initialize
|
|
|
|
compr_new_inode to "0".
|
2021-05-12 02:07:19 +00:00
|
|
|
|
|
|
|
What: /sys/fs/f2fs/<disk>/atgc_candidate_ratio
|
|
|
|
Date: May 2021
|
|
|
|
Contact: "Chao Yu" <yuchao0@huawei.com>
|
|
|
|
Description: When ATGC is on, it controls candidate ratio in order to limit total
|
|
|
|
number of potential victim in all candidates, the value should be in
|
|
|
|
range of [0, 100], by default it was initialized as 20(%).
|
|
|
|
|
|
|
|
What: /sys/fs/f2fs/<disk>/atgc_candidate_count
|
|
|
|
Date: May 2021
|
|
|
|
Contact: "Chao Yu" <yuchao0@huawei.com>
|
|
|
|
Description: When ATGC is on, it controls candidate count in order to limit total
|
|
|
|
number of potential victim in all candidates, by default it was
|
|
|
|
initialized as 10 (sections).
|
|
|
|
|
|
|
|
What: /sys/fs/f2fs/<disk>/atgc_age_weight
|
|
|
|
Date: May 2021
|
|
|
|
Contact: "Chao Yu" <yuchao0@huawei.com>
|
|
|
|
Description: When ATGC is on, it controls age weight to balance weight proportion
|
|
|
|
in between aging and valid blocks, the value should be in range of
|
|
|
|
[0, 100], by default it was initialized as 60(%).
|
|
|
|
|
|
|
|
What: /sys/fs/f2fs/<disk>/atgc_age_threshold
|
|
|
|
Date: May 2021
|
|
|
|
Contact: "Chao Yu" <yuchao0@huawei.com>
|
|
|
|
Description: When ATGC is on, it controls age threshold to bypass GCing young
|
|
|
|
candidates whose age is not beyond the threshold, by default it was
|
|
|
|
initialized as 604800 seconds (equals to 7 days).
|
2021-07-10 05:53:57 +00:00
|
|
|
|
|
|
|
What: /sys/fs/f2fs/<disk>/gc_reclaimed_segments
|
|
|
|
Date: July 2021
|
|
|
|
Contact: "Daeho Jeong" <daehojeong@google.com>
|
|
|
|
Description: Show how many segments have been reclaimed by GC during a specific
|
|
|
|
GC mode (0: GC normal, 1: GC idle CB, 2: GC idle greedy,
|
|
|
|
3: GC idle AT, 4: GC urgent high, 5: GC urgent low)
|
|
|
|
You can re-initialize this value to "0".
|
|
|
|
|
|
|
|
What: /sys/fs/f2fs/<disk>/gc_segment_mode
|
|
|
|
Date: July 2021
|
|
|
|
Contact: "Daeho Jeong" <daehojeong@google.com>
|
|
|
|
Description: You can control for which gc mode the "gc_reclaimed_segments" node shows.
|
|
|
|
Refer to the description of the modes in "gc_reclaimed_segments".
|
2021-08-03 04:22:45 +00:00
|
|
|
|
|
|
|
What: /sys/fs/f2fs/<disk>/seq_file_ra_mul
|
|
|
|
Date: July 2021
|
|
|
|
Contact: "Daeho Jeong" <daehojeong@google.com>
|
|
|
|
Description: You can control the multiplier value of bdi device readahead window size
|
|
|
|
between 2 (default) and 256 for POSIX_FADV_SEQUENTIAL advise option.
|
2021-09-29 18:12:03 +00:00
|
|
|
|
|
|
|
What: /sys/fs/f2fs/<disk>/max_fragment_chunk
|
|
|
|
Date: August 2021
|
|
|
|
Contact: "Daeho Jeong" <daehojeong@google.com>
|
|
|
|
Description: With "mode=fragment:block" mount options, we can scatter block allocation.
|
|
|
|
f2fs will allocate 1..<max_fragment_chunk> blocks in a chunk and make a hole
|
|
|
|
in the length of 1..<max_fragment_hole> by turns. This value can be set
|
|
|
|
between 1..512 and the default value is 4.
|
|
|
|
|
|
|
|
What: /sys/fs/f2fs/<disk>/max_fragment_hole
|
|
|
|
Date: August 2021
|
|
|
|
Contact: "Daeho Jeong" <daehojeong@google.com>
|
|
|
|
Description: With "mode=fragment:block" mount options, we can scatter block allocation.
|
|
|
|
f2fs will allocate 1..<max_fragment_chunk> blocks in a chunk and make a hole
|
|
|
|
in the length of 1..<max_fragment_hole> by turns. This value can be set
|
|
|
|
between 1..512 and the default value is 4.
|
2021-12-09 00:41:51 +00:00
|
|
|
|
|
|
|
What: /sys/fs/f2fs/<disk>/gc_urgent_high_remaining
|
|
|
|
Date: December 2021
|
|
|
|
Contact: "Daeho Jeong" <daehojeong@google.com>
|
|
|
|
Description: You can set the trial count limit for GC urgent high mode with this value.
|
|
|
|
If GC thread gets to the limit, the mode will turn back to GC normal mode.
|
|
|
|
By default, the value is zero, which means there is no limit like before.
|