Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Chao Yu and committed by
Jaegeuk Kim
d31e0de8 76e780d8

+5 -3
+4 -2
fs/f2fs/f2fs.h
··· 407 407 #define DEFAULT_DISCARD_GRANULARITY 16 408 408 /* default maximum discard granularity of ordered discard, unit: block count */ 409 409 #define DEFAULT_MAX_ORDERED_DISCARD_GRANULARITY 16 410 + /* default interval of periodical discard submission */ 411 + #define DEFAULT_DISCARD_INTERVAL (msecs_to_jiffies(20)) 410 412 411 413 /* max discard pend list number */ 412 414 #define MAX_PLIST_NUM 512 ··· 658 656 659 657 #define DEFAULT_RETRY_IO_COUNT 8 /* maximum retry read IO or flush count */ 660 658 661 - /* IO/non-IO congestion wait timeout value, default: 20ms */ 662 - #define DEFAULT_SCHEDULE_TIMEOUT (msecs_to_jiffies(20)) 659 + /* IO/non-IO congestion wait timeout value, default: 1ms */ 660 + #define DEFAULT_SCHEDULE_TIMEOUT (msecs_to_jiffies(1)) 663 661 664 662 /* timeout value injected, default: 1000ms */ 665 663 #define DEFAULT_FAULT_TIMEOUT (msecs_to_jiffies(1000))
+1 -1
fs/f2fs/segment.c
··· 3471 3471 blk_finish_plug(&plug); 3472 3472 mutex_unlock(&dcc->cmd_lock); 3473 3473 trimmed += __wait_all_discard_cmd(sbi, NULL); 3474 - f2fs_schedule_timeout(DEFAULT_SCHEDULE_TIMEOUT); 3474 + f2fs_schedule_timeout(DEFAULT_DISCARD_INTERVAL); 3475 3475 goto next; 3476 3476 } 3477 3477 skip: