Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp3664013ybl; Sun, 1 Sep 2019 18:37:12 -0700 (PDT) X-Google-Smtp-Source: APXvYqxn/Kg1A8GU1taeGm+8DhLOfKp1CEjJx/85PXXF+In4e3p9A26pDLRqiY33jQ0kiMn8yLB9 X-Received: by 2002:aa7:809a:: with SMTP id v26mr31882494pff.82.1567388232291; Sun, 01 Sep 2019 18:37:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567388232; cv=none; d=google.com; s=arc-20160816; b=gqq5SaUYb4YW2mqE8f9xNJVonXI0wHZOzrT/sx6CNebQSHfKOfr1XcHuBocn0OgEkp ALvs8TjlUM4w4xs97/y7t2TabbHGbIbfQdk7L5N7S8i8vTlqkuKe6ODvF83EtTlqKiGo N737cLj+XM8eyXRpzRz228cSgsze1NYNI2itVIQPpNdWGIGD+NcShqpqdvhmtJObzDke Q5lnCf/S9Ub+98A+lf/AJbGxKWHOOG4ww0Bxihhk8ICZ1KHXfoAOPBc84u1d68W3MYbI gjrgHE1UZgFSDBl/AgDBCE1aiiYiqA8y+TzmkYlpjH9/vwXYD5jMoDKsLIj8RNfSb2q9 ymTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:references:to:subject; bh=8NmB/nk9+LJRJQH8ReU0QFaYXdpsoSICIWCInTnLNFU=; b=NJF5xHbDCRWqyZ+TfA/v+RiLWNknP//nP0WlwxatX1FiUDMhEvuWBhdMBr9neyMEau Z4HpI+6HQlOedEOHdxNjGNcB8p6h8Flk0KFBChQA39NqtRx9B5LiahaUxMaPGsdLRNX+ gUgR+N0QASkaAVdjPF0FfZ3Uux5CEmrJbebqtbiTcrB1iER3d5newCycu0xFOPKnwigs PBzzcHd/S8yTyOBdkqWx/Y1dl8/Vexzo7xTeZBIs+LK71EACzIWvzS4E5+y+K781URjo VR3x67ZRiNNSVb4MO8T61oQU6e8Gy+LXbou42u3KTq1GKpBzpvEgp5/rNFKkxqr0v6eU UTkw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r29si3351420pfl.158.2019.09.01.18.36.26; Sun, 01 Sep 2019 18:37:12 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729019AbfIBBbg (ORCPT + 99 others); Sun, 1 Sep 2019 21:31:36 -0400 Received: from out4436.biz.mail.alibaba.com ([47.88.44.36]:41938 "EHLO out4436.biz.mail.alibaba.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728982AbfIBBbg (ORCPT ); Sun, 1 Sep 2019 21:31:36 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R581e4;CH=green;DM=||false|;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01f04446;MF=xiaoguang.wang@linux.alibaba.com;NM=1;PH=DS;RN=1;SR=0;TI=SMTPD_---0Tb2sFeZ_1567387883; Received: from 10.65.158.221(mailfrom:xiaoguang.wang@linux.alibaba.com fp:SMTPD_---0Tb2sFeZ_1567387883) by smtp.aliyun-inc.com(127.0.0.1); Mon, 02 Sep 2019 09:31:23 +0800 Subject: Re: [PATCH] ext4: disable mount with both dioread_nolock and nodelalloc To: linux-ext4@vger.kernel.org References: <20190731130600.7867-1-xiaoguang.wang@linux.alibaba.com> From: Xiaoguang Wang Message-ID: <12533d10-22e4-59bc-c7db-4c7ca5c2df69@linux.alibaba.com> Date: Mon, 2 Sep 2019 09:31:23 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <20190731130600.7867-1-xiaoguang.wang@linux.alibaba.com> Content-Type: text/plain; charset=gbk; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org hi, Ping. For this patch, I'm afraid someone else still takes effort to look into this issue. Regards, Xiaoguang Wang > 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)) > > Signed-off-by: Xiaoguang Wang > --- > fs/ext4/super.c | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/fs/ext4/super.c b/fs/ext4/super.c > index 4079605d437a..1a2b2c0cd1b8 100644 > --- a/fs/ext4/super.c > +++ b/fs/ext4/super.c > @@ -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"); >