forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
f2fs: add write priority option based on zone UFS
Currently, we are using a mix of traditional UFS and zone UFS to support some functionalities that cannot be achieved on zone UFS alone. However, there are some issues with this approach. There exists a significant performance difference between traditional UFS and zone UFS. Under normal usage, we prioritize writes to zone UFS. However, in critical conditions (such as when the entire UFS is almost full), we cannot determine whether data will be written to traditional UFS or zone UFS. This can lead to significant performance fluctuations, which is not conducive to development and testing. To address this, we have added an option zlu_io_enable under sys with the following three modes: 1) zlu_io_enable == 0:Normal mode, prioritize writing to zone UFS; 2) zlu_io_enable == 1:Zone UFS only mode, only allow writing to zone UFS; 3) zlu_io_enable == 2:Traditional UFS priority mode, prioritize writing to traditional UFS. Signed-off-by: Liao Yuanhong <[email protected]> Signed-off-by: Wu Bo <[email protected]> Reviewed-by: Chao Yu <[email protected]> Signed-off-by: Jaegeuk Kim <[email protected]>
- Loading branch information
Liao Yuanhong
authored and
Jaegeuk Kim
committed
Aug 5, 2024
1 parent
50438db
commit 8444ce5
Showing
5 changed files
with
58 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -763,3 +763,17 @@ Date: November 2023 | |
Contact: "Chao Yu" <[email protected]> | ||
Description: It controls to enable/disable IO aware feature for background discard. | ||
By default, the value is 1 which indicates IO aware is on. | ||
|
||
What: /sys/fs/f2fs/<disk>/blkzone_alloc_policy | ||
Date: July 2024 | ||
Contact: "Yuanhong Liao" <[email protected]> | ||
Description: The zone UFS we are currently using consists of two parts: | ||
conventional zones and sequential zones. It can be used to control which part | ||
to prioritize for writes, with a default value of 0. | ||
|
||
======================== ========================================= | ||
value description | ||
blkzone_alloc_policy = 0 Prioritize writing to sequential zones | ||
blkzone_alloc_policy = 1 Only allow writing to sequential zones | ||
blkzone_alloc_policy = 2 Prioritize writing to conventional zones | ||
======================== ========================================= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters