Commit d31e0de8 authored by Chao Yu's avatar Chao Yu Committed by Jaegeuk Kim
Browse files

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: default avatarChao Yu <chao@kernel.org>
Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
parent 76e780d8
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -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))
+1 −1
Original line number Diff line number Diff line
@@ -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: