Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752639AbbDAJ4I (ORCPT ); Wed, 1 Apr 2015 05:56:08 -0400 Received: from victor.provo.novell.com ([137.65.250.26]:52198 "EHLO prv3-mh.provo.novell.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750996AbbDAJ4G (ORCPT ); Wed, 1 Apr 2015 05:56:06 -0400 Message-ID: <551BC0D6.6060504@suse.com> Date: Wed, 01 Apr 2015 10:56:38 +0100 From: Filipe Manana User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Huang Ying CC: Chris Mason , LKML , LKP ML Subject: Re: [LKP] [Btrfs] 3a8b36f3780: -62.6% fileio.requests_per_sec References: <1426666837.5570.36.camel@intel.com> <55094E06.2070004@suse.com> <1427790767.17170.95.camel@intel.com> <551AB664.4080303@suse.com> <1427864347.17170.105.camel@intel.com> In-Reply-To: <1427864347.17170.105.camel@intel.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2527 Lines: 69 On 04/01/2015 05:59 AM, Huang Ying wrote: > On Tue, 2015-03-31 at 15:59 +0100, Filipe Manana wrote: > > [snip] > >> From: Filipe Manana >> Date: Tue, 31 Mar 2015 14:16:52 +0100 >> Subject: [PATCH] Btrfs: avoid syncing log in the fast fsync path when not >> necessary >> >> Commit 3a8b36f37806 ("Btrfs: fix data loss in the fast fsync path") added >> a performance regression for that causes an unnecessary sync of the log >> trees (fs/subvol and root log trees) when 2 consecutive fsyncs are done >> against a file, without no writes or any metadata updates to the inode in >> between them and if a transaction is committed before the second fsync is >> called. >> >> Huang Ying reported this to lkml after a test sysbench test that measured >> a -62% decrease of file io requests for that tests' workload. >> >> The test is: >> >> echo performance > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor >> echo performance > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor >> echo performance > /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor >> echo performance > /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor >> mkfs -t btrfs /dev/sda2 >> mount -t btrfs /dev/sda2 /fs/sda2 >> cd /fs/sda2 >> for ((i = 0; i < 1024; i++)); do fallocate -l 67108864 testfile.$i; done >> sysbench --test=fileio --max-requests=0 --num-threads=4 --max-time=600 \ >> --file-test-mode=rndwr --file-total-size=68719476736 --file-io-mode=sync \ >> --file-num=1024 run >> >> A test on kvm guest, running a debug kernel gave me the following results: >> >> Without 3a8b36f378060d: 16.01 reqs/sec >> With 3a8b36f378060d: 3.39 reqs/sec >> With 3a8b36f378060d and this patch: 16.04 reqs/sec >> >> Reported-by: Huang Ying > > I have tested your patch, the regression restored in our test. Thanks! > > Tested-by: Huang, Ying Thank you very much for testing it and the report. I'll now send the exact same patch, with your Tested-by tag, to the btrfs mailing list, so that Chris can pick it from patchwork and can more easily be noticed by the btrfs community (for review, test, etc). regards, Filipe Manana > > Best Regards, > Huang, Ying > > [snip] > > > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/