Re: [PATCH V2 Resend 0/4] Create sched_select_cpu() and use it for workqueues and timers

2012-11-26 Thread Paul E. McKenney
On Mon, Nov 26, 2012 at 11:40:27AM -0500, Steven Rostedt wrote: > On Mon, 2012-11-26 at 20:30 +0530, Viresh Kumar wrote: > > On 6 November 2012 16:08, Viresh Kumar wrote: > > > This is V2 Resend of my sched_select_cpu() work. Resend because didn't > > > got much > > > attention on V2. Including m

Re: [PATCH V2 Resend 0/4] Create sched_select_cpu() and use it for workqueues and timers

2012-11-26 Thread Paul E. McKenney
On Mon, Nov 26, 2012 at 12:35:52PM -0500, Steven Rostedt wrote: > On Mon, 2012-11-26 at 09:03 -0800, Paul E. McKenney wrote: > > > > If I understand correctly (though also suffering turkey OD), the idea is > > to offload work to more energy-efficient CPUs. > > This

Re: [RFC PATCH] Fix abnormal rcu dynticks_nesting values related to async page fault

2012-11-27 Thread Paul E. McKenney
On Tue, Nov 27, 2012 at 09:01:33AM -0500, Sasha Levin wrote: > On 11/27/2012 08:07 AM, Gleb Natapov wrote: > > Those rcu_irq_enter()/rcu_irq_exit() were introduced by commit > > c5e015d4949aa665 "KVM guest: exit idleness when handling > > KVM_PV_REASON_PAGE_NOT_PRESENT", but now I am starting to qu

Re: [PATCH rcu] use new nesting value for rcu_dyntick trace in rcu_eqs_enter_common

2012-11-27 Thread Paul E. McKenney
On Tue, Nov 27, 2012 at 01:58:27PM +0800, Li Zhong wrote: > This patch uses the real new value of dynticks_nesting instead of 0 in > rcu_eqs_enter_common(). > > Signed-off-by: Li Zhong Good catch! Queued for 3.9. Thanx, Paul > --- > ke

Re: [RFC PATCH] Fix abnormal rcu dynticks_nesting values related to async page fault

2012-11-27 Thread Paul E. McKenney
On Tue, Nov 27, 2012 at 04:39:59PM +0100, Frederic Weisbecker wrote: > 2012/11/27 Li Zhong : > > I noticed some warnings complaining about dynticks_nesting value, like > > > > [ 267.545032] [ cut here ] > > [ 267.545032] WARNING: at kernel/rcutree.c:382 rcu_eqs_enter+0xab/

Re: [RFC PATCH] Fix abnormal rcu dynticks_nesting values related to async page fault

2012-11-27 Thread Paul E. McKenney
On Tue, Nov 27, 2012 at 04:56:30PM +0100, Frederic Weisbecker wrote: > 2012/11/27 Gleb Natapov : > > For KVM_PV_REASON_PAGE_NOT_PRESENT it behaves like an exception. > > Ok. > There seem to be a bug in kvm_async_pf_task_wait(). Using > idle_cpu(cpu) to find out if the current task is the idle task

Re: [RFC PATCH] Fix abnormal rcu dynticks_nesting values related to async page fault

2012-11-27 Thread Paul E. McKenney
On Tue, Nov 27, 2012 at 05:48:18PM +0100, Frederic Weisbecker wrote: > 2012/11/27 Paul E. McKenney : > > On Tue, Nov 27, 2012 at 04:56:30PM +0100, Frederic Weisbecker wrote: > >> 2012/11/27 Gleb Natapov : > >> > For KVM_PV_REASON_PAGE_NOT_PRESENT it behaves l

Re: [PATCH] context_tracking: New context tracking susbsystem

2012-11-27 Thread Paul E. McKenney
step to > shutdown the tick while still accounting the cputime. I have queued this, and if it passes tests and inspection will try pushing it for 3.8. Thanx, Paul > Signed-off-by: Frederic Weisbecker > Cc: Andrew Morton >

Re: [PATCH] context_tracking: New context tracking susbsystem

2012-11-27 Thread Paul E. McKenney
On Tue, Nov 27, 2012 at 08:50:38PM -0500, Steven Rostedt wrote: > On Tue, 2012-11-27 at 16:59 -0800, Paul E. McKenney wrote: > > On Tue, Nov 27, 2012 at 07:33:25PM +0100, Frederic Weisbecker wrote: > > > Create a new subsystem that probes on kernel boundaries > > > to ke

Re: [PATCH] context_tracking: New context tracking susbsystem

