ext4: disable mount with both dioread_nolock and nodelalloc
PATCH 1/1 ext4: disable mount with both dioread_nolock and nodelalloc
Mount with both dioread_nolock and nodelalloc will result in huge performance drop, which indeed is an known issue, so before we fix this issue, currently we disable this behaviour. Below test reproducer can reveal this performance drop.
mount -o remount,dioread_nolock,delalloc /dev/vdb1
rm -f testfile
start_time=$(date +%s)
dd if=/dev/zero of=testfile bs=4096 count=$((1024*256))
sync
end_time=$(date +%s)
echo $((end_time - start_time))
mount -o remount,dioread_nolock,nodelalloc /dev/vdb1
rm -f testfile
start_time=$(date +%s)
dd if=/dev/zero of=testfile bs=4096 count=$((1024*256))
sync
end_time=$(date +%s)
echo $((end_time - start_time))--- fs/ext4/super.c | 6 ++++++ 1 file changed, 6 insertions(+)
fs/ext4/super.c +6 -0
@@ -2098,6 +2098,12 @@ static int parse_options(char *options, struct super_block *sb,int blocksize =BLOCK_SIZE <<le32_to_cpu (sbi->s_es->s_log_block_size); +if (!test_opt (sb,DELALLOC )) { +ext4_msg (sb,KERN_ERR ,"can't mount with " +"both dioread_nolock and nodelalloc" ); +return 0 ; + } +if (blocksize <PAGE_SIZE ) {ext4_msg (sb,KERN_ERR ,"can't mount with " "dioread_nolock if block size != PAGE_SIZE" );
Signature · 1 line
2.17.2
Quoted 31 lines · Xiaoguang Wang
Mount with both
dioread_nolockand nodelalloc will result in huge performance drop, which indeed is an known issue, so before we fix this issue, currently we disable this behaviour. Below test reproducer can reveal this performance drop.mount -o remount,dioread_nolock,delalloc /dev/vdb1 rm -f testfile start_time=$(date +%s) dd if=/dev/zero of=testfile bs=4096 count=$((1024*256)) sync end_time=$(date +%s) echo $((end_time - start_time)) mount -o remount,dioread_nolock,nodelalloc /dev/vdb1 rm -f testfile start_time=$(date +%s) dd if=/dev/zero of=testfile bs=4096 count=$((1024*256)) sync end_time=$(date +%s) echo $((end_time - start_time))Signed-off-by Xiaoguang Wang <[email protected]>--- fs/ext4/super.c | 6 ++++++ 1 file changed, 6 insertions(+)fs/ext4/super.c +0
-0
fs/ext4/super.c static int parse_options(char *options, struct super_block *sb, · line 2106
Quoted 9 lines
fs/ext4/super.c +6
-0@@ -2098,6 +2098,12 @@ static int parse_options(char *options, struct super_block *sb,int blocksize =BLOCK_SIZE <<le32_to_cpu (sbi->s_es->s_log_block_size); +if (!test_opt (sb,DELALLOC )) { +ext4_msg (sb,KERN_ERR ,"can't mount with " +"both dioread_nolock and nodelalloc" ); +return 0 ; + } +
I suggest move it down to keep blocksize check logic together.
Other than that, looks good to me.
Quoted 4 lines
fs/ext4/super.c +0
-0if (blocksize <PAGE_SIZE ) {ext4_msg (sb,KERN_ERR ,"can't mount with " "dioread_nolock if block size != PAGE_SIZE" );
hi,
Ping.
For this patch, I'm afraid someone else still takes effort to look into this issue.
Regards,
Xiaoguang Wang
Quoted 44 lines
Mount with both
dioread_nolockand nodelalloc will result in huge performance drop, which indeed is an known issue, so before we fix this issue, currently we disable this behaviour. Below test reproducer can reveal this performance drop.mount -o remount,dioread_nolock,delalloc /dev/vdb1 rm -f testfile start_time=$(date +%s) dd if=/dev/zero of=testfile bs=4096 count=$((1024*256)) sync end_time=$(date +%s) echo $((end_time - start_time)) mount -o remount,dioread_nolock,nodelalloc /dev/vdb1 rm -f testfile start_time=$(date +%s) dd if=/dev/zero of=testfile bs=4096 count=$((1024*256)) sync end_time=$(date +%s) echo $((end_time - start_time))Signed-off-by Xiaoguang Wang <[email protected]>--- fs/ext4/super.c | 6 ++++++ 1 file changed, 6 insertions(+)fs/ext4/super.c +6
-0@@ -2098,6 +2098,12 @@ static int parse_options(char *options, struct super_block *sb,int blocksize =BLOCK_SIZE <<le32_to_cpu (sbi->s_es->s_log_block_size); +if (!test_opt (sb,DELALLOC )) { +ext4_msg (sb,KERN_ERR ,"can't mount with " +"both dioread_nolock and nodelalloc" ); +return 0 ; + } +if (blocksize <PAGE_SIZE ) {ext4_msg (sb,KERN_ERR ,"can't mount with " "dioread_nolock if block size != PAGE_SIZE" );
Theodore Y. Ts'o
maintainerQuoted 4 lines · Xiaoguang Wang
Mount with both
dioread_nolockand nodelalloc will result in huge performance drop, which indeed is an known issue, so before we fix this issue, currently we disable this behaviour. Below test reproducer can reveal this performance drop.
Is it really worth it to disable this combination? Nothing goes *wrong* per se; it's just slower than we would like.
- Ted
hi,
Quoted 8 lines · Xiaoguang Wang
Quoted 4 lines
Mount with both
dioread_nolockand nodelalloc will result in huge performance drop, which indeed is an known issue, so before we fix this issue, currently we disable this behaviour. Below test reproducer can reveal this performance drop.Is it really worth it to disable this combination? Nothing goes *wrong* per se; it's just slower than we would like.
Yes, agree, then should we have some places to record this issue? In case somebody looks into it again.
Regards,
Xiaoguang Wang
Quoted 3 lines
- Ted