Move only dirty data when gc runnning, in order to reducing write amplification.
euleros inclusion category: feature bugzilla: https://bugzilla.openeuler.org/show_bug.cgi?id=327 CVE: NA Bcache will move all data, including clean and dirty data, in bucket when gc running. This will cause big write amplification, which may reduce the cache device's life. This patch provice a switch for gc to move only dirty data, which can reduce write amplification. Signed-off-by:qinghaixiang <xuweiqhx@163.com> Signed-off-by:
Xu Wei <xuwei56@huawei.com> Acked-by:
Xie XiuQi <xiexiuqi@huawei.com> Reviewed-by:
Li Ruilin <liruilin4@huawei.com> Signed-off-by:
Yang Yingliang <yangyingliang@huawei.com>
Showing
- drivers/md/bcache/alloc.c 1 addition, 0 deletionsdrivers/md/bcache/alloc.c
- drivers/md/bcache/bcache.h 3 additions, 1 deletiondrivers/md/bcache/bcache.h
- drivers/md/bcache/btree.c 9 additions, 4 deletionsdrivers/md/bcache/btree.c
- drivers/md/bcache/btree.h 1 addition, 1 deletiondrivers/md/bcache/btree.h
- drivers/md/bcache/movinggc.c 40 additions, 17 deletionsdrivers/md/bcache/movinggc.c
- drivers/md/bcache/sysfs.c 4 additions, 0 deletionsdrivers/md/bcache/sysfs.c
Please register or sign in to comment