linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] f2fs: set 4KB discard granularity by default
@ 2018-08-10 10:08 Chao Yu
  2018-08-10 10:08 ` [PATCH 2/2] f2fs: tune discard speed with storage usage rate Chao Yu
  2018-08-14  4:13 ` [PATCH 1/2] f2fs: set 4KB discard granularity by default Jaegeuk Kim
  0 siblings, 2 replies; 19+ messages in thread
From: Chao Yu @ 2018-08-10 10:08 UTC (permalink / raw)
  To: jaegeuk; +Cc: linux-f2fs-devel, linux-kernel, chao, Chao Yu

Small granularity (size < 64K) fragmentation will cause f2fs suspending
all pending discards, result in performance regression, so let's set
4KB discard granularity by default.

So that without fstrim, we also have the ability to avoid any performance
regression caused by non-alignment mapping between fs and flash device.

Signed-off-by: Chao Yu <yuchao0@huawei.com>
---
 fs/f2fs/f2fs.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h
index 58431b9bfd8f..273ffdaf4891 100644
--- a/fs/f2fs/f2fs.h
+++ b/fs/f2fs/f2fs.h
@@ -248,7 +248,7 @@ struct discard_entry {
 };
 
 /* default discard granularity of inner discard thread, unit: block count */
-#define DEFAULT_DISCARD_GRANULARITY		16
+#define DEFAULT_DISCARD_GRANULARITY		1
 
 /* max discard pend list number */
 #define MAX_PLIST_NUM		512
-- 
2.18.0.rc1


^ permalink raw reply related	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2018-09-05  2:33 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-10 10:08 [PATCH 1/2] f2fs: set 4KB discard granularity by default Chao Yu
2018-08-10 10:08 ` [PATCH 2/2] f2fs: tune discard speed with storage usage rate Chao Yu
2018-08-14  4:19   ` Jaegeuk Kim
2018-08-14  7:41     ` Chao Yu
2018-08-14 17:23       ` Jaegeuk Kim
2018-08-15  1:46         ` Chao Yu
2018-08-15  2:33           ` Jaegeuk Kim
2018-08-15  2:51             ` Chao Yu
2018-08-15  2:56               ` Jaegeuk Kim
2018-08-15  3:01                 ` Chao Yu
2018-08-15  3:20                   ` Jaegeuk Kim
2018-08-15  3:30                     ` Chao Yu
     [not found]                       ` <CAD14+f1MoAjEuXwGSmL3=0ROX_f=9jZVmvNsU9gnTP=UNxsTrg@mail.gmail.com>
2018-08-16  1:23                         ` [f2fs-dev] " Jaegeuk Kim
2018-08-16 11:25                           ` Chao Yu
2018-08-17 18:30                             ` Jaegeuk Kim
2018-08-14  4:13 ` [PATCH 1/2] f2fs: set 4KB discard granularity by default Jaegeuk Kim
2018-08-14  7:08   ` Chao Yu
2018-09-04 14:36     ` [f2fs-dev] " Ju Hyung Park
2018-09-05  2:33       ` Chao Yu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).