oe-lkp.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: Jan Kara <jack@suse.cz>
To: Amir Goldstein <amir73il@gmail.com>
Cc: Jan Kara <jack@suse.cz>,
	kernel test robot <oliver.sang@intel.com>,
	oe-lkp@lists.linux.dev, lkp@intel.com,
	Linux Memory Management List <linux-mm@kvack.org>,
	linux-fsdevel@vger.kernel.org, ying.huang@intel.com,
	feng.tang@intel.com, fengwei.yin@intel.com
Subject: Re: [linux-next:master] [fsnotify] a5e57b4d37: stress-ng.full.ops_per_sec -17.3% regression
Date: Fri, 12 Apr 2024 17:04:32 +0200	[thread overview]
Message-ID: <20240412150432.4tt3w26fsfifwx5k@quack3> (raw)
In-Reply-To: <CAOQ4uxj_KnD3uZPTt6HR3sRynsHOxqH4YcyJG5pb-12dWQNDQw@mail.gmail.com>

On Thu 11-04-24 19:22:29, Amir Goldstein wrote:
> On Thu, Apr 11, 2024 at 2:54 PM Jan Kara <jack@suse.cz> wrote:
> >
> > On Thu 11-04-24 12:23:34, Amir Goldstein wrote:
> > > On Thu, Apr 11, 2024 at 4:42 AM kernel test robot <oliver.sang@intel.com> wrote:
> > > > for "[amir73il:fsnotify-sbconn] [fsnotify]  629f30e073: unixbench.throughput 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 branches 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_per_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/full,
> > > so the fsnotify_sb_info object would be that of devtmpfs.
> > >
> > > I think that the permission events on special files are not very relevant,
> > > but I am not sure.
> > >
> > > Jan, any ideas?
> >
> > So I'm not 100% sure but this load simply seems to run 'stress-ng' with all
> > 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 ą  3%      -0.2        0.21 ą  5%  perf-profile.self.cycles-pp.__fsnotify_parent
> >       0.00            +2.8        2.79 ą  5%  perf-profile.self.cycles-pp.fsnotify_open_perm
> >
> > or
> >
> >       1.77 ą 12%      +1.9        3.64 ą  8%  perf-profile.calltrace.cycles-pp.rw_verify_area.vfs_read.__x64_sys_pread64.do_syscall_64.entry_SYSCALL_64_after_hwframe
> >       1.71 ą 15%      +1.9        3.64 ą  9%  perf-profile.calltrace.cycles-pp.rw_verify_area.vfs_read.ksys_read.do_syscall_64.entry_SYSCALL_64_after_hwframe
> >       0.00            +2.8        2.79 ą  5%  perf-profile.calltrace.cycles-pp.fsnotify_open_perm.do_dentry_open.do_open.path_openat.do_filp_open
> >
> > 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 now
> > 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 file
> > 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?

Ah, now that I've investigated the LKP details again, you're indeed right.
repro-script shows how stress-ng is run and when I do that with cloned
stress-ng repository, it is the test using /dev/full.

So with that I'm not sure why patch adds so much cost to fsnotify_file()...


								Honza
-- 
Jan Kara <jack@suse.com>
SUSE Labs, CR

      reply	other threads:[~2024-04-12 15:04 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-11  1:42 [linux-next:master] [fsnotify] a5e57b4d37: stress-ng.full.ops_per_sec -17.3% regression kernel test robot
2024-04-11  9:23 ` Amir Goldstein
2024-04-11 11:54   ` Jan Kara
2024-04-11 16:22     ` Amir Goldstein
2024-04-12 15:04       ` Jan Kara [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240412150432.4tt3w26fsfifwx5k@quack3 \
    --to=jack@suse.cz \
    --cc=amir73il@gmail.com \
    --cc=feng.tang@intel.com \
    --cc=fengwei.yin@intel.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=lkp@intel.com \
    --cc=oe-lkp@lists.linux.dev \
    --cc=oliver.sang@intel.com \
    --cc=ying.huang@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).