All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/16] rcu/nocb: De-offload and re-offload support v3
@ 2020-10-23 14:46 Frederic Weisbecker
  2020-10-23 14:46 ` [PATCH 01/16] rcu: Implement rcu_segcblist_is_offloaded() config dependent Frederic Weisbecker
                   ` (15 more replies)
  0 siblings, 16 replies; 22+ messages in thread
From: Frederic Weisbecker @ 2020-10-23 14:46 UTC (permalink / raw)
  To: LKML
  Cc: Frederic Weisbecker, Steven Rostedt, Mathieu Desnoyers,
	Paul E . McKenney, Lai Jiangshan, Neeraj Upadhyay, Joel Fernandes,
	Josh Triplett

Hi,

This is the third attempt to make rcu-nocb mutable at runtime. See
v2 there: https://lwn.net/Articles/832031/

Many fixes included and rcutorture support:

03: Whitespace fix
04: Add "rcu/nocb: Always init segcblist on CPU up" (Thanks rcutorture!)
05: Add return value for failure on (de)offloading
06: Add "rcu/nocb: Don't deoffload an offline CPU with pending work" (Thanks Paul!)
12: Add "rcu/nocb: Only cond_resched() from actual offloaded batch processing" (Thanks rcutorture!)
14: Write a real and more self-confident changelog
15/16: Add rcutorture support (thanks Paul!)

My last remaining worry, as exposed in 13/16, is that __call_rcu_core()
isn't called during transition states. I need to see how I can handle
that.

git://git.kernel.org/pub/scm/linux/kernel/git/frederic/linux-dynticks.git
	rcu/nocb-toggle-v2

HEAD: 0247cd09fd48a38741e5cc6634810985b405baca

Thanks,
	Frederic
---

Frederic Weisbecker (15):
      rcu: Implement rcu_segcblist_is_offloaded() config dependent
      rcu: Turn enabled/offload states into a common flag
      rcu: Provide basic callback offloading state machine bits
      rcu/nocb: Always init segcblist on CPU up
      rcu: De-offloading CB kthread
      rcu/nocb: Don't deoffload an offline CPU with pending work
      rcu: De-offloading GP kthread
      rcu: Re-offload support
      rcu: Shutdown nocb timer on de-offloading
      rcu: Flush bypass before setting SEGCBLIST_SOFTIRQ_ONLY
      rcu: Set SEGCBLIST_SOFTIRQ_ONLY at the very last stage of de-offloading
      rcu/nocb: Only cond_resched() from actual offloaded batch processing
      rcu: Process batch locally as long as offloading isn't complete
      rcu: Locally accelerate callbacks as long as offloading isn't complete
      tools/rcutorture: Support nocb toggle in TREE01

Paul E. McKenney (1):
      rcutorture: Test runtime toggling of CPUs' callback offloading


 Documentation/admin-guide/kernel-parameters.txt    |   8 +
 include/linux/rcu_segcblist.h                      | 119 +++++++-
 include/linux/rcupdate.h                           |   4 +
 kernel/rcu/rcu_segcblist.c                         |  13 +-
 kernel/rcu/rcu_segcblist.h                         |  45 ++-
 kernel/rcu/rcutorture.c                            |  86 +++++-
 kernel/rcu/tree.c                                  |  47 +--
 kernel/rcu/tree.h                                  |   2 +
 kernel/rcu/tree_plugin.h                           | 330 +++++++++++++++++++--
 .../selftests/rcutorture/configs/rcu/TREE01.boot   |   4 +-
 10 files changed, 603 insertions(+), 55 deletions(-)

^ permalink raw reply	[flat|nested] 22+ messages in thread
* Re: [PATCH 09/16] rcu: Shutdown nocb timer on de-offloading
@ 2020-10-24  8:00 kernel test robot
  0 siblings, 0 replies; 22+ messages in thread
From: kernel test robot @ 2020-10-24  8:00 UTC (permalink / raw)
  To: kbuild

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

CC: kbuild-all(a)lists.01.org
In-Reply-To: <20201023144649.53046-10-frederic@kernel.org>
References: <20201023144649.53046-10-frederic@kernel.org>
TO: Frederic Weisbecker <frederic@kernel.org>

Hi Frederic,

I love your patch! Perhaps something to improve:

[auto build test WARNING on rcu/rcu/next]
[also build test WARNING on linus/master linux/master v5.9 next-20201023]
[cannot apply to rcu/dev]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Frederic-Weisbecker/rcu-nocb-De-offload-and-re-offload-support-v3/20201023-225141
base:   https://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git rcu/next
:::::: branch date: 17 hours ago
:::::: commit date: 17 hours ago
config: x86_64-randconfig-m001-20201022 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>

smatch warnings:
kernel/rcu/tree_plugin.h:2346 __rcu_nocb_rdp_deoffload() error: double locked 'rdp->nocb_lock' (orig line 2331)

vim +2346 kernel/rcu/tree_plugin.h

