Received: by 2002:a05:6a10:c7c6:0:0:0:0 with SMTP id h6csp714129pxy; Sat, 31 Jul 2021 23:33:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz8SEn2rb28gjjpaXSL7dzWWcW2sXBiMfgPki4Havj9x1bG8x26Wz3i+Sep1U8r3GTJalbB X-Received: by 2002:a5e:a818:: with SMTP id c24mr6724676ioa.180.1627799634333; Sat, 31 Jul 2021 23:33:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627799634; cv=none; d=google.com; s=arc-20160816; b=Ab86KKSgYpHoJueauGN2xktbZYfbjkitpB/9nEVmnzglGaf3HG9Wt4GVVgY9p9pPTj lG7/AE6V9m8pC8h1oFmk7psGCgUzw7u9FaRuT/PrcLzyOByvWI+TfioJjGvsoLRZDSi0 +Ol2sriN+GeU8bpiIKcepAS8lpIXOUrymo/avCDTwU1zLJ7eI0re/R4wlec4K2iF1Rkp eQEu7iGF1FznoVHWxxbxfPsqCiEn8S8x3qNG8mqipW994lDFkayr3Osk2oguG8PfKm+A TT34PSGxHnCB6lQP3+tof0z+uXZ6t0eixqB+GfPdrNOY0nwNlh++X4LO3na87ET3nSON IOAA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=eUClev66k2CwNGVehotJ41c5fU9e0u4+Aw/nkEdVSo4=; b=TPjH8kt3LuHYrnLc2ohCUtAxR+5thgfdkVk+WmadU4cBlfSS+xAmheWCG+Ims0r0dD m0FAb3cgoFTjKIbeYzWb9K7SgrGYgtCS6cv4oqHgkN12f8zEwPjUfA3ZfNNHoPSMrIOC NZm6EwMtHxtT0QHmMZb4Agzl0fiIpyX/46esEAe6wDdl35tUzFYgF7VldCTIT/bGi9eZ jYgMIg/vskUMsjXhB7O1FAM4sbhfQXxwkBKy7j7P8Jxw1Wl8KJ47nLoMajaK5dZa9HNW yWnZ59aL4a8+iSChTKOtupyMnOLv8fzXYidYnJU+k45pKsfR4ik5+/qHZ0gLSvkwa9nT 9iZQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Vor6uuwa; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o7si7703171jao.123.2021.07.31.23.33.30; Sat, 31 Jul 2021 23:33:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Vor6uuwa; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230147AbhHAGdA (ORCPT + 99 others); Sun, 1 Aug 2021 02:33:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40842 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229451AbhHAGdA (ORCPT ); Sun, 1 Aug 2021 02:33:00 -0400 Received: from mail-il1-x12b.google.com (mail-il1-x12b.google.com [IPv6:2607:f8b0:4864:20::12b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4AA0FC06175F; Sat, 31 Jul 2021 23:32:52 -0700 (PDT) Received: by mail-il1-x12b.google.com with SMTP id k3so13666086ilu.2; Sat, 31 Jul 2021 23:32:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=eUClev66k2CwNGVehotJ41c5fU9e0u4+Aw/nkEdVSo4=; b=Vor6uuwaFPIL6tI6kQNkUjJBadv0llFfR5CYI6gj3wgECMJLXhN8hg3InrXzdHHw6x v9zDzDwZrBxZAcGVOhvymBCPk2UZZZD7TE+EL+mty8S27t8FQDf4NpTcBEsxZHaum6y2 3d0A2nn07EApu+KWWgSNxbgjokNSOjRHtla+4d2rAcFKVGCatM2ZE2N5s9tKeMu6a/CM pRDEWT/JCaNndYE6sLyMVTDlq5XAulCKN+/9cZ2bJ3T/9sjK5EPOtpjLffGuKojj1MGt ocfbZFSrsbWmB6T1ogXtulec1lpogOHEpVI0cE2oF/9LBTDgyysS6fWvrh9+gqf+y41G RVAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=eUClev66k2CwNGVehotJ41c5fU9e0u4+Aw/nkEdVSo4=; b=NXcRw/ACQKNQbke/stUq/d0xbJnDfiexL6k+/AAdpSXUTszGpTUpuEXq61XXtkevlM +nh44rjKwJov2oyIlvkg1Zc07hzSKnI6ybs5gyLuqX+sop+YD0BLT6PZ4bLmEg3hzzcK UhP6gxIkGlyZeHusKKHJZr8kdZRMD6aYIucs25zMsS7oZYl53rfS4zecuKT0bJ8aa7sK AyRBYOQR8q3AH4ZVmAoRxpEjsMDOxumQ3FkKDq249FDBG98zu7iMmbQtvf0j6rXGLo0D m7PJF1habaQFbQZjxOdBU9a3dYEUsMYo0M5Ox6ygO8R6l6ND4FQoqPAHxZlMW775ejfy N8kA== X-Gm-Message-State: AOAM533U8+FFVDcJjZjCFGeDP/oFrNj5sSAj7JFGcTPQ18bYlwddII50 Vi0axjNTjLnDQRHA37wtlNq2FukHlZUAEtAjYWzqB51C X-Received: by 2002:a92:d28b:: with SMTP id p11mr3097565ilp.250.1627799571702; Sat, 31 Jul 2021 23:32:51 -0700 (PDT) MIME-Version: 1.0 References: <20210720155944.1447086-9-krisman@collabora.com> <20210731063818.GB18773@xsang-OptiPlex-9020> <87lf5mi7mv.fsf@collabora.com> In-Reply-To: <87lf5mi7mv.fsf@collabora.com> From: Amir Goldstein Date: Sun, 1 Aug 2021 09:32:40 +0300 Message-ID: Subject: Re: [fsnotify] 4c40d6efc8: unixbench.score -3.3% regression To: Gabriel Krisman Bertazi Cc: 0day robot , LKML , lkp@lists.01.org, ying.huang@intel.com, feng.tang@intel.com, zhengjun.xing@linux.intel.com, Jan Kara , "Darrick J. Wong" , Theodore Tso , Dave Chinner , David Howells , Khazhismel Kumykov , linux-fsdevel , Ext4 , kernel@collabora.com, Mel Gorman , kernel test robot Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Sat, Jul 31, 2021 at 10:51 PM Gabriel Krisman Bertazi wrote: > > Amir Goldstein writes: > > > On Sat, Jul 31, 2021 at 9:20 AM kernel test robot wrote: > >> > >> > >> > >> Greeting, > >> > >> FYI, we noticed a -3.3% regression of unixbench.score due to commit: > >> > >> > >> commit: 4c40d6efc8b22b88a45c335ffd6d25b55d769f5b ("[PATCH v4 08/16] fsnotify: pass arguments of fsnotify() in struct fsnotify_event_info") > >> url: https://github.com/0day-ci/linux/commits/Gabriel-Krisman-Bertazi/File-system-wide-monitoring/20210721-001444 > >> base: https://git.kernel.org/cgit/linux/kernel/git/jack/linux-fs.git fsnotify > >> > >> in testcase: unixbench > >> on test machine: 96 threads 2 sockets Intel(R) Xeon(R) CPU @ 2.30GHz with 128G memory > >> with following parameters: > >> > >> runtime: 300s > >> nr_task: 1 > >> test: pipe > >> cpufreq_governor: performance > >> ucode: 0x4003006 > >> > >> test-description: UnixBench is the original BYTE UNIX benchmark suite aims to test performance of Unix-like system. > >> test-url: https://github.com/kdlucas/byte-unixbench > >> > >> In addition to that, the commit also has significant impact on the following tests: > >> > >> +------------------+-------------------------------------------------------------------------------------+ > >> | testcase: change | will-it-scale: will-it-scale.per_thread_ops -1.3% regression | > >> | test machine | 192 threads 4 sockets Intel(R) Xeon(R) Platinum 9242 CPU @ 2.30GHz with 192G memory | > >> | test parameters | cpufreq_governor=performance | > >> | | mode=thread | > >> | | nr_task=100% | > >> | | test=eventfd1 | > >> | | ucode=0x5003006 | > >> +------------------+-------------------------------------------------------------------------------------+ > >> > >> > >> If you fix the issue, kindly add following tag > >> Reported-by: kernel test robot > >> > > > > Gabriel, > > > > It looks like my change throws away much of the performance gain for > > small IO on pipes without any watches that was achieved by commit > > 71d734103edf ("fsnotify: Rearrange fast path to minimise overhead > > when there is no watcher"). > > > > I think the way to fix it is to lift the optimization in __fsnotify() > > to the fsnotify_parent() inline wrapper as Mel considered doing > > but was not sure it was worth the effort at the time. > > > > It's not completely trivial. I think it requires setting a flag > > MNT_FSNOTIFY_WATCHED when there are watches on the > > vfsmount. I will look into it. > > Amir, > > Since this patch is a clean up, would you mind if I drop it from my > series and base my work on top of mainline? Eventually, we can rebase > this patch, when the performance issue is addressed. > > I ask because I'm about to send a v5 and I'm not sure if I should wait > to have this fixed. I guess you mean that you want to add the sb to fsnotify() args list. I don't mind, it's up to Jan. Thanks, Amir.