2012-11-29 Thread Paul E. McKenney
On Thu, Nov 29, 2012 at 11:30:19AM +0100, Frederic Weisbecker wrote: > 2012/11/29 Li Zhong : > > On Tue, 2012-11-27 at 19:33 +0100, Frederic Weisbecker wrote: > > [] > >> - > >> - WARN_ON_ONCE(!current->mm); > >> - > >> - local_irq_save(flags); > >> - rdtp = &__get_cpu_var(rcu_dynti

Re: kernel/rcutree.c:2850:13: warning: array subscript is above array bounds

2012-11-29 Thread Paul E. McKenney
On Thu, Nov 29, 2012 at 02:47:52PM +0100, Markus Trippelsdorf wrote: > With gcc-4.8 I get: > > CC kernel/rcutree.o > kernel/rcutree.c: In function ‘rcu_init_one’: > kernel/rcutree.c:2850:13: warning: array subscript is above array bounds > [-Warray-bounds] > rsp->level[i] = rsp->l

Re: kernel/rcutree.c:2850:13: warning: array subscript is above array bounds

2012-11-29 Thread Paul E. McKenney
On Thu, Nov 29, 2012 at 06:43:58PM +0100, Markus Trippelsdorf wrote: > On 2012.11.29 at 09:02 -0800, Paul E. McKenney wrote: > > On Thu, Nov 29, 2012 at 02:47:52PM +0100, Markus Trippelsdorf wrote: > > > With gcc-4.8 I get: > > > > > > CC kernel/rc

Re: kernel/rcutree.c:2850:13: warning: array subscript is above array bounds

2012-11-29 Thread Paul E. McKenney
On Thu, Nov 29, 2012 at 07:22:54PM +0100, Markus Trippelsdorf wrote: > On 2012.11.29 at 10:10 -0800, Paul E. McKenney wrote: > > On Thu, Nov 29, 2012 at 06:43:58PM +0100, Markus Trippelsdorf wrote: > > > On 2012.11.29 at 09:02 -0800, Paul E. McKenney wrote: > > > >

Re: kernel/rcutree.c:2850:13: warning: array subscript is above array bounds

2012-11-29 Thread Paul E. McKenney
On Thu, Nov 29, 2012 at 09:03:21PM +0100, Markus Trippelsdorf wrote: > On 2012.11.29 at 11:19 -0800, Paul E. McKenney wrote: > > On Thu, Nov 29, 2012 at 07:22:54PM +0100, Markus Trippelsdorf wrote: > > > On 2012.11.29 at 10:10 -0800, Paul E. McKenney wrote: > > > >

Re: [PATCH 8/8] srcu: use ACCESS_ONCE() to access sp->completed in srcu_read_lock()

2012-11-29 Thread Paul E. McKenney
On Thu, Nov 29, 2012 at 04:46:09PM +0800, Lai Jiangshan wrote: > Old srcu implement requires sp->completed is loaded in > RCU-sched(preempt_disable()) section. > > The new srcu is now not RCU-sched based, it doesn't require the load of > sp->completed and the access to counter must be in the same

Re: linux-next: manual merge of the rcu tree with Linus' tree

2012-11-29 Thread Paul E. McKenney
On Thu, Nov 29, 2012 at 02:06:51PM +1100, Stephen Rothwell wrote: > Hi Paul, > > Today's linux-next merge of the rcu tree got a conflict in > arch/x86/kernel/ptrace.c between commit cb57a2b4cff7 ("x86-32: Export > kernel_stack_pointer() for modules") from Linus' tree and commit > 98dbec158343 ("co

Re: + atomic-improve-atomic_inc_unless_negative-atomic_dec_unless_positive .patch added to -mm tree

2013-03-18 Thread Paul E. McKenney
On Sat, Mar 16, 2013 at 07:30:22PM +0100, Oleg Nesterov wrote: > On 03/15, Paul E. McKenney wrote: > > > > On Fri, Mar 15, 2013 at 07:34:32PM +0100, Frederic Weisbecker wrote: > > > 2013/3/15 Oleg Nesterov : > > > > > > > > My point was: sho

[PATCH] nohz1: Documentation

2013-03-18 Thread Paul E. McKenney
First attempt at documentation for adaptive ticks. Thoughts? Thanx, Paul nohz1: Documentation Signed-off-by: Paul E. McKenney diff --git a/Documentation/timers

[PATCH tip/core/rcu 0/2] Documentation changes for 3.9

2013-03-18 Thread Paul E. McKenney
Hello! This series contains the following changes to RCU documentation: 1. Make the bugginess of a code sample more apparent with all-caps comments. 2. RCU documentation update based on review motivated by the first commit.

[PATCH tip/core/rcu 2/2] rcu: Documentation update

2013-03-18 Thread Paul E. McKenney
From: "Paul E. McKenney" This commit applies a few updates based on a quick review of the RCU documentations. Signed-off-by: Paul E. McKenney --- Documentation/RCU/checklist.txt | 26 -- Documentation/RCU/lockdep.txt| 5 + Documentation/RCU/rcub

[PATCH tip/core/rcu 1/2] rcu: Make bugginess of code sample more evident

2013-03-18 Thread Paul E. McKenney
From: "Paul E. McKenney" One of the code samples in whatisRCU.txt shows a bug, but someone scanning the document quickly might mistake it for a valid use of RCU. Add some screaming comments to help keep speed-readers on track. Reported-by: Nathan Zimmer Signed-off-by: Paul E. McKen

[PATCH tip/core/rcu 0/7] Fixes for 3.9

2013-03-18 Thread Paul E. McKenney
Hello! This series contains the following fixes for RCU: 1. Whitespace fix courtesy of Jiang Fang. 2. Avoid raising softirq from CPUs going offline. 3. Remove obsolete CPU-hotplug comment, courtesy of Srivatsa Bhat. 4. Delete unused "wakemask" field. 5. Fix hlist_bl_s

[PATCH tip/core/rcu 2/7] rcu: Avoid invoking RCU core on offline CPUs

2013-03-18 Thread Paul E. McKenney
From: "Paul E. McKenney" Offline CPUs transition through the scheduler to the idle loop one last time before being shut down. This can result in RCU raising softirq on this CPU, which is at best useless given that the CPU's callbacks will be offloaded at CPU_DEAD time. This c

[PATCH tip/core/rcu 4/7] rcu: Delete unused rcu_node "wakemask" field

2013-03-18 Thread Paul E. McKenney
From: "Paul E. McKenney" Signed-off-by: Paul E. McKenney --- kernel/rcutree.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/kernel/rcutree.h b/kernel/rcutree.h index c896b50..8e75609 100644 --- a/kernel/rcutree.h +++ b/kernel/rcutree.h @@ -134,9 +134,6 @@ struc

[PATCH tip/core/rcu 1/7] rcu: Fix spacing problem

2013-03-18 Thread Paul E. McKenney
From: Jiang Fang Signed-off-by: Jiang Fang Signed-off-by: Paul E. McKenney --- kernel/rcutree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/rcutree.c b/kernel/rcutree.c index 5b8ad82..157539a 100644 --- a/kernel/rcutree.c +++ b/kernel/rcutree.c @@ -3171,7

[PATCH tip/core/rcu 7/7] rcu: Tone down debugging during boot-up and shutdown.

2013-03-18 Thread Paul E. McKenney
From: "Paul E. McKenney" In some situations, randomly delaying RCU grace-period initialization can cause more trouble than help. This commit therefore restricts this type of RCU self-torture to runtime, giving it a rest during boot and shutdown. Reported-by: Sasha Levin Signed-off-

[PATCH tip/core/rcu 6/7] rcu: Add softirq-stall indications to stall-warning messages

2013-03-18 Thread Paul E. McKenney
From: "Paul E. McKenney" If RCU's softirq handler is prevented from executing, an RCU CPU stall warning can result. Ways to prevent RCU's softirq handler from executing include: (1) CPU spinning with interrupts disabled, (2) infinite loop in some softirq handler, and (3

[PATCH tip/core/rcu 3/7] rcu: Remove comment referring to __stop_machine()

2013-03-18 Thread Paul E. McKenney
f-by: Paul E. McKenney --- kernel/rcutree.c | 5 - 1 file changed, 5 deletions(-) diff --git a/kernel/rcutree.c b/kernel/rcutree.c index b2fc234..71df6f9 100644 --- a/kernel/rcutree.c +++ b/kernel/rcutree.c @@ -2931,11 +2931,6 @@ static int __cpuinit rcu_cpu_notify(struct notifier_b

[PATCH tip/core/rcu 5/7] rcu: Fix hlist_bl_set_first_rcu() annotation

2013-03-18 Thread Paul E. McKenney
. Reported by: Abhijith Das Signed-off-by: Steven Whitehouse Tested-by: Abhijith Das Signed-off-by: Paul E. McKenney --- include/linux/list_bl.h| 5 + include/linux/rculist_bl.h | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/include/linux/list_bl.h b/include/linux

[PATCH tip/core/rcu 0/15] v3 RCU idle/no-CB changes for 3.10

2013-03-18 Thread Paul E. McKenney
Hello! This series contains changes to RCU_FAST_NO_HZ idle entry/exit and also removes restrictions on no-CBs CPUs. 1. Remove restrictions on no-CBs CPUs. 2. Allow some control of no-CBs CPUs at kernel-build time. The option of most interest is probably the one that makes -all-

[PATCH tip/core/rcu 10/15] rcu: Rearrange locking in rcu_start_gp()

2013-03-18 Thread Paul E. McKenney
From: "Paul E. McKenney" If CPUs are to give prior notice of needed grace periods, it will be necessary to invoke rcu_start_gp() without dropping the root rcu_node structure's ->lock. This commit takes a first step in this direction by moving the release of this lock to the e

[PATCH tip/core/rcu 14/15] rcu: Abstract rcu_start_future_gp() from rcu_nocb_wait_gp()

2013-03-18 Thread Paul E. McKenney
From: "Paul E. McKenney" CPUs going idle will need to record the need for a future grace period, but won't actually need to block waiting on it. This commit therefore splits rcu_start_future_gp(), which does the recording, from rcu_nocb_wait_gp(), which now invokes rcu_start_fu

[PATCH tip/core/rcu 13/15] rcu: Rename n_nocb_gp_requests to need_future_gp

2013-03-18 Thread Paul E. McKenney
From: "Paul E. McKenney" CPUs going idle need to be able to indicate their need for future grace periods. A mechanism for doing this already exists for no-callbacks CPUs, so the idea is to re-use that mechanism. This commit therefore moves the ->n_nocb_gp_requests field of

[PATCH tip/core/rcu 11/15] rcu: Repurpose no-CBs event tracing to future-GP events

2013-03-18 Thread Paul E. McKenney
From: "Paul E. McKenney" Dyntick-idle CPUs need to be able to pre-announce their need for grace periods. This can be done using something similar to the mechanism used by no-CB CPUs to announce their need for grace periods. This commit moves in this direction by renaming the no

[PATCH tip/core/rcu 08/15] rcu: Accelerate RCU callbacks at grace-period end

2013-03-18 Thread Paul E. McKenney
From: "Paul E. McKenney" Now that callback acceleration is idempotent, it is safe to accelerate callbacks during grace-period cleanup on any CPUs that the kthread happens to be running on. This commit therefore propagates the completion of the grace period to the per-CPU data struc

[PATCH tip/core/rcu 05/15] rcu: Add event tracing for no-CBs CPUs' grace periods

2013-03-18 Thread Paul E. McKenney
From: "Paul E. McKenney" Signed-off-by: Paul E. McKenney Signed-off-by: Paul E. McKenney --- include/trace/events/rcu.h | 55 ++ kernel/rcutree_plugin.h| 30 + 2 files changed, 85 insertions(+) diff --git a/inc

[PATCH tip/core/rcu 15/15] rcu: Make rcu_accelerate_cbs() note need for future grace periods

2013-03-18 Thread Paul E. McKenney
From: "Paul E. McKenney" Now that rcu_start_future_gp() has been abstracted from rcu_nocb_wait_gp(), rcu_accelerate_cbs() can invoke rcu_start_future_gp() so as to register the need for any future grace periods needed by a CPU about to enter dyntick-idle mode. This commit makes t

[PATCH tip/core/rcu 12/15] rcu: Push lock release to rcu_start_gp()'s callers

2013-03-18 Thread Paul E. McKenney
From: "Paul E. McKenney" If CPUs are to give prior notice of needed grace periods, it will be necessary to invoke rcu_start_gp() without dropping the root rcu_node structure's ->lock. This commit takes a second step in this direction by moving the release of this lock t

[PATCH tip/core/rcu 03/15] rcu: Introduce proper blocking to no-CBs kthreads GP waits

2013-03-18 Thread Paul E. McKenney
From: "Paul E. McKenney" Currently, the no-CBs kthreads do repeated timed waits for grace periods to elapse. This is crude and energy inefficient, so this commit allows no-CBs kthreads to specify exactly which grace period they are waiting for and also allows them to block for

[PATCH tip/core/rcu 07/15] rcu: Export RCU_FAST_NO_HZ parameters to sysfs

2013-03-18 Thread Paul E. McKenney
From: "Paul E. McKenney" RCU_FAST_NO_HZ operation is controlled by four compile-time C-preprocessor macros, but some use cases benefit greatly from runtime adjustment, particularly when tuning devices. This commit therefore creates the corresponding sysfs entries. Reported-by: Robi

[PATCH tip/core/rcu 09/15] rcu: Make RCU_FAST_NO_HZ take advantage of numbered callbacks

2013-03-18 Thread Paul E. McKenney
From: "Paul E. McKenney" Because RCU callbacks are now associated with the number of the grace period that they must wait for, CPUs can now take advance callbacks corresponding to grace periods that ended while a given CPU was in dyntick-idle mode. This eliminates the need to try f

[PATCH tip/core/rcu 01/15] rcu: Remove restrictions on no-CBs CPUs

2013-03-18 Thread Paul E. McKenney
From: "Paul E. McKenney" Currently, CPU 0 is constrained to not be a no-CBs CPU, and furthermore at least one no-CBs CPU must remain online at any given time. These restrictions are problematic in some situations, such as cases where all CPUs must run a real-time workload that n

[PATCH tip/core/rcu 02/15] rcu: Provide compile-time control for no-CBs CPUs

2013-03-18 Thread Paul E. McKenney
From: "Paul E. McKenney" Currently, the only way to specify no-CBs CPUs is via the rcu_nocbs kernel command-line parameter. This is inconvenient in some cases, particularly for randconfig testing, so this commit adds a new set of kernel configuration parameters. CONFIG_RCU_NOCB_CPU

[PATCH tip/core/rcu 06/15] rcu: Distinguish "rcuo" kthreads by RCU flavor

2013-03-18 Thread Paul E. McKenney
From: "Paul E. McKenney" Currently, the per-no-CBs-CPU kthreads are named "rcuo" followed by the CPU number, for example, "rcuo". This is problematic given that there are either two or three RCU flavors, each of which gets a per-CPU kthread with exactly the sam

[PATCH tip/core/rcu 04/15] rcu: Add event tracing for no-CBs CPUs' callback registration

2013-03-18 Thread Paul E. McKenney
From: "Paul E. McKenney" Signed-off-by: Paul E. McKenney Signed-off-by: Paul E. McKenney --- kernel/rcutree_plugin.h | 7 +++ 1 file changed, 7 insertions(+) diff --git a/kernel/rcutree_plugin.h b/kernel/rcutree_plugin.h index 90a1914..7225a5a 100644 --- a/kernel/rcutree_plug

Re: [PATCH] nohz1: Documentation

2013-03-18 Thread Paul E. McKenney
On Mon, Mar 18, 2013 at 09:48:31PM +0100, Frederic Weisbecker wrote: > 2013/3/18 Rob Landley : > > On 03/18/2013 01:46:32 PM, Frederic Weisbecker wrote: [ . . . ] > >> >> +o At least one CPU must keep the scheduling-clock interrupt going > >> >> + in order to support accurate timekeepi

Re: [PATCH] nohz1: Documentation

2013-03-20 Thread Paul E. McKenney
On Wed, Mar 20, 2013 at 07:32:18PM -0400, Steven Rostedt wrote: > On Mon, 2013-03-18 at 15:25 -0700, Paul E. McKenney wrote: > > > > > > > NO_HZ: Reducing Scheduling-Clock Ticks >

Re: [PATCH] nohz1: Documentation

2013-03-20 Thread Paul E. McKenney
On Wed, Mar 20, 2013 at 08:27:11PM -0400, Steven Rostedt wrote: > [ Added Arjan in case he as anything to add about the idle=poll below ] Good point! > On Wed, 2013-03-20 at 16:55 -0700, Paul E. McKenney wrote: > > On Wed, Mar 20, 2013 at 07:32:18PM -0400, Steven Rostedt wrote:

[GIT PULL tip/core/urgent] Fix for hlist_entry_safe() regression

2013-03-21 Thread Paul E. McKenney
://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git rcu/urgent Thanx, Paul Paul E. McKenney (1): list: Fix double fetch of pointer in hlist_entry_safe() include/linux

Re: [GIT PULL tip/core/urgent] Fix for hlist_entry_safe() regression

2013-03-21 Thread Paul E. McKenney
On Thu, Mar 21, 2013 at 07:42:03AM -0700, Linus Torvalds wrote: > On Thu, Mar 21, 2013 at 7:22 AM, Paul E. McKenney > wrote: > > [Reposting with corrected subject line.] > > > > Hello, Ingo, > > > > This series contains a single commit that fixes

Re: [PATCH] nohz1: Documentation

2013-03-21 Thread Paul E. McKenney
On Thu, Mar 21, 2013 at 11:16:50AM +0100, Borislav Petkov wrote: > On Wed, Mar 20, 2013 at 07:22:59PM -0700, Paul E. McKenney wrote: > > > > > > The "full_nohz=" boot parameter specifies which CPUs are to be > > > > > > adaptive-ticks CPU

Re: [PATCH] rcu: indent: fix leading space

2013-02-02 Thread Paul E. McKenney
On Thu, Jan 24, 2013 at 11:00:17PM +0800, Jiang Fang wrote: > > Signed-off-by: Jiang Fang Queued for 3.10, thank you! Thanx, Paul > --- > kernel/rcutree.c |2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/kerne

Re: rcu: fix hlist_bl_set_first_rcu annotation

2013-02-03 Thread Paul E. McKenney
On Wed, Jan 30, 2013 at 07:07:57PM +, Steven Whitehouse wrote: > > Abhi noticed that we were getting a complaint from the RCU subsystem > about access of an RCU protected list under the write side bit lock. > This patch adds additional annotation to check both the RCU read > lock and the write

Re: [PATCH] rcu: Have rcu torture test select trace_clock

2013-02-04 Thread Paul E. McKenney
On Mon, Feb 04, 2013 at 10:52:21AM -0500, Steven Rostedt wrote: > The rcu torture test uses trace_clock, and requires that it be built > into the kernel. If it is not, then we get the following build error: > > ERROR: "trace_clock_local" [kernel/rcutorture.ko] undefined! > > Reported-by: Tetsuo H

[GIT PULL rcu/next] RCU commits for 3.9

2013-02-04 Thread Paul E. McKenney
ommon rcu: Remove unused code originally used for context tracking Paul E. McKenney (11): tracing: Export trace_clock_local() rcu: Reduce rcutorture tracing rcu: Fix blimit type for trace_rcu_batch_start() rcu: Silence compiler array out-of-bounds false positive

Re: [PATCH] rcu: Have rcu torture test select trace_clock

2013-02-04 Thread Paul E. McKenney
On Mon, Feb 04, 2013 at 01:36:13PM -0500, Steven Rostedt wrote: > On Mon, 2013-02-04 at 08:59 -0800, Paul E. McKenney wrote: > > On Mon, Feb 04, 2013 at 10:52:21AM -0500, Steven Rostedt wrote: > > > The rcu torture test uses trace_clock, and requires that it be built > >

Re: [GIT PULL rcu/next] RCU commits for 3.9

2013-02-04 Thread Paul E. McKenney
On Mon, Feb 04, 2013 at 08:30:41PM +0100, Ingo Molnar wrote: > > Btw., I'm now getting these build errors in -tip too: > > kernel/built-in.o: In function `rcu_torture_reader': > rcutorture.c:(.text+0x657d7): undefined reference to `trace_clock_local' > kernel/built-in.o: In function `rcu_tortu

Re: [GIT PULL rcu/next] RCU commits for 3.9

2013-02-05 Thread Paul E. McKenney
On Mon, Feb 04, 2013 at 12:25:23PM -0800, Paul E. McKenney wrote: > On Mon, Feb 04, 2013 at 08:30:41PM +0100, Ingo Molnar wrote: > > > > Btw., I'm now getting these build errors in -tip too: > > > > kernel/built-in.o: In function `rcu_torture_reader&#x

Re: [GIT PULL rcu/next] RCU commits for 3.9

2013-02-05 Thread Paul E. McKenney
On Tue, Feb 05, 2013 at 02:52:30PM -0500, Steven Rostedt wrote: > On Tue, 2013-02-05 at 06:11 -0800, Paul E. McKenney wrote: > > > Steven Rostedt (1): > > rcu: Allow rcutorture to be built at low optimization levels > > I wish git had dual (or more) authorship, as I

Re: [ANNOUNCE] 3.8-rc6-nohz4

2013-02-07 Thread Paul E. McKenney
On Thu, Feb 07, 2013 at 11:12:00AM -0500, Steven Rostedt wrote: > On Thu, 2013-02-07 at 12:10 +0100, Ingo Molnar wrote: > > * Steven Rostedt wrote: > > > > > I'll reply to this as I come up with comments. > > > > > > First thing is, don't call it NO_HZ_FULL. A better name would > > > be NO_HZ_C

Re: [ANNOUNCE] 3.8-rc6-nohz4

2013-02-07 Thread Paul E. McKenney
On Thu, Feb 07, 2013 at 12:06:21PM -0500, Steven Rostedt wrote: > On Thu, 2013-02-07 at 08:30 -0800, Paul E. McKenney wrote: > > > I suspect that removal of jiffies from the kernel will take a few stages, > > with RCU being one of the laggards for awhile. Making RCU's s

Re: [GIT PULL rcu/next] RCU commits for 3.9

2013-02-07 Thread Paul E. McKenney
ch 4/8 is incomplete, though a good step towards allowing SRCU to be invoked from offline CPUs. Thoughts on getting the rest of the way there? Thanx, Paul > Thanks, > lai > > On 05/02/13 01:18, Paul E. McKenney wrote: > >He

Re: [RFC PATCH 1/6] kernel: implement queue spinlock API

2013-02-07 Thread Paul E. McKenney
On Tue, Jan 22, 2013 at 03:13:30PM -0800, Michel Lespinasse wrote: > Introduce queue spinlocks, to be used in situations where it is desired > to have good throughput even under the occasional high-contention situation. > > This initial implementation is based on the classic MCS spinlock, > becaus

Re: [RFC PATCH 1/6] kernel: implement queue spinlock API

2013-02-07 Thread Paul E. McKenney
On Thu, Feb 07, 2013 at 02:56:49PM -0800, Eric Dumazet wrote: > On Thu, 2013-02-07 at 14:34 -0800, Paul E. McKenney wrote: > > On Tue, Jan 22, 2013 at 03:13:30PM -0800, Michel Lespinasse wrote: > > > Introduce queue spinlocks, to be used in situations where it is desired

Re: [RFC PATCH 1/6] kernel: implement queue spinlock API

2013-02-07 Thread Paul E. McKenney
On Thu, Feb 07, 2013 at 04:03:54PM -0800, Eric Dumazet wrote: > On Thu, 2013-02-07 at 15:58 -0800, Michel Lespinasse wrote: > > > No, I think that's doable. The trick would be that once a thread > > acquires the lock, the only remaining use of the node is to receive > > the 'next' pointer if/when

Re: [RFC PATCH 1/6] kernel: implement queue spinlock API

2013-02-07 Thread Paul E. McKenney
On Thu, Feb 07, 2013 at 07:48:33PM -0800, Michel Lespinasse wrote: > On Thu, Feb 7, 2013 at 4:40 PM, Paul E. McKenney > wrote: > > On Thu, Feb 07, 2013 at 04:03:54PM -0800, Eric Dumazet wrote: > >> It adds yet another memory write to store the node pointer in the > >&g

Re: [RFC PATCH 1/6] kernel: implement queue spinlock API

2013-02-07 Thread Paul E. McKenney
On Thu, Feb 07, 2013 at 08:36:43PM -0800, Paul E. McKenney wrote: > On Thu, Feb 07, 2013 at 07:48:33PM -0800, Michel Lespinasse wrote: > > On Thu, Feb 7, 2013 at 4:40 PM, Paul E. McKenney > > wrote: > > > On Thu, Feb 07, 2013 at 04:03:54PM -0800, Eric Dumazet wrote: &g

Re: [RFC PATCH 1/6] kernel: implement queue spinlock API

2013-02-08 Thread Paul E. McKenney
On Thu, Feb 07, 2013 at 09:11:14PM -0800, Michel Lespinasse wrote: > On Thu, Feb 7, 2013 at 9:03 PM, Paul E. McKenney > wrote: > > Right... For spinlocks that -don't- disable irqs, you need to deal with > > the possibility that a CPU gets interrupted while spinning, and th

Re: net: rcu warnings in ip6fl_get_first

2013-02-08 Thread Paul E. McKenney
On Fri, Feb 08, 2013 at 01:38:29AM +, Cong Wang wrote: > On Thu, 07 Feb 2013 at 19:32 GMT, Sasha Levin wrote: > > Hi guys, > > > > I got the following while fuzzing with trinity inside a KVM tools guest: > > > > [ 51.680236] === > > [ 51.681914] [ INFO: suspicio

Re: [PATCH v5 04/45] percpu_rwlock: Implement the core design of Per-CPU Reader-Writer Locks

2013-02-08 Thread Paul E. McKenney
On Tue, Jan 29, 2013 at 08:12:37PM +0900, Namhyung Kim wrote: > On Thu, 24 Jan 2013 10:00:04 +0530, Srivatsa S. Bhat wrote: > > On 01/24/2013 01:27 AM, Tejun Heo wrote: > >> On Thu, Jan 24, 2013 at 01:03:52AM +0530, Srivatsa S. Bhat wrote: > >>> CPU 0 CPU 1 > >>> > >>> read

Re: [PATCH v5 04/45] percpu_rwlock: Implement the core design of Per-CPU Reader-Writer Locks

2013-02-08 Thread Paul E. McKenney
On Tue, Jan 22, 2013 at 01:03:53PM +0530, Srivatsa S. Bhat wrote: > Using global rwlocks as the backend for per-CPU rwlocks helps us avoid many > lock-ordering related problems (unlike per-cpu locks). However, global > rwlocks lead to unnecessary cache-line bouncing even when there are no > writers

Re: [PATCH v5 05/45] percpu_rwlock: Make percpu-rwlocks IRQ-safe, optimally

2013-02-08 Thread Paul E. McKenney
On Tue, Jan 22, 2013 at 01:04:11PM +0530, Srivatsa S. Bhat wrote: > If interrupt handlers can also be readers, then one of the ways to make > per-CPU rwlocks safe, is to disable interrupts at the reader side before > trying to acquire the per-CPU rwlock and keep it disabled throughout the > duratio

Re: [PATCH v5 06/45] percpu_rwlock: Allow writers to be readers, and add lockdep annotations

2013-02-08 Thread Paul E. McKenney
On Tue, Jan 22, 2013 at 01:04:23PM +0530, Srivatsa S. Bhat wrote: > CPU hotplug (which will be the first user of per-CPU rwlocks) has a special > requirement with respect to locking: the writer, after acquiring the per-CPU > rwlock for write, must be allowed to take the same lock for read, without

Re: [PATCH v5 07/45] CPU hotplug: Provide APIs to prevent CPU offline from atomic context

2013-02-08 Thread Paul E. McKenney
S. Miller" > Cc: "H. Peter Anvin" > Cc: x...@kernel.org > Cc: linux-arm-ker...@lists.infradead.org > Cc: uclinux-dist-de...@blackfin.uclinux.org > Cc: linux-i...@vger.kernel.org > Cc: linux-m...@linux-mips.org > Cc: linux-am33-l...@redhat.com > Cc: linux-par.

Re: [PATCH v5 08/45] CPU hotplug: Convert preprocessor macros to static inline functions

2013-02-08 Thread Paul E. McKenney
n the CPU hotplug code to static inline C functions. > > Signed-off-by: Srivatsa S. Bhat Reviewed-by: Paul E. McKenney > --- > > include/linux/cpu.h |8 > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/include/linux/cpu.h b/include/li

Re: [PATCH v5 09/45] smp, cpu hotplug: Fix smp_call_function_*() to prevent CPU offline properly

2013-02-08 Thread Paul E. McKenney
On Tue, Jan 22, 2013 at 01:05:10PM +0530, Srivatsa S. Bhat wrote: > Once stop_machine() is gone from the CPU offline path, we won't be able to > depend on preempt_disable() to prevent CPUs from going offline from under us. > > Use the get/put_online_cpus_atomic() APIs to prevent CPUs from going of

Re: [PATCH v5 44/45] CPU hotplug, stop_machine: Decouple CPU hotplug from stop_machine() in Kconfig

2013-02-08 Thread Paul E. McKenney
On Tue, Jan 22, 2013 at 01:15:22PM +0530, Srivatsa S. Bhat wrote: > ... and also cleanup a comment that refers to CPU hotplug being dependent on > stop_machine(). > > Cc: David Howells > Signed-off-by: Srivatsa S. Bhat Reviewed-by: Paul E. McKenney (Hey, I thought I owed mys

Re: [PATCH v5 14/45] rcu, CPU hotplug: Fix comment referring to stop_machine()

2013-02-08 Thread Paul E. McKenney
On Tue, Jan 22, 2013 at 01:06:34PM +0530, Srivatsa S. Bhat wrote: > Don't refer to stop_machine() in the CPU hotplug path, since we are going > to get rid of it. Also, move the comment referring to callback adoption > to the CPU_DEAD case, because that's where it happens now. > > Signed-off-by: Sr

Re: [patch 00/40] CPU hotplug rework - episode I

2013-02-08 Thread Paul E. McKenney
On Thu, Jan 31, 2013 at 12:11:11PM -, Thomas Gleixner wrote: > The current CPU hotplug implementation has become an increasing > nightmare full of races and undocumented behaviour. The main issue of > the current hotplug scheme is the completely asymetric > startup/teardown process. The hotplug

Re: [patch 01/40] smpboot: Allow selfparking per cpu threads

2013-02-08 Thread Paul E. McKenney
per cpu thread to be excluded from automatic parking, so it > can park itself once it's done > > Add a create callback function as well. > > Signed-off-by: Thomas Gleixner Reviewed-by: Paul E. McKenney > --- > include/linux/smpboot.h |5 + > kernel/smpboot.c

Re: [patch 02/40] stop_machine: Store task reference in a separate per cpu variable

2013-02-08 Thread Paul E. McKenney
On Thu, Jan 31, 2013 at 12:11:13PM -, Thomas Gleixner wrote: > To allow the stopper thread being managed by the smpboot thread > infrastructure separate out the task storage from the stopper data > structure. > > Signed-off-by: Thomas Gleixner Reviewed-by: Paul E. McKenney

Re: [patch 03/40] stop_machine: Use smpboot threads

2013-02-08 Thread Paul E. McKenney
On Thu, Jan 31, 2013 at 12:11:14PM -, Thomas Gleixner wrote: > Use the smpboot thread infrastructure. Mark the stopper thread > selfparking and park it after it has finished the take_cpu_down() > work. > > Signed-off-by: Thomas Gleixner One grammar nit, other than that: Revi

Re: [PATCH v5 45/45] Documentation/cpu-hotplug: Remove references to stop_machine()

2013-02-08 Thread Paul E. McKenney
> Reflect this in the documentation. > > Cc: Rob Landley > Cc: linux-...@vger.kernel.org > Signed-off-by: Srivatsa S. Bhat Reviewed-by: Paul E. McKenney > --- > > Documentation/cpu-hotplug.txt | 17 +++-- > 1 file changed, 11 insertions(+), 6 deletion

Re: [patch 04/40] cpu: Restructure FROZEN state handling

2013-02-08 Thread Paul E. McKenney
d let the users interested deal with it w/o > imposing that extra state checks on everyone. > > Signed-off-by: Thomas Gleixner Getting rid of all the _FROZEN variants of the notifier actions would be good! Reviewed-by: Paul E. McKenney >

Re: [patch 05/40] cpu: Restructure cpu_down code

2013-02-08 Thread Paul E. McKenney
On Thu, Jan 31, 2013 at 12:11:15PM -, Thomas Gleixner wrote: > Split out into separate functions, so we can convert it to a state machine. > > Signed-off-by: Thomas Gleixner Reviewed-by: Paul E. McKenney > --- > kern

Re: [patch 06/40] cpu: hotplug: Split out cpu down functions

2013-02-08 Thread Paul E. McKenney
On Thu, Jan 31, 2013 at 12:11:16PM -, Thomas Gleixner wrote: > Split cpu_down in separate functions in preparation for state machine > conversion. > > Signed-off-by: Thomas Gleixner Reviewed-by: Paul E. McKenney > --- > k

Re: [PATCH v5 04/45] percpu_rwlock: Implement the core design of Per-CPU Reader-Writer Locks

2013-02-10 Thread Paul E. McKenney
On Mon, Feb 11, 2013 at 12:40:56AM +0530, Srivatsa S. Bhat wrote: > On 02/09/2013 04:40 AM, Paul E. McKenney wrote: > > On Tue, Jan 22, 2013 at 01:03:53PM +0530, Srivatsa S. Bhat wrote: > >> Using global rwlocks as the backend for per-CPU rwlocks helps us avoid many > >

Re: [PATCH v5 04/45] percpu_rwlock: Implement the core design of Per-CPU Reader-Writer Locks

2013-02-10 Thread Paul E. McKenney
On Sun, Feb 10, 2013 at 07:06:07PM +0100, Oleg Nesterov wrote: > On 02/08, Paul E. McKenney wrote: [ . . . ] > > > +static inline void sync_reader(struct percpu_rwlock *pcpu_rwlock, > > > +unsigned int cpu) > > > +{ > > > + s

Re: [PATCH v5 09/45] smp, cpu hotplug: Fix smp_call_function_*() to prevent CPU offline properly

2013-02-10 Thread Paul E. McKenney
On Mon, Feb 11, 2013 at 01:11:29AM +0530, Srivatsa S. Bhat wrote: > On 02/09/2013 05:37 AM, Paul E. McKenney wrote: > > On Tue, Jan 22, 2013 at 01:05:10PM +0530, Srivatsa S. Bhat wrote: > >> Once stop_machine() is gone from the CPU offline path, we won't be able to > &g

Re: [PATCH v5 04/45] percpu_rwlock: Implement the core design of Per-CPU Reader-Writer Locks

2013-02-10 Thread Paul E. McKenney
On Mon, Feb 11, 2013 at 01:39:24AM +0530, Srivatsa S. Bhat wrote: > On 02/11/2013 01:20 AM, Oleg Nesterov wrote: > > On 02/11, Srivatsa S. Bhat wrote: > >> > >> On 02/10/2013 11:36 PM, Oleg Nesterov wrote: > > +static void announce_writer_inactive(struct percpu_rwlock *pcpu_rwlock) > > +{ >

Re: [PATCH v5 00/45] CPU hotplug: stop_machine()-free CPU hotplug

2013-02-11 Thread Paul E. McKenney
On Mon, Feb 11, 2013 at 05:53:41PM +0530, Srivatsa S. Bhat wrote: > On 02/11/2013 05:28 PM, Vincent Guittot wrote: > > On 8 February 2013 19:09, Srivatsa S. Bhat > > wrote: [ . . . ] > >> Adding Vincent to CC, who had previously evaluated the performance and > >> latency implications of CPU hotp

Re: [patch 07/40] cpu: hotplug: Convert to a state machine for the control processor

2013-02-11 Thread Paul E. McKenney
-off-by: Thomas Gleixner Reviewed-by: Paul E. McKenney > --- > include/linux/cpu.h|4 + > include/linux/cpuhotplug.h | 16 > init/main.c| 15 --- > kernel/cpu.c | 180 > - > kernel/sm

Re: [patch 08/40] cpu: hotplug: Convert the hotplugged processor work to a state machine

2013-02-11 Thread Paul E. McKenney
he > control processor and the hotplugged processor, so we can move the > various architecture implementations of the synchronizations to the > core. > > Signed-off-by: Thomas Gleixner Reviewed-by: Paul E. McKenney > --- > include/linux/cpuhotplug.h |4 ++ >

Re: [patch 10/40] sched: Convert to state machine callbacks

2013-02-11 Thread Paul E. McKenney
t > run them during the bringup of the non boot cpus because the smp > scheduler is setup after that. It would be nice if we just could > compile them in, but that needs a larger surgery to the scheduler code > and is beyond the scope of this patch. > > Signed-off-by: Thomas Gleixn

Re: [patch 32/40] rcu: Convert rcutree to hotplug state machine

2013-02-11 Thread Paul E. McKenney
On Thu, Jan 31, 2013 at 12:11:38PM -, Thomas Gleixner wrote: > Do we really need so many states here ? Well, all that RCU does for CPU_DYING is to do tracing, which could be ditched. Required changes called out inline below. All that the CPU_ONLINE and CPU_DOWN_PREPARE notifiers do is set up

Re: [PATCH v5 04/45] percpu_rwlock: Implement the core design of Per-CPU Reader-Writer Locks

2013-02-12 Thread Paul E. McKenney
On Sun, Feb 10, 2013 at 11:54:17AM -0800, Paul E. McKenney wrote: > On Sun, Feb 10, 2013 at 07:06:07PM +0100, Oleg Nesterov wrote: > > On 02/08, Paul E. McKenney wrote: > > [ . . . ] > > > > > +static inline void sync_reader(str

Re: [patch 32/40] rcu: Convert rcutree to hotplug state machine

2013-02-12 Thread Paul E. McKenney
On Mon, Feb 11, 2013 at 04:01:01PM -0800, Paul E. McKenney wrote: > On Thu, Jan 31, 2013 at 12:11:38PM -, Thomas Gleixner wrote: > > Do we really need so many states here ? > > Well, all that RCU does for CPU_DYING is to do tracing, which could be > ditched. Required

[GIT PULL rcu/srcu] SRCU commits for 3.9

2013-02-12 Thread Paul E. McKenney
Hello, Ingo, This series contains SRCU changes for 3.9. These include debugging aids, updates that move towards the goal of permitting srcu_read_lock() and srcu_read_unlock() to be used from idle and offline CPUs, and a few small fixes. These commits are available in the git repository at: gi

Re: [PATCH v3 4/7] memcg: remove memcg from the reclaim iterators

2013-02-12 Thread Paul E. McKenney
On Tue, Feb 12, 2013 at 04:43:30PM +0100, Michal Hocko wrote: > On Tue 12-02-13 10:10:02, Johannes Weiner wrote: > > On Tue, Feb 12, 2013 at 10:54:19AM +0100, Michal Hocko wrote: > > > On Mon 11-02-13 17:39:43, Johannes Weiner wrote: > > > > On Mon, Feb 11, 2013 at 10:27:56PM +0100, Michal Hocko wr

Re: [PATCH v3 4/7] memcg: remove memcg from the reclaim iterators

2013-02-12 Thread Paul E. McKenney
On Tue, Feb 12, 2013 at 12:25:26PM -0500, Johannes Weiner wrote: > On Tue, Feb 12, 2013 at 08:10:51AM -0800, Paul E. McKenney wrote: > > On Tue, Feb 12, 2013 at 04:43:30PM +0100, Michal Hocko wrote: > > > On Tue 12-02-13 10:10:02, Johannes Weiner wrote: > > > > On T

  1   2   3   4   5   6   7   8   9   10   >