300d16f8983ddae Frederic Weisbecker 2020-10-23  2322  
300d16f8983ddae Frederic Weisbecker 2020-10-23  2323  static int __rcu_nocb_rdp_deoffload(struct rcu_data *rdp)
300d16f8983ddae Frederic Weisbecker 2020-10-23  2324  {
300d16f8983ddae Frederic Weisbecker 2020-10-23  2325  	struct rcu_segcblist *cblist = &rdp->cblist;
300d16f8983ddae Frederic Weisbecker 2020-10-23  2326  	unsigned long flags;
300d16f8983ddae Frederic Weisbecker 2020-10-23  2327  	int ret;
300d16f8983ddae Frederic Weisbecker 2020-10-23  2328  
300d16f8983ddae Frederic Weisbecker 2020-10-23  2329  	printk("De-offloading %d\n", rdp->cpu);
300d16f8983ddae Frederic Weisbecker 2020-10-23  2330  
300d16f8983ddae Frederic Weisbecker 2020-10-23 @2331  	rcu_nocb_lock_irqsave(rdp, flags);
300d16f8983ddae Frederic Weisbecker 2020-10-23  2332  	/*
300d16f8983ddae Frederic Weisbecker 2020-10-23  2333  	 * If there are still pending work offloaded, the offline
300d16f8983ddae Frederic Weisbecker 2020-10-23  2334  	 * CPU won't help much handling them.
300d16f8983ddae Frederic Weisbecker 2020-10-23  2335  	 */
300d16f8983ddae Frederic Weisbecker 2020-10-23  2336  	if (cpu_is_offline(rdp->cpu) && !rcu_segcblist_empty(&rdp->cblist)) {
300d16f8983ddae Frederic Weisbecker 2020-10-23  2337  		rcu_nocb_unlock_irqrestore(rdp, flags);
300d16f8983ddae Frederic Weisbecker 2020-10-23  2338  		return -EBUSY;
300d16f8983ddae Frederic Weisbecker 2020-10-23  2339  	}
300d16f8983ddae Frederic Weisbecker 2020-10-23  2340  
300d16f8983ddae Frederic Weisbecker 2020-10-23  2341  	ret = rdp_offload_toggle(rdp, false, flags);
c0e5a01d6376324 Frederic Weisbecker 2020-10-23  2342  	swait_event_exclusive(rdp->nocb_state_wq,
c0e5a01d6376324 Frederic Weisbecker 2020-10-23  2343  			      !rcu_segcblist_test_flags(cblist, SEGCBLIST_KTHREAD_CB |
c0e5a01d6376324 Frederic Weisbecker 2020-10-23  2344  							SEGCBLIST_KTHREAD_GP));
d16825b53f7bb29 Frederic Weisbecker 2020-10-23  2345  	/* Make sure nocb timer won't stay around */
d16825b53f7bb29 Frederic Weisbecker 2020-10-23 @2346  	rcu_nocb_lock_irqsave(rdp, flags);
d16825b53f7bb29 Frederic Weisbecker 2020-10-23  2347  	WRITE_ONCE(rdp->nocb_defer_wakeup, RCU_NOCB_WAKE_OFF);
d16825b53f7bb29 Frederic Weisbecker 2020-10-23  2348  	rcu_nocb_unlock_irqrestore(rdp, flags);
d16825b53f7bb29 Frederic Weisbecker 2020-10-23  2349  	del_timer_sync(&rdp->nocb_timer);
d16825b53f7bb29 Frederic Weisbecker 2020-10-23  2350  
300d16f8983ddae Frederic Weisbecker 2020-10-23  2351  	return ret;
59c271e6ebf08a3 Frederic Weisbecker 2020-10-23  2352  }
59c271e6ebf08a3 Frederic Weisbecker 2020-10-23  2353  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 35992 bytes --]

^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2020-11-04 14:45 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-10-23 14:46 [PATCH 00/16] rcu/nocb: De-offload and re-offload support v3 Frederic Weisbecker
2020-10-23 14:46 ` [PATCH 01/16] rcu: Implement rcu_segcblist_is_offloaded() config dependent Frederic Weisbecker
2020-10-23 14:46 ` [PATCH 02/16] rcu: Turn enabled/offload states into a common flag Frederic Weisbecker
2020-10-23 14:46 ` [PATCH 03/16] rcu: Provide basic callback offloading state machine bits Frederic Weisbecker
2020-10-23 14:46 ` [PATCH 04/16] rcu/nocb: Always init segcblist on CPU up Frederic Weisbecker
2020-10-23 14:46 ` [PATCH 05/16] rcu: De-offloading CB kthread Frederic Weisbecker
2020-11-02 13:38   ` Boqun Feng
2020-11-04 14:31     ` Frederic Weisbecker
2020-11-04 14:42       ` Boqun Feng
2020-11-04 14:45         ` Frederic Weisbecker
2020-10-23 14:46 ` [PATCH 06/16] rcu/nocb: Don't deoffload an offline CPU with pending work Frederic Weisbecker
2020-10-23 14:46 ` [PATCH 07/16] rcu: De-offloading GP kthread Frederic Weisbecker
2020-10-23 14:46 ` [PATCH 08/16] rcu: Re-offload support Frederic Weisbecker
2020-10-23 14:46 ` [PATCH 09/16] rcu: Shutdown nocb timer on de-offloading Frederic Weisbecker
2020-10-23 14:46 ` [PATCH 10/16] rcu: Flush bypass before setting SEGCBLIST_SOFTIRQ_ONLY Frederic Weisbecker
2020-10-23 14:46 ` [PATCH 11/16] rcu: Set SEGCBLIST_SOFTIRQ_ONLY at the very last stage of de-offloading Frederic Weisbecker
2020-10-23 14:46 ` [PATCH 12/16] rcu/nocb: Only cond_resched() from actual offloaded batch processing Frederic Weisbecker
2020-10-23 14:46 ` [PATCH 13/16] rcu: Process batch locally as long as offloading isn't complete Frederic Weisbecker
2020-10-23 14:46 ` [PATCH 14/16] rcu: Locally accelerate callbacks " Frederic Weisbecker
2020-10-23 14:46 ` [PATCH 15/16] rcutorture: Test runtime toggling of CPUs' callback offloading Frederic Weisbecker
2020-10-23 14:46 ` [PATCH 16/16] tools/rcutorture: Support nocb toggle in TREE01 Frederic Weisbecker
  -- strict thread matches above, loose matches on Subject: below --
2020-10-24  8:00 [PATCH 09/16] rcu: Shutdown nocb timer on de-offloading kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.