mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jan Kara <jack@suse.cz>
To: NeilBrown <neilb@suse.de>
Cc: Jan Kara <jack@suse.cz>,
	kernel test robot <rong.a.chen@intel.com>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Christoph Hellwig <hch@lst.de>,
	Trond Myklebust <trond.myklebust@hammerspace.com>,
	Chuck Lever <chuck.lever@oracle.com>,
	LKML <linux-kernel@vger.kernel.org>,
	lkp@lists.01.org, lkp@intel.com, ying.huang@intel.com,
	feng.tang@intel.com, zhengjun.xing@intel.com
Subject: Re: [mm/writeback] 8d92890bd6: will-it-scale.per_process_ops -15.3% regression
Date: Thu, 15 Oct 2020 11:12:54 +0200	[thread overview]
Message-ID: <20201015091254.GB7037@quack2.suse.cz> (raw)
In-Reply-To: <20201015090843.GA7037@quack2.suse.cz>

[-- Attachment #1: Type: text/plain, Size: 2334 bytes --]

On Thu 15-10-20 11:08:43, Jan Kara wrote:
> On Thu 15-10-20 08:46:01, NeilBrown wrote:
> > On Wed, Oct 14 2020, Jan Kara wrote:
> > 
> > > On Wed 14-10-20 16:47:06, kernel test robot wrote:
> > >> Greeting,
> > >> 
> > >> FYI, we noticed a -15.3% regression of will-it-scale.per_process_ops due
> > >> to commit:
> > >> 
> > >> commit: 8d92890bd6b8502d6aee4b37430ae6444ade7a8c ("mm/writeback: discard
> > >> NR_UNSTABLE_NFS, use NR_WRITEBACK instead")
> > >> https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git master
> > >
> > > Thanks for report but it doesn't quite make sense to me. If we omit
> > > reporting & NFS changes in that commit (which is code not excercised by
> > > this benchmark), what remains are changes like:
> > >
> > >         nr_pages += node_page_state(pgdat, NR_FILE_DIRTY);
> > > -       nr_pages += node_page_state(pgdat, NR_UNSTABLE_NFS);
> > >         nr_pages += node_page_state(pgdat, NR_WRITEBACK);
> > > ...
> > > -               nr_reclaimable = global_node_page_state(NR_FILE_DIRTY) +
> > > -                                       global_node_page_state(NR_UNSTABLE_NFS);
> > > +               nr_reclaimable = global_node_page_state(NR_FILE_DIRTY);
> > > ...
> > > -       gdtc->dirty = global_node_page_state(NR_FILE_DIRTY) +
> > > -                     global_node_page_state(NR_UNSTABLE_NFS);
> > > +       gdtc->dirty = global_node_page_state(NR_FILE_DIRTY);
> > >
> > > So if there's any negative performance impact of these changes, they're
> > > likely due to code alignment changes or something like that... So I don't
> > > think there's much to do here since optimal code alignment is highly specific
> > > to a particular CPU etc.
> > 
> > I agree, it seems odd.
> > 
> > Removing NR_UNSTABLE_NFS from enum node_stat_item would renumber all the
> > following value and would, I think, change NR_DIRTIED from 32 to 31.
> > Might that move something to a different cache line and change some
> > contention?
> 
> Interesting theory, it could be possible.
> 
> > That would be easy enough to test: just re-add NR_UNSTABLE_NFS.
> 
> Yeah, easy enough to test. Patch for this is attached. 0-day people, can
> you check whether applying this patch changes anything in your perf
> numbers?

Forgot the patch. Attached now.

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

[-- Attachment #2: 0001-mm-Add-NR_UNSTABLE_NFS-stat-item.patch --]
[-- Type: text/x-patch, Size: 722 bytes --]

From 011b4cea33dd251f94e03ff58b0f52b688f747e1 Mon Sep 17 00:00:00 2001
From: Jan Kara <jack@suse.cz>
Date: Thu, 15 Oct 2020 10:56:30 +0200
Subject: [PATCH] mm: Add NR_UNSTABLE_NFS stat item

Signed-off-by: Jan Kara <jack@suse.cz>
---
 include/linux/mmzone.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h
index 0f7a4ff4b059..9ac48bb749f4 100644
--- a/include/linux/mmzone.h
+++ b/include/linux/mmzone.h
@@ -196,6 +196,7 @@ enum node_stat_item {
 	NR_FILE_THPS,
 	NR_FILE_PMDMAPPED,
 	NR_ANON_THPS,
+	NR_UNSTABLE_NFS,
 	NR_VMSCAN_WRITE,
 	NR_VMSCAN_IMMEDIATE,	/* Prioritise for reclaim when writeback ends */
 	NR_DIRTIED,		/* page dirtyings since bootup */
-- 
2.16.4


  reply	other threads:[~2020-10-15  9:13 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-14  8:47 kernel test robot
2020-10-14 10:19 ` Jan Kara
2020-10-14 21:46   ` NeilBrown
2020-10-15  9:08     ` Jan Kara
2020-10-15  9:12       ` Jan Kara [this message]
2020-10-16 14:51         ` Chen, Rong A

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=20201015091254.GB7037@quack2.suse.cz \
    --to=jack@suse.cz \
    --cc=akpm@linux-foundation.org \
    --cc=chuck.lever@oracle.com \
    --cc=feng.tang@intel.com \
    --cc=hch@lst.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=lkp@lists.01.org \
    --cc=neilb@suse.de \
    --cc=rong.a.chen@intel.com \
    --cc=torvalds@linux-foundation.org \
    --cc=trond.myklebust@hammerspace.com \
    --cc=ying.huang@intel.com \
    --cc=zhengjun.xing@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

all inboxes | Powered by JetHome®