From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7840CC4345F for ; Thu, 11 Apr 2024 16:22:44 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id E9E306B00C0; Thu, 11 Apr 2024 12:22:43 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id E50B16B00C1; Thu, 11 Apr 2024 12:22:43 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id CEFAD6B00C3; Thu, 11 Apr 2024 12:22:43 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id B17086B00C0 for ; Thu, 11 Apr 2024 12:22:43 -0400 (EDT) Received: from smtpin26.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 75BA91C1125 for ; Thu, 11 Apr 2024 16:22:43 +0000 (UTC) X-FDA: 81997769406.26.01075E5 Received: from mail-qk1-f179.google.com (mail-qk1-f179.google.com [209.85.222.179]) by imf23.hostedemail.com (Postfix) with ESMTP id A490014001D for ; Thu, 11 Apr 2024 16:22:41 +0000 (UTC) Authentication-Results: imf23.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=NxZLYgyg; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf23.hostedemail.com: domain of amir73il@gmail.com designates 209.85.222.179 as permitted sender) smtp.mailfrom=amir73il@gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1712852561; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=fpaqd4lR8cXXUejBxBp0vM8qhyGcYOiHx0i3p2D9+yg=; b=HURvK2yao09p3x8trKBSwjgikE3Re4+qNQRwZJeri4ih0DCmrb2by3T0Eij4tav2vOTMbR L9kPFQpfRdLJVoHA/5oWxLVQSg64z5yULBYNT8MrV1R0h8GNtfodFV/1To0E6lvvvJrXU7 /VZcCC+1aELPMd+fz18PYZutoxGo/Qw= ARC-Authentication-Results: i=1; imf23.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=NxZLYgyg; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf23.hostedemail.com: domain of amir73il@gmail.com designates 209.85.222.179 as permitted sender) smtp.mailfrom=amir73il@gmail.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1712852561; a=rsa-sha256; cv=none; b=Cky0EEFevvBmbct3WtRj8xeUWxvcy5sw/3UfsOmGNFiet0mvtiVvuQxCuadAg7aWigX0Ty pqepMsB8q+olPqZwYOB+VdQ2dfp6kXydNRL51dMXURZQMwRPnmGAvte6nmSNCd/d4pN37S EdE5ZAQa7QWhmCjSylBu3P6sUW/itNc= Received: by mail-qk1-f179.google.com with SMTP id af79cd13be357-78d77b309f2so144650985a.2 for ; Thu, 11 Apr 2024 09:22:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1712852561; x=1713457361; darn=kvack.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=fpaqd4lR8cXXUejBxBp0vM8qhyGcYOiHx0i3p2D9+yg=; b=NxZLYgyg8xeoXDiPyPitRQBe6bgjbW5Njjm7Fq2KeLc8ov/m20vrEjY8bmuM5HX+Wb CiUMzj1gZdyA/7rx5G6OPlmowwBi9KdX8Ns2StPpmNIUM5zlxXlYjh81f5XpN3qC8jZK C5m5RQf3Y8W4euU0ipmli9C7avyT+BMwrnzLcgX+tTy38D3rfCKWkxw0TcQrD9rpH0ue Uilg1tdo6jD+C9nVgOH2FRCgiOeJ5F4JiOvPJxEzqZzz/h/daLtfOEtl7YjEPvxy9MW1 98ehANrlEjlFcEhxge8aeUJ7y96aX1Lw2Io8yjPXTloieSq8FrafFuRfZItQkk1/xXyT 9rZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712852561; x=1713457361; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=fpaqd4lR8cXXUejBxBp0vM8qhyGcYOiHx0i3p2D9+yg=; b=WXvJkdwZOdDrxyuk9n/hrcLr3k8uQiD7dXlzksoSP5cDBSZRsIPf38/7dQO9GHlKyv wENHMZmLRnWj3C4AkqMMHAQ6mAjOCiOGn/zQ9mv1tShpsdTc5QTPLYHu986UMkgn5eEl qjpaJV47SKGuCNUo2P1QR8JpMAaWQIUPLbxvgeHZWb6vgiaW7r+yEqwqXR8aD0CSy2lw fogt5o3ltglBz9hHsglMiCPIHSMu6OpvYG7BSX21Fdu3oahvS7vAmx/yECOKB4kbpa8G mujr6D6MrH6pkMqcgKk4UrAJFIEN2btHnpn+WLB6VMIgCjyZce6t3WZoWPnfCFyphWMv J9ig== X-Forwarded-Encrypted: i=1; AJvYcCUfetcCG2goR4HkgNWcf3qkkk0PSBPZssVYm/1JTDsuJ/TLQYGuuAnjKTemwrWT1rtPdnx7jJ2r/MJjeTC1onu3aVc= X-Gm-Message-State: AOJu0Yy4x7dwz9GCQMYgWKyxV8jq8+hkA83Xf6je8e0XJfZFVjEFMkzf /VRj+zy9EK+5vnUyV4ij3j5485W0BbujpFD37EKoEVMSaJFvBz89j0R1xnvKuiIrwcZxJLuXTfH CMktsc/jVpjTf2tgdMANTQtZY6mg= X-Google-Smtp-Source: AGHT+IF1n1MmiItwvOWqgMgv4m4+n4I8Y3auG+nptwY+6Z23ewfnl3nk+P/BfPeOzUZb+UqPnkngS/WuwG3g9BJWMJk= X-Received: by 2002:a05:620a:b4a:b0:78d:61a4:6955 with SMTP id x10-20020a05620a0b4a00b0078d61a46955mr106103qkg.67.1712852560673; Thu, 11 Apr 2024 09:22:40 -0700 (PDT) MIME-Version: 1.0 References: <202404101624.85684be8-oliver.sang@intel.com> <20240411115408.266zydqiwalko5k3@quack3> In-Reply-To: <20240411115408.266zydqiwalko5k3@quack3> From: Amir Goldstein Date: Thu, 11 Apr 2024 19:22:29 +0300 Message-ID: Subject: Re: [linux-next:master] [fsnotify] a5e57b4d37: stress-ng.full.ops_per_sec -17.3% regression To: Jan Kara Cc: kernel test robot , oe-lkp@lists.linux.dev, lkp@intel.com, Linux Memory Management List , linux-fsdevel@vger.kernel.org, ying.huang@intel.com, feng.tang@intel.com, fengwei.yin@intel.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Rspam-User: X-Stat-Signature: 3wf5rt6spspckqckenz1e7n7mf5q4hgx X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: A490014001D X-HE-Tag: 1712852561-74281 X-HE-Meta: U2FsdGVkX18TlBxyHvtKSU7N2LpiDrbeVhZVJUl9JxWA0hnuDz4MAAl0Md/MLCBgMCjWOYgZs68rpwOgMiNo8gcG7ATPeWbMezoWEupn5miuc/2Fv9kpOvIN2yY8BDtjiqyYZZdz1E9SRScF40wZqq2HYBl9cEImIRl0K3Jil8k8PerskO2SvEFgH58nrXl2tHYWBTqx5JGq9dXqZ3CJW4UAg0wtXgXvuF1dhOoaWXtEVmThWgGRtDVN1E9tzlEeI8n5aJaq9GxbfUcraNziKMOwXdlxnZm7cGGpF9ulSop0hg5qF1GkZIfXtUFvG6IqlBqnZjRDYlttopojgQp4qrs4kCRM/1zMWgC2nvEjU+PRAFrGNiOlSKmwEMs0+qy9kX9EZprDMbMrAaQ9ixfn6Q1vcH2W/jKpunifG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, spamicity=0.000001, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: On Thu, Apr 11, 2024 at 2:54=E2=80=AFPM Jan Kara wrote: > > On Thu 11-04-24 12:23:34, Amir Goldstein wrote: > > On Thu, Apr 11, 2024 at 4:42=E2=80=AFAM kernel test robot wrote: > > > for "[amir73il:fsnotify-sbconn] [fsnotify] 629f30e073: unixbench.thr= oughput 5.8% improvement" > > > (https://lore.kernel.org/all/202403141505.807a722b-oliver.sang@intel.= com/) > > > you requested us to test unixbench for this commit on different branc= hes and we > > > observed consistent performance improvement. > > > > > > now we noticed this commit is merged into linux-next/master, we still > > > observed similar unixbench improvement, however, we also captured a > > > stress-ng regression now. below details FYI. > > > > > > Hello, > > > > > > kernel test robot noticed a -17.3% regression of stress-ng.full.ops_p= er_sec on: > > > > > > > > > commit: a5e57b4d370c6d320e5bfb0c919fe00aee29e039 ("fsnotify: optimize= the case of no permission event watchers") > > > > Odd. This commit does add an extra fsnotify_sb_has_priority_watchers() > > inline check for reads and writes, but the inline helper > > fsnotify_sb_has_watchers() > > already exists in fsnotify_parent() and it already accesses fsnotify_sb= _info. > > > > It seems like stress-ng.full does read/write/mmap operations on /dev/fu= ll, > > so the fsnotify_sb_info object would be that of devtmpfs. > > > > I think that the permission events on special files are not very releva= nt, > > but I am not sure. > > > > Jan, any ideas? > > So I'm not 100% sure but this load simply seems to run 'stress-ng' with a= ll > the syscalls it is able to exercise (one per CPU if I'm right). Hum... > looking at perf numbers I've noticed changes like: > > 0.43 =C4=85 3% -0.2 0.21 =C4=85 5% perf-profile.self= .cycles-pp.__fsnotify_parent > 0.00 +2.8 2.79 =C4=85 5% perf-profile.self.cycl= es-pp.fsnotify_open_perm > > or > > 1.77 =C4=85 12% +1.9 3.64 =C4=85 8% perf-profile.call= trace.cycles-pp.rw_verify_area.vfs_read.__x64_sys_pread64.do_syscall_64.ent= ry_SYSCALL_64_after_hwframe > 1.71 =C4=85 15% +1.9 3.64 =C4=85 9% perf-profile.call= trace.cycles-pp.rw_verify_area.vfs_read.ksys_read.do_syscall_64.entry_SYSCA= LL_64_after_hwframe > 0.00 +2.8 2.79 =C4=85 5% perf-profile.calltrace= .cycles-pp.fsnotify_open_perm.do_dentry_open.do_open.path_openat.do_filp_op= en > > So the savings in __fsnotify_parent() don't really outweight the costs in > fsnotify_file()... I can see stress-ng exercises also inotify so maybe > there's some contention on the counters which is causing the regression n= ow > that we have more of them? > > BTW, I'm not sure how you've arrived at the conclusing the test is using > /dev/full. For all I can tell the e.g. the stress-mmap test is using a fi= le > in a subdir of CWD. > Oh, I just saw the file stress-full.c in stress-ng and wrongly assumed that test stress-ng.full refers to this code. Where do I find the code for this test? Thanks, Amir.