linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: kernel test robot <oliver.sang@intel.com>
Cc: Frederic Weisbecker <frederic@kernel.org>,
	Ingo Molnar <mingo@kernel.org>,
	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,
	Paul McKenney <paulmck@kernel.org>
Subject: Re: [entry]  47b8ff194c:  will-it-scale.per_process_ops -3.0% regression
Date: Thu, 13 May 2021 10:19:21 +0200	[thread overview]
Message-ID: <YJzhCX/CqrMQDB+y@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <20210428071653.GC13086@xsang-OptiPlex-9020>

On Wed, Apr 28, 2021 at 03:16:53PM +0800, kernel test robot wrote:
> 
> 
> Greeting,
> 
> FYI, we noticed a -3.0% regression of will-it-scale.per_process_ops due to commit:
> 
> 
> commit: 47b8ff194c1fd73d58dc339b597d466fe48c8958 ("entry: Explicitly flush pending rcuog wakeup before last rescheduling point")

So the RCU bits are in rcu_user_enter(), which is called from
__context_tracking_enter() aka user_enter(), which is under
context_tracking_enabled().

But the new code in entry is not; we now unconditionally call
rcu_nocb_flush_deferred_wakeup(). Did that want to be under
context_tracking_enabled() as well?

Frederic, Paul?

---

diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h
index 9455476c5ba2..f4df001410fc 100644
--- a/include/linux/rcupdate.h
+++ b/include/linux/rcupdate.h
@@ -114,7 +114,12 @@ static inline void rcu_user_exit(void) { }
 void rcu_init_nohz(void);
 int rcu_nocb_cpu_offload(int cpu);
 int rcu_nocb_cpu_deoffload(int cpu);
-void rcu_nocb_flush_deferred_wakeup(void);
+void __rcu_nocb_flush_deferred_wakeup(void);
+static inline void rcu_nocb_flush_deferred_wakeup(void)
+{
+	if (context_tracking_enabled())
+		__rcu_nocb_flush_deferred_wakeup();
+}
 #else /* #ifdef CONFIG_RCU_NOCB_CPU */
 static inline void rcu_init_nohz(void) { }
 static inline int rcu_nocb_cpu_offload(int cpu) { return -EINVAL; }
diff --git a/kernel/rcu/tree_plugin.h b/kernel/rcu/tree_plugin.h
index ad0156b86937..3cdbbf7fba01 100644
--- a/kernel/rcu/tree_plugin.h
+++ b/kernel/rcu/tree_plugin.h
@@ -2378,7 +2378,7 @@ static bool do_nocb_deferred_wakeup(struct rcu_data *rdp)
 	return false;
 }
 
-void rcu_nocb_flush_deferred_wakeup(void)
+void __rcu_nocb_flush_deferred_wakeup(void)
 {
 	do_nocb_deferred_wakeup(this_cpu_ptr(&rcu_data));
 }


  reply	other threads:[~2021-05-13  8:20 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-28  7:16 [entry] 47b8ff194c: will-it-scale.per_process_ops -3.0% regression kernel test robot
2021-05-13  8:19 ` Peter Zijlstra [this message]
2021-05-13 17:46   ` Paul E. McKenney
2021-05-13 23:11     ` Frederic Weisbecker
2021-05-14 10:13       ` Peter Zijlstra
2021-05-19  5:27         ` Oliver Sang
2021-05-23 13:26           ` Frederic Weisbecker
2021-05-26  6:20             ` Oliver Sang

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=YJzhCX/CqrMQDB+y@hirez.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=feng.tang@intel.com \
    --cc=frederic@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=lkp@lists.01.org \
    --cc=mingo@kernel.org \
    --cc=oliver.sang@intel.com \
    --cc=paulmck@kernel.org \
    --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;
as well as URLs for NNTP newsgroup(s).