mirror of
https://github.com/torvalds/linux.git
synced 2026-05-27 16:44:58 +02:00
f2fs: change default schedule timeout value
This patch changes default schedule timeout value from 20ms to 1ms, in order to give caller more chances to check whether IO or non-IO congestion condition has already been mitigable. In addition, default interval of periodical discard submission is kept to 20ms. Signed-off-by: Chao Yu <chao@kernel.org> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
This commit is contained in:
parent
76e780d88c
commit
d31e0de8b8
|
|
@ -407,6 +407,8 @@ struct discard_entry {
|
|||
#define DEFAULT_DISCARD_GRANULARITY 16
|
||||
/* default maximum discard granularity of ordered discard, unit: block count */
|
||||
#define DEFAULT_MAX_ORDERED_DISCARD_GRANULARITY 16
|
||||
/* default interval of periodical discard submission */
|
||||
#define DEFAULT_DISCARD_INTERVAL (msecs_to_jiffies(20))
|
||||
|
||||
/* max discard pend list number */
|
||||
#define MAX_PLIST_NUM 512
|
||||
|
|
@ -656,8 +658,8 @@ enum {
|
|||
|
||||
#define DEFAULT_RETRY_IO_COUNT 8 /* maximum retry read IO or flush count */
|
||||
|
||||
/* IO/non-IO congestion wait timeout value, default: 20ms */
|
||||
#define DEFAULT_SCHEDULE_TIMEOUT (msecs_to_jiffies(20))
|
||||
/* IO/non-IO congestion wait timeout value, default: 1ms */
|
||||
#define DEFAULT_SCHEDULE_TIMEOUT (msecs_to_jiffies(1))
|
||||
|
||||
/* timeout value injected, default: 1000ms */
|
||||
#define DEFAULT_FAULT_TIMEOUT (msecs_to_jiffies(1000))
|
||||
|
|
|
|||
|
|
@ -3471,7 +3471,7 @@ static unsigned int __issue_discard_cmd_range(struct f2fs_sb_info *sbi,
|
|||
blk_finish_plug(&plug);
|
||||
mutex_unlock(&dcc->cmd_lock);
|
||||
trimmed += __wait_all_discard_cmd(sbi, NULL);
|
||||
f2fs_schedule_timeout(DEFAULT_SCHEDULE_TIMEOUT);
|
||||
f2fs_schedule_timeout(DEFAULT_DISCARD_INTERVAL);
|
||||
goto next;
|
||||
}
|
||||
skip:
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user