Received: by 2002:ac0:950c:0:0:0:0:0 with SMTP id f12csp3437828imc; Wed, 13 Mar 2019 18:53:51 -0700 (PDT) X-Google-Smtp-Source: APXvYqxkuS9A6AURcQDdB2Xr3ELW4SboG38m/m4bmyDeB7Ag2CB3dYGFuUtv12UiRhVEa/a587Tq X-Received: by 2002:a63:d015:: with SMTP id z21mr32747363pgf.215.1552528431093; Wed, 13 Mar 2019 18:53:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552528431; cv=none; d=google.com; s=arc-20160816; b=d9ki4HI3KxbGA9kyzsiUtaJNzvDwcCHIkWuuiHydfnlz6mwdXAGYVrXoEMVURzhj6e rLlM30E8W2INabZsQmxYwYFqhRXbXzdxDrSgjPN0YWoa2w8oFKU/HRLJZX0jJxK8YrNt YlShWiDxpWk7/lH8UiLpj4nrCej7jjytYhTPuB86UYYiRG8EVj56NKb3V7r/x0c8hbpH SCoDUwV6w8YEMxVWCVuqxS94faGDpXeKsnboebHE6uqLYSB0IcO5PufnvH2Hyk+z9tei tljFwcDtY8mxV1foaTCRwAWxBmuSIXUvLYxv2tUpBXT/3TGxhKiQH6H1KaLpxmGXlMyC Nndg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from; bh=0beD08B3FjRVoHHaWfC32T766cGY+aaDJbmmFyyTXJQ=; b=ErVx4w/BIpCpWxvvW9NrU2lYXKOwsuPKSnxZuZ5z0lz5jN0DmProNAurnTuLXJJ6ah bIZN43FasRTnHwaUC0TXAOoziWP8dpF3eyb72t+I9vSp5kDf1s7tWtB+HyhsDC8YTFt8 fK6my2tW6CjRHUPMgyXSkDxRDxWJ6ZVMzN5YRDuF/nbjAfwvYQKa6dgAXoIwJTVoSXcW p7MUF6xH8igZdksbznyPPZbxGeoYS+9gdKtX46bplefgCZFf5UCEKnfw0DyZf7WAiUEq qmB/Suzaz/wa0Zhdt3HgjkpxMd7zmFbHAbQliuDO7KFx9HVVjOVweJy1D6JJ0dzw1BhQ mV4w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x3si6127107plv.424.2019.03.13.18.53.35; Wed, 13 Mar 2019 18:53:51 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726746AbfCNBwz (ORCPT + 99 others); Wed, 13 Mar 2019 21:52:55 -0400 Received: from mga11.intel.com ([192.55.52.93]:62605 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726141AbfCNBwz (ORCPT ); Wed, 13 Mar 2019 21:52:55 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Mar 2019 18:52:54 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.58,476,1544515200"; d="scan'208";a="133894538" Received: from yhuang-dev.sh.intel.com (HELO yhuang-dev) ([10.239.159.65]) by orsmga003.jf.intel.com with ESMTP; 13 Mar 2019 18:52:52 -0700 From: "Huang\, Ying" To: Theodore Ts'o Cc: huang ying , kernel test robot , LKML , Linus Torvalds , LKP ML Subject: Re: [LKP] [ext4] fde872682e: fsmark.files_per_sec -38.0% regression References: <20190102004002.GB17624@shao2-debian> <20190313153056.GB672@mit.edu> Date: Thu, 14 Mar 2019 09:52:52 +0800 In-Reply-To: <20190313153056.GB672@mit.edu> (Theodore Ts'o's message of "Wed, 13 Mar 2019 11:30:56 -0400") Message-ID: <87h8c66x3f.fsf@yhuang-dev.intel.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=ascii Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Theodore Ts'o writes: > On Wed, Mar 13, 2019 at 03:26:39PM +0800, huang ying wrote: >> > >> > >> > commit: fde872682e175743e0c3ef939c89e3c6008a1529 ("ext4: force inode writes when nfsd calls commit_metadata()") >> > https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git master >> >> It appears that this is a performance regression caused by a >> functionality fixing. So we should ignore this? > > Yes, this is a correctness issue that we discovered while tracking > down user data loss issue after a crash of the NFS server, so this is > a change we have to keep. When the NFS folks added the > commit_metadata() hook, they didn't realize that the fallback path in > nfsd/vfs.c using sync_inode_metadata() doesn't work on all file > systems --- and in particular doesn't work for ext3 and ext4 because > of how we do journalling. > > It only applies to NFS serving, not local ext4 use cases, so most ext4 > users won't be impacted on it; only those who export those file > systems using NFS. > > I do have some plans on how to claw back the performance hit. The > good news is that it won't require an on-disk format change; the bad > news is that it's a non-trivial change to how journalling works, and > it's not something we can backport to the stable kernel series. It's > something we're going to have to leave to a distribution who is > willing to do a lot of careful regression testing, once the change is > available, maybe in 3 months or so. > > - Ted > > P.S. I *believe* all other file systems should be OK, and I didn't > want to impose a performance tax on all other file systems (such as > btrfs), so I fixed it in an ext4-specific way. The more > general/conservative change would be to fall back to using fsync in > nfs/vfs.c:commit_metadata() unless the file system specifically set a > superblock flag indicating that using sync_inode_metadata is safe. > OTOH we lived with this flaw in ext3/ext4 for *years* without anyone > noticing or complaining, so.... Got it! Thanks for your detailed explanation! Best Regards, Huang, Ying