public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [paulmck-rcu:locktorture.2023.08.17a 14/20] kernel/rcu/tree.c:4100:6: warning: no previous declaration for 'rcu_barrier_throttled'
@ 2023-08-18  1:02 kernel test robot
  2023-08-18  3:24 ` Paul E. McKenney
  0 siblings, 1 reply; 2+ messages in thread
From: kernel test robot @ 2023-08-18  1:02 UTC (permalink / raw)
  To: Paul E. McKenney; +Cc: oe-kbuild-all, linux-kernel

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git locktorture.2023.08.17a
head:   ccd7c62460a1ca6a8fb800de0d50d973ba62dcb8
commit: 365332de5f7bd1ab448ad4a6bd73a4fc8f1cc8ec [14/20] rcu: Add sysfs to provide throttled access to rcu_barrier()
config: x86_64-randconfig-x071-20230818 (https://download.01.org/0day-ci/archive/20230818/202308180853.brWVZKoo-lkp@intel.com/config)
compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0
reproduce: (https://download.01.org/0day-ci/archive/20230818/202308180853.brWVZKoo-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202308180853.brWVZKoo-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> kernel/rcu/tree.c:4100:6: warning: no previous declaration for 'rcu_barrier_throttled' [-Wmissing-declarations]
    void rcu_barrier_throttled(void)
         ^~~~~~~~~~~~~~~~~~~~~


vim +/rcu_barrier_throttled +4100 kernel/rcu/tree.c

  4083	
  4084	/**
  4085	 * rcu_barrier_throttled - Do rcu_barrier(), but limit to one per second
  4086	 *
  4087	 * This can be thought of as guard rails around rcu_barrier() that
  4088	 * permits unrestricted userspace use, at least assuming the hardware's
  4089	 * try_cmpxchg() is robust.  There will be at most one call per second to
  4090	 * rcu_barrier() system-wide from use of this function, which means that
  4091	 * callers might needlessly wait a second or three.
  4092	 *
  4093	 * This is intended for use by test suites to avoid OOM by flushing RCU
  4094	 * callbacks from the previous test before starting the next.  See the
  4095	 * rcutree.do_rcu_barrier module parameter for more information.
  4096	 *
  4097	 * Why not simply make rcu_barrier() more scalable?  That might be the
  4098	 * eventual endpoint, but let's keep it simple for the time being.
  4099	 */
> 4100	void rcu_barrier_throttled(void)
  4101	{
  4102		unsigned long j = jiffies;
  4103		unsigned long old = READ_ONCE(rcu_barrier_last_throttle);
  4104		unsigned long s = rcu_seq_snap(&rcu_state.barrier_sequence);
  4105	
  4106		while (time_after(old + HZ, j) || !try_cmpxchg(&rcu_barrier_last_throttle, &old, j + HZ)) {
  4107			schedule_timeout_idle(HZ);
  4108			if (rcu_seq_done(&rcu_state.barrier_sequence, s))
  4109				return;
  4110			old = READ_ONCE(rcu_barrier_last_throttle);
  4111		}
  4112		rcu_barrier();
  4113	}
  4114	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

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

* Re: [paulmck-rcu:locktorture.2023.08.17a 14/20] kernel/rcu/tree.c:4100:6: warning: no previous declaration for 'rcu_barrier_throttled'
  2023-08-18  1:02 [paulmck-rcu:locktorture.2023.08.17a 14/20] kernel/rcu/tree.c:4100:6: warning: no previous declaration for 'rcu_barrier_throttled' kernel test robot
@ 2023-08-18  3:24 ` Paul E. McKenney
  0 siblings, 0 replies; 2+ messages in thread
From: Paul E. McKenney @ 2023-08-18  3:24 UTC (permalink / raw)
  To: kernel test robot; +Cc: oe-kbuild-all, linux-kernel

On Fri, Aug 18, 2023 at 09:02:35AM +0800, kernel test robot wrote:
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git locktorture.2023.08.17a
> head:   ccd7c62460a1ca6a8fb800de0d50d973ba62dcb8
> commit: 365332de5f7bd1ab448ad4a6bd73a4fc8f1cc8ec [14/20] rcu: Add sysfs to provide throttled access to rcu_barrier()
> config: x86_64-randconfig-x071-20230818 (https://download.01.org/0day-ci/archive/20230818/202308180853.brWVZKoo-lkp@intel.com/config)
> compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0
> reproduce: (https://download.01.org/0day-ci/archive/20230818/202308180853.brWVZKoo-lkp@intel.com/reproduce)
> 
> If you fix the issue in a separate patch/commit (i.e. not just a new version of
> the same patch/commit), kindly add following tags
> | Reported-by: kernel test robot <lkp@intel.com>
> | Closes: https://lore.kernel.org/oe-kbuild-all/202308180853.brWVZKoo-lkp@intel.com/
> 
> All warnings (new ones prefixed by >>):
> 
> >> kernel/rcu/tree.c:4100:6: warning: no previous declaration for 'rcu_barrier_throttled' [-Wmissing-declarations]
>     void rcu_barrier_throttled(void)
>          ^~~~~~~~~~~~~~~~~~~~~

This has since been declared static in a later version of this commit at:

f9d771b016ca ("rcu: Add sysfs to provide throttled access to rcu_barrier()")

Thank you for your testing efforts!

							Thanx, Paul

> vim +/rcu_barrier_throttled +4100 kernel/rcu/tree.c
> 
>   4083	
>   4084	/**
>   4085	 * rcu_barrier_throttled - Do rcu_barrier(), but limit to one per second
>   4086	 *
>   4087	 * This can be thought of as guard rails around rcu_barrier() that
>   4088	 * permits unrestricted userspace use, at least assuming the hardware's
>   4089	 * try_cmpxchg() is robust.  There will be at most one call per second to
>   4090	 * rcu_barrier() system-wide from use of this function, which means that
>   4091	 * callers might needlessly wait a second or three.
>   4092	 *
>   4093	 * This is intended for use by test suites to avoid OOM by flushing RCU
>   4094	 * callbacks from the previous test before starting the next.  See the
>   4095	 * rcutree.do_rcu_barrier module parameter for more information.
>   4096	 *
>   4097	 * Why not simply make rcu_barrier() more scalable?  That might be the
>   4098	 * eventual endpoint, but let's keep it simple for the time being.
>   4099	 */
> > 4100	void rcu_barrier_throttled(void)
>   4101	{
>   4102		unsigned long j = jiffies;
>   4103		unsigned long old = READ_ONCE(rcu_barrier_last_throttle);
>   4104		unsigned long s = rcu_seq_snap(&rcu_state.barrier_sequence);
>   4105	
>   4106		while (time_after(old + HZ, j) || !try_cmpxchg(&rcu_barrier_last_throttle, &old, j + HZ)) {
>   4107			schedule_timeout_idle(HZ);
>   4108			if (rcu_seq_done(&rcu_state.barrier_sequence, s))
>   4109				return;
>   4110			old = READ_ONCE(rcu_barrier_last_throttle);
>   4111		}
>   4112		rcu_barrier();
>   4113	}
>   4114	
> 
> -- 
> 0-DAY CI Kernel Test Service
> https://github.com/intel/lkp-tests/wiki

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

end of thread, other threads:[~2023-08-18  3:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-18  1:02 [paulmck-rcu:locktorture.2023.08.17a 14/20] kernel/rcu/tree.c:4100:6: warning: no previous declaration for 'rcu_barrier_throttled' kernel test robot
2023-08-18  3:24 ` Paul E. McKenney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox