[PATCH v3 1/1] doc: Add remote CPU access details and others to this_cpu_ops.txt

2014-07-20 Thread Pranith Kumar
Christoph Lameter Signed-off-by: Pranith Kumar CC: Christoph Lameter --- Documentation/this_cpu_ops.txt | 169 ++--- 1 file changed, 141 insertions(+), 28 deletions(-) diff --git a/Documentation/this_cpu_ops.txt b/Documentation/this_cpu_ops.txt index 1a4ce7e

[PATCH v3 1/1] doc: Add remote CPU access details and others to this_cpu_ops.txt

2014-07-20 Thread Pranith Kumar
Christoph Lameter Signed-off-by: Pranith Kumar bobby.pr...@gmail.com CC: Christoph Lameter c...@linux.com --- Documentation/this_cpu_ops.txt | 169 ++--- 1 file changed, 141 insertions(+), 28 deletions(-) diff --git a/Documentation/this_cpu_ops.txt b/Documentation

Re: [PATCH 1/1] rcu: Check for have_rcu_nocb_mask instead of rcu_nocb_mask

2014-07-19 Thread Pranith Kumar
On 07/19/2014 02:10 AM, Paul E. McKenney wrote: >> diff --git a/kernel/rcu/tree_plugin.h b/kernel/rcu/tree_plugin.h >> index ce8c331..8f987c1 100644 >> --- a/kernel/rcu/tree_plugin.h >> +++ b/kernel/rcu/tree_plugin.h >> @@ -2053,9 +2053,10 @@ static void rcu_init_one_nocb(struct rcu_node *rnp) >>

Re: [PATCH 1/1] rcu: Check for have_rcu_nocb_mask instead of rcu_nocb_mask

2014-07-19 Thread Pranith Kumar
On 07/19/2014 02:10 AM, Paul E. McKenney wrote: diff --git a/kernel/rcu/tree_plugin.h b/kernel/rcu/tree_plugin.h index ce8c331..8f987c1 100644 --- a/kernel/rcu/tree_plugin.h +++ b/kernel/rcu/tree_plugin.h @@ -2053,9 +2053,10 @@ static void rcu_init_one_nocb(struct rcu_node *rnp) /* Is the

[RFC PATCH 1/1] rcu: Consolidate kthread launches

2014-07-18 Thread Pranith Kumar
is a no-CB CPU before calling rcu_spawn_all_nocb_kthreads() on that CPU I've got the KVM rcutorture setup running and verified these changes. Side note: we should probably change the trace comment for rcu_cpu_notify() which says it is for Hotplug :) Signed-off-by: Pranith Kumar --- kernel/rcu

[PATCH 1/1] rcu: Fix build failure

2014-07-18 Thread Pranith Kumar
Hi Paul, While running the kvm rcutorture test scripts, I encountered a build failure caused by Commit 918179699e4a ("rcu: Don't keep timekeeping CPU tick running for non-nohz_full= CPUs") This commit fixes the failure. This is on top of paul/rcu/dev. Signed-off-by: Pra

[PATCH 1/1] rcu: Fix build failure

2014-07-18 Thread Pranith Kumar
Hi Paul, While running the kvm rcutorture test scripts, I encountered a build failure caused by Commit 918179699e4a (rcu: Don't keep timekeeping CPU tick running for non-nohz_full= CPUs) This commit fixes the failure. This is on top of paul/rcu/dev. Signed-off-by: Pranith Kumar bobby.pr

[RFC PATCH 1/1] rcu: Consolidate kthread launches

2014-07-18 Thread Pranith Kumar
is a no-CB CPU before calling rcu_spawn_all_nocb_kthreads() on that CPU I've got the KVM rcutorture setup running and verified these changes. Side note: we should probably change the trace comment for rcu_cpu_notify() which says it is for Hotplug :) Signed-off-by: Pranith Kumar bobby.pr

Re: [PATCH 1/1] rcu: Check for have_rcu_nocb_mask instead of rcu_nocb_mask

2014-07-17 Thread Pranith Kumar
On 07/17/2014 07:49 PM, Paul E. McKenney wrote: > On Thu, Jul 17, 2014 at 05:30:11PM -0400, Pranith Kumar wrote: >> Hi Paul, >> >> This is something similar to what you found yesterday with tick_nohz_full >> mask. >> >> -- >> Pranith >>

Re: [PATCH v2 1/1] doc: Add remote CPU access details and others to this_cpu_ops.txt

2014-07-17 Thread Pranith Kumar
On 07/17/2014 11:19 AM, Christoph Lameter wrote: > Regarding atomic_t in per cpu areas: I am uncomfortable especially > because both locked and unlocked RMW write operations could be acting on > values in the same cacheline. I am concerned that the unlocked operation > could have an unpredictable

Re: [PATCH v2 1/1] doc: Add remote CPU access details and others to this_cpu_ops.txt

2014-07-17 Thread Pranith Kumar
On 07/17/2014 11:26 AM, Christoph Lameter wrote: > On Thu, 17 Jul 2014, Pranith Kumar wrote: > >> I can mention that IPI is preferable. What is that you don't want mentioned? >> atomic_t? > > Definitely not as an example. atomic_t in per cpu areas is self > cont

[PATCH 1/1] rcu: Check for have_rcu_nocb_mask instead of rcu_nocb_mask

2014-07-17 Thread Pranith Kumar
instead of NULL. Hence this commit replaces checks for rcu_nocb_mask == NULL with a check for have_rcu_nocb_mask. Signed-off-by: Pranith Kumar --- kernel/rcu/tree_plugin.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/rcu/tree_plugin.h b/kernel/rcu/tree_plugin.h

Re: [PATCH v2 1/1] doc: Add remote CPU access details and others to this_cpu_ops.txt

2014-07-17 Thread Pranith Kumar
On 07/17/2014 10:55 AM, Christoph Lameter wrote: > On Thu, 17 Jul 2014, Pranith Kumar wrote: > >>> The RCU code has u... some issues with percpu usage and should >>> not be taken as a good example. If you look at the RCU code it looks >>> horrible wit

Re: [PATCH v2 1/1] doc: Add remote CPU access details and others to this_cpu_ops.txt

2014-07-17 Thread Pranith Kumar
On 07/17/2014 10:39 AM, Christoph Lameter wrote: > On Thu, 17 Jul 2014, Pranith Kumar wrote: > >>> The use of atomic_t implies a remote write operation to a percpu area. >>> >>> atomic_t needs to be avoided. If data needs to be modified from multiple >>

Re: [PATCH v2 1/1] doc: Add remote CPU access details and others to this_cpu_ops.txt

2014-07-17 Thread Pranith Kumar
On 07/17/2014 10:39 AM, Christoph Lameter wrote: On Thu, 17 Jul 2014, Pranith Kumar wrote: The use of atomic_t implies a remote write operation to a percpu area. atomic_t needs to be avoided. If data needs to be modified from multiple cpus then it usually does not belong into a percpu area

Re: [PATCH v2 1/1] doc: Add remote CPU access details and others to this_cpu_ops.txt

2014-07-17 Thread Pranith Kumar
On 07/17/2014 10:55 AM, Christoph Lameter wrote: On Thu, 17 Jul 2014, Pranith Kumar wrote: The RCU code has u... some issues with percpu usage and should not be taken as a good example. If you look at the RCU code it looks horrible with numerous barriers around remote percpu read

[PATCH 1/1] rcu: Check for have_rcu_nocb_mask instead of rcu_nocb_mask

2014-07-17 Thread Pranith Kumar
instead of NULL. Hence this commit replaces checks for rcu_nocb_mask == NULL with a check for have_rcu_nocb_mask. Signed-off-by: Pranith Kumar bobby.pr...@gmail.com --- kernel/rcu/tree_plugin.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/rcu/tree_plugin.h b

Re: [PATCH v2 1/1] doc: Add remote CPU access details and others to this_cpu_ops.txt

2014-07-17 Thread Pranith Kumar
On 07/17/2014 11:26 AM, Christoph Lameter wrote: On Thu, 17 Jul 2014, Pranith Kumar wrote: I can mention that IPI is preferable. What is that you don't want mentioned? atomic_t? Definitely not as an example. atomic_t in per cpu areas is self contradicting. The per cpu area is exclusively

Re: [PATCH v2 1/1] doc: Add remote CPU access details and others to this_cpu_ops.txt

2014-07-17 Thread Pranith Kumar
On 07/17/2014 11:19 AM, Christoph Lameter wrote: Regarding atomic_t in per cpu areas: I am uncomfortable especially because both locked and unlocked RMW write operations could be acting on values in the same cacheline. I am concerned that the unlocked operation could have an unpredictable

Re: [PATCH 1/1] rcu: Check for have_rcu_nocb_mask instead of rcu_nocb_mask

2014-07-17 Thread Pranith Kumar
On 07/17/2014 07:49 PM, Paul E. McKenney wrote: On Thu, Jul 17, 2014 at 05:30:11PM -0400, Pranith Kumar wrote: Hi Paul, This is something similar to what you found yesterday with tick_nohz_full mask. -- Pranith If we configure a kernel with CONFIG_NOCB_CPU=y, CONFIG_RCU_NOCB_CPU_NONE=y

Re: [PATCH RFC tip/core/rcu 1/2] rcu: Rationalize kthread spawning

2014-07-16 Thread Pranith Kumar
On 07/16/2014 10:57 PM, Sasha Levin wrote: > On 07/14/2014 06:06 AM, Paul E. McKenney wrote: >> From: "Paul E. McKenney" >> >> Currently, RCU spawns kthreads from several different early_initcall() >> functions. Although this has served RCU well for quite some time, >> as more kthreads are added

Re: [PATCH 2/3] rcu: Remove stale comment in tree.c

2014-07-16 Thread Pranith Kumar
On 07/16/2014 10:14 PM, Josh Triplett wrote: > On Wed, Jul 16, 2014 at 09:01:52PM -0400, Pranith Kumar wrote: >> Sure, please find an updated patch with Josh Triplett's sign-off added: > > It appears to have a reviewed-by from someone named "Joe Tripplett" > instead

Re: [RFC PATCH 1/1] rcu: use atomic_read(v) instead of atomic_add_return(0, v)

2014-07-16 Thread Pranith Kumar
On 07/16/2014 09:14 AM, Paul E. McKenney wrote: > On Mon, Jul 14, 2014 at 09:27:00AM -0400, Pranith Kumar wrote: >> On Sat, Jul 12, 2014 at 8:08 AM, Paul E. McKenney wrote: >>> >>> They ensure that any RCU read-side critical sections that took place before >>

Re: [PATCH 2/3] rcu: Remove stale comment in tree.c

2014-07-16 Thread Pranith Kumar
On 07/16/2014 09:25 PM, Lai Jiangshan wrote: > On 07/17/2014 09:01 AM, Pranith Kumar wrote: >> On 07/16/2014 08:55 PM, Lai Jiangshan wrote: >>> On 07/16/2014 09:29 PM, Pranith Kumar wrote: >>>> On 07/16/2014 08:47 AM, Paul E. McKenney wrote: >>>>> On T

Re: [PATCH 2/3] rcu: Remove stale comment in tree.c

2014-07-16 Thread Pranith Kumar
On 07/16/2014 08:55 PM, Lai Jiangshan wrote: > On 07/16/2014 09:29 PM, Pranith Kumar wrote: >> On 07/16/2014 08:47 AM, Paul E. McKenney wrote: >>> On Tue, Jul 15, 2014 at 06:57:59PM -0400, Pranith Kumar wrote: >>>> >>>> On 07/15/2014 06:53 PM, j...@jo

Re: [RFC PATCH 1/1] rcu: Allow user to ovveride RCU_NOCB_CPU_ALL at boot time

2014-07-16 Thread Pranith Kumar
On 07/16/2014 08:26 PM, Paul E. McKenney wrote: > On Wed, Jul 16, 2014 at 06:38:08PM -0400, Pranith Kumar wrote: >> A kernel built with RCU_NOCB_CPU_ALL build time option will offload callbacks >> from all CPUs. The user cannot override this behavior without recompilin

[PATCH v2 1/1] doc: Add remote CPU access details and others to this_cpu_ops.txt

2014-07-16 Thread Pranith Kumar
Add more details from a recent kernel newbies mailing list discussion here: http://www.spinics.net/lists/newbies/msg52747.html Also list the operations available and add details about safe accesses. v2: * updated with comments from Christoph Lameter Signed-off-by: Pranith Kumar CC: Christoph

[RFC PATCH 1/1] rcu: Allow user to ovveride RCU_NOCB_CPU_ALL at boot time

2014-07-16 Thread Pranith Kumar
= boot time option without needing to recompile the kernel. Please note that this is how NO_HZ_FULL_ALL build time option works and this commit makes it work similar to that. Signed-off-by: Pranith Kumar --- init/Kconfig | 14 +++--- kernel/rcu/tree_plugin.h | 8 2

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

2014-07-16 Thread Pranith Kumar
On 07/16/2014 02:15 PM, Pranith Kumar wrote: > > On 07/16/2014 01:24 PM, Paul E. McKenney wrote: >>>> And of course if you don't actually specify a nohz_full= mask, then >>>> tick_nohz_full_mask can be NULL at RCU initialization time, and if it >>>>

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

2014-07-16 Thread Pranith Kumar
On 07/16/2014 01:24 PM, Paul E. McKenney wrote: >>> And of course if you don't actually specify a nohz_full= mask, then >>> tick_nohz_full_mask can be NULL at RCU initialization time, and if it >>> is also true that CONFIG_NO_HZ_FULL_ALL=n, this condition can persist >>> forever. >>> >> Hi Paul,

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

2014-07-16 Thread Pranith Kumar
On 07/16/2014 11:26 AM, Paul E. McKenney wrote: > On Wed, Jul 16, 2014 at 07:17:07AM -0700, Paul E. McKenney wrote: >> On Wed, Jul 16, 2014 at 03:13:22PM +0200, Ingo Molnar wrote: >>> >>> * Ingo Molnar wrote: >>> * Paul E. McKenney wrote: > Hello, Ingo, > > The changes

Re: [PATCH 2/3] rcu: Remove stale comment in tree.c

2014-07-16 Thread Pranith Kumar
On 07/16/2014 08:47 AM, Paul E. McKenney wrote: > On Tue, Jul 15, 2014 at 06:57:59PM -0400, Pranith Kumar wrote: >> >> On 07/15/2014 06:53 PM, j...@joshtriplett.org wrote: >>> On Tue, Jul 15, 2014 at 06:31:48PM -0400, Pranith Kumar wrote: >>>> This commit r

Re: [PATCH 3/3] rcu: Use rcu_num_nodes instead of NUM_RCU_NODES

2014-07-16 Thread Pranith Kumar
On 07/16/2014 08:45 AM, Paul E. McKenney wrote: > On Tue, Jul 15, 2014 at 06:31:49PM -0400, Pranith Kumar wrote: >> NUM_RCU_NODES is set at build time and is usually a huge number. We >> calculate the >> actual number of rcu nodes necessary at boot time based on nr_cpu_ids in

Re: [PATCH 3/3] rcu: Use rcu_num_nodes instead of NUM_RCU_NODES

2014-07-16 Thread Pranith Kumar
On 07/16/2014 08:45 AM, Paul E. McKenney wrote: On Tue, Jul 15, 2014 at 06:31:49PM -0400, Pranith Kumar wrote: NUM_RCU_NODES is set at build time and is usually a huge number. We calculate the actual number of rcu nodes necessary at boot time based on nr_cpu_ids in rcu_init_geometry

Re: [PATCH 2/3] rcu: Remove stale comment in tree.c

2014-07-16 Thread Pranith Kumar
On 07/16/2014 08:47 AM, Paul E. McKenney wrote: On Tue, Jul 15, 2014 at 06:57:59PM -0400, Pranith Kumar wrote: On 07/15/2014 06:53 PM, j...@joshtriplett.org wrote: On Tue, Jul 15, 2014 at 06:31:48PM -0400, Pranith Kumar wrote: This commit removes a stale comment in rcu/tree.c. FYI

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

2014-07-16 Thread Pranith Kumar
On 07/16/2014 11:26 AM, Paul E. McKenney wrote: On Wed, Jul 16, 2014 at 07:17:07AM -0700, Paul E. McKenney wrote: On Wed, Jul 16, 2014 at 03:13:22PM +0200, Ingo Molnar wrote: * Ingo Molnar mi...@kernel.org wrote: * Paul E. McKenney paul...@linux.vnet.ibm.com wrote: Hello, Ingo, The

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

2014-07-16 Thread Pranith Kumar
On 07/16/2014 01:24 PM, Paul E. McKenney wrote: And of course if you don't actually specify a nohz_full= mask, then tick_nohz_full_mask can be NULL at RCU initialization time, and if it is also true that CONFIG_NO_HZ_FULL_ALL=n, this condition can persist forever. Hi Paul, The other

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

2014-07-16 Thread Pranith Kumar
On 07/16/2014 02:15 PM, Pranith Kumar wrote: On 07/16/2014 01:24 PM, Paul E. McKenney wrote: And of course if you don't actually specify a nohz_full= mask, then tick_nohz_full_mask can be NULL at RCU initialization time, and if it is also true that CONFIG_NO_HZ_FULL_ALL=n, this condition can

[RFC PATCH 1/1] rcu: Allow user to ovveride RCU_NOCB_CPU_ALL at boot time

2014-07-16 Thread Pranith Kumar
= boot time option without needing to recompile the kernel. Please note that this is how NO_HZ_FULL_ALL build time option works and this commit makes it work similar to that. Signed-off-by: Pranith Kumar bobby.pr...@gmail.com --- init/Kconfig | 14 +++--- kernel/rcu/tree_plugin.h

[PATCH v2 1/1] doc: Add remote CPU access details and others to this_cpu_ops.txt

2014-07-16 Thread Pranith Kumar
Add more details from a recent kernel newbies mailing list discussion here: http://www.spinics.net/lists/newbies/msg52747.html Also list the operations available and add details about safe accesses. v2: * updated with comments from Christoph Lameter Signed-off-by: Pranith Kumar bobby.pr

Re: [RFC PATCH 1/1] rcu: Allow user to ovveride RCU_NOCB_CPU_ALL at boot time

2014-07-16 Thread Pranith Kumar
On 07/16/2014 08:26 PM, Paul E. McKenney wrote: On Wed, Jul 16, 2014 at 06:38:08PM -0400, Pranith Kumar wrote: A kernel built with RCU_NOCB_CPU_ALL build time option will offload callbacks from all CPUs. The user cannot override this behavior without recompiling the kernel

Re: [PATCH 2/3] rcu: Remove stale comment in tree.c

2014-07-16 Thread Pranith Kumar
On 07/16/2014 08:55 PM, Lai Jiangshan wrote: On 07/16/2014 09:29 PM, Pranith Kumar wrote: On 07/16/2014 08:47 AM, Paul E. McKenney wrote: On Tue, Jul 15, 2014 at 06:57:59PM -0400, Pranith Kumar wrote: On 07/15/2014 06:53 PM, j...@joshtriplett.org wrote: On Tue, Jul 15, 2014 at 06:31:48PM

Re: [PATCH 2/3] rcu: Remove stale comment in tree.c

2014-07-16 Thread Pranith Kumar
On 07/16/2014 09:25 PM, Lai Jiangshan wrote: On 07/17/2014 09:01 AM, Pranith Kumar wrote: On 07/16/2014 08:55 PM, Lai Jiangshan wrote: On 07/16/2014 09:29 PM, Pranith Kumar wrote: On 07/16/2014 08:47 AM, Paul E. McKenney wrote: On Tue, Jul 15, 2014 at 06:57:59PM -0400, Pranith Kumar wrote

Re: [RFC PATCH 1/1] rcu: use atomic_read(v) instead of atomic_add_return(0, v)

2014-07-16 Thread Pranith Kumar
On 07/16/2014 09:14 AM, Paul E. McKenney wrote: On Mon, Jul 14, 2014 at 09:27:00AM -0400, Pranith Kumar wrote: On Sat, Jul 12, 2014 at 8:08 AM, Paul E. McKenney wrote: They ensure that any RCU read-side critical sections that took place before the current (or previous) idle/userspace period

Re: [PATCH 2/3] rcu: Remove stale comment in tree.c

2014-07-16 Thread Pranith Kumar
On 07/16/2014 10:14 PM, Josh Triplett wrote: On Wed, Jul 16, 2014 at 09:01:52PM -0400, Pranith Kumar wrote: Sure, please find an updated patch with Josh Triplett's sign-off added: It appears to have a reviewed-by from someone named Joe Tripplett instead. ;) I apologize for fat-fingering

Re: [PATCH RFC tip/core/rcu 1/2] rcu: Rationalize kthread spawning

2014-07-16 Thread Pranith Kumar
On 07/16/2014 10:57 PM, Sasha Levin wrote: On 07/14/2014 06:06 AM, Paul E. McKenney wrote: From: Paul E. McKenney paul...@linux.vnet.ibm.com Currently, RCU spawns kthreads from several different early_initcall() functions. Although this has served RCU well for quite some time, as more

Re: [PATCH 1/1] scripts/get_maintainer: increase threshold for --follow to reduce time

2014-07-15 Thread Pranith Kumar
On Wed, Jul 16, 2014 at 12:08 AM, Joe Perches wrote: > On Tue, 2014-07-15 at 22:23 -0400, Pranith Kumar wrote: >> ping? >> >> On Sat, Jul 12, 2014 at 3:25 PM, Pranith Kumar wrote: >> > get_maintainer tries to follow files with a matching threshold of default >

[PATCH 1/1] doc: Add remote CPU access details to this_cpu_ops.txt

2014-07-15 Thread Pranith Kumar
Add more details from a recent kernel newbies mailing list discussion here: http://www.spinics.net/lists/newbies/msg52747.html Signed-off-by: Pranith Kumar CC: Christoph Lameter --- Documentation/this_cpu_ops.txt | 107 + 1 file changed, 87 insertions

Re: [PATCH 1/1] scripts/get_maintainer: increase threshold for --follow to reduce time

2014-07-15 Thread Pranith Kumar
ping? On Sat, Jul 12, 2014 at 3:25 PM, Pranith Kumar wrote: > get_maintainer tries to follow files with a matching threshold of default 50%. > This is not really necessary as we do not change a file and move it in the > same > commit usually. Increasing the threshold to 90% should b

[PATCH 1/1] rcu: Remove redundant checks for rcu_scheduler_fully_active

2014-07-15 Thread Pranith Kumar
. Hence checking for this flag is redundant in this function. The checks in rcu_spawn_one_boost_kthread() and rcu_spawn_all_nocb_kthreads() are similarly redundant. This commit removes the redundant checks for this flag from the above locations. Signed-off-by: Pranith Kumar --- kernel/rcu

Re: [PATCH 2/3] rcu: Remove stale comment in tree.c

2014-07-15 Thread Pranith Kumar
On 07/15/2014 06:53 PM, j...@joshtriplett.org wrote: > On Tue, Jul 15, 2014 at 06:31:48PM -0400, Pranith Kumar wrote: >> This commit removes a stale comment in rcu/tree.c. >> FYI, an updated comment exists a few lines below this. >> >> Signed-off-by: Pranith Kumar

[PATCH 3/3] rcu: Use rcu_num_nodes instead of NUM_RCU_NODES

2014-07-15 Thread Pranith Kumar
of NUM_RCU_NODES to rcu_num_nodes. Signed-off-by: Pranith Kumar --- kernel/rcu/tree_plugin.h | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/kernel/rcu/tree_plugin.h b/kernel/rcu/tree_plugin.h index cedb020..17ccb62 100644 --- a/kernel/rcu/tree_plugin.h +++ b/kernel/rcu

[PATCH 2/3] rcu: Remove stale comment in tree.c

2014-07-15 Thread Pranith Kumar
This commit removes a stale comment in rcu/tree.c. FYI, an updated comment exists a few lines below this. Signed-off-by: Pranith Kumar --- kernel/rcu/tree.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c index a1abaa8..e67246e 100644 --- a/kernel/rcu

[PATCH 1/3] rcu: tiny.c: Update reference to tree.c

2014-07-15 Thread Pranith Kumar
This commit updates the references to rcutree.c which is now rcu/tree.c Signed-off-by: Pranith Kumar --- kernel/rcu/tiny.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/rcu/tiny.c b/kernel/rcu/tiny.c index d9efcc1..6bd785c 100644 --- a/kernel/rcu/tiny.c +++ b

[PATCH 2/3] rcu: Remove stale comment in tree.c

2014-07-15 Thread Pranith Kumar
This commit removes a stale comment in rcu/tree.c. FYI, an updated comment exists a few lines below this. Signed-off-by: Pranith Kumar bobby.pr...@gmail.com --- kernel/rcu/tree.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c index a1abaa8..e67246e

[PATCH 1/3] rcu: tiny.c: Update reference to tree.c

2014-07-15 Thread Pranith Kumar
This commit updates the references to rcutree.c which is now rcu/tree.c Signed-off-by: Pranith Kumar bobby.pr...@gmail.com --- kernel/rcu/tiny.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/rcu/tiny.c b/kernel/rcu/tiny.c index d9efcc1..6bd785c 100644

[PATCH 3/3] rcu: Use rcu_num_nodes instead of NUM_RCU_NODES

2014-07-15 Thread Pranith Kumar
of NUM_RCU_NODES to rcu_num_nodes. Signed-off-by: Pranith Kumar bobby.pr...@gmail.com --- kernel/rcu/tree_plugin.h | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/kernel/rcu/tree_plugin.h b/kernel/rcu/tree_plugin.h index cedb020..17ccb62 100644 --- a/kernel/rcu

Re: [PATCH 2/3] rcu: Remove stale comment in tree.c

2014-07-15 Thread Pranith Kumar
On 07/15/2014 06:53 PM, j...@joshtriplett.org wrote: On Tue, Jul 15, 2014 at 06:31:48PM -0400, Pranith Kumar wrote: This commit removes a stale comment in rcu/tree.c. FYI, an updated comment exists a few lines below this. Signed-off-by: Pranith Kumar bobby.pr...@gmail.com In general, when

[PATCH 1/1] rcu: Remove redundant checks for rcu_scheduler_fully_active

2014-07-15 Thread Pranith Kumar
. Hence checking for this flag is redundant in this function. The checks in rcu_spawn_one_boost_kthread() and rcu_spawn_all_nocb_kthreads() are similarly redundant. This commit removes the redundant checks for this flag from the above locations. Signed-off-by: Pranith Kumar bobby.pr...@gmail.com

Re: [PATCH 1/1] scripts/get_maintainer: increase threshold for --follow to reduce time

2014-07-15 Thread Pranith Kumar
ping? On Sat, Jul 12, 2014 at 3:25 PM, Pranith Kumar bobby.pr...@gmail.com wrote: get_maintainer tries to follow files with a matching threshold of default 50%. This is not really necessary as we do not change a file and move it in the same commit usually. Increasing the threshold to 90

[PATCH 1/1] doc: Add remote CPU access details to this_cpu_ops.txt

2014-07-15 Thread Pranith Kumar
Add more details from a recent kernel newbies mailing list discussion here: http://www.spinics.net/lists/newbies/msg52747.html Signed-off-by: Pranith Kumar bobby.pr...@gmail.com CC: Christoph Lameter c...@linux.com --- Documentation/this_cpu_ops.txt | 107

Re: [PATCH 1/1] scripts/get_maintainer: increase threshold for --follow to reduce time

2014-07-15 Thread Pranith Kumar
On Wed, Jul 16, 2014 at 12:08 AM, Joe Perches j...@perches.com wrote: On Tue, 2014-07-15 at 22:23 -0400, Pranith Kumar wrote: ping? On Sat, Jul 12, 2014 at 3:25 PM, Pranith Kumar bobby.pr...@gmail.com wrote: get_maintainer tries to follow files with a matching threshold of default 50

[PATCH 1/1] doc: cpu-hotplug.txt: Minor grammar fix

2014-07-14 Thread Pranith Kumar
fix minor grammar in sentence Signed-off-by: Pranith Kumar --- Documentation/cpu-hotplug.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/cpu-hotplug.txt b/Documentation/cpu-hotplug.txt index a0b005d..2ec86f6 100644 --- a/Documentation/cpu-hotplug.txt +++ b

Re: [PATCH RFC tip/core/rcu 2/2] rcu: Create rcuo kthreads only for onlined CPUs

2014-07-14 Thread Pranith Kumar
On 07/14/2014 06:06 AM, Paul E. McKenney wrote: > From: "Paul E. McKenney" > > RCU currently uses for_each_possible_cpu() to spawn rcuo kthreads, > which can result in more rcuo kthreads than one would expect, for > example, derRichard reported 64 CPUs worth of rcuo kthreads on an > 8-CPU image.

Re: [RFC PATCH 1/1] rcu: use atomic_read(v) instead of atomic_add_return(0, v)

2014-07-14 Thread Pranith Kumar
On Sat, Jul 12, 2014 at 8:08 AM, Paul E. McKenney wrote: > > They ensure that any RCU read-side critical sections that took place before > the current (or previous) idle/userspace period on the remote CPU in > question are seen as having completed before the completion of the current > grace

Re: [PATCH 1/1] rcutorture: fixes for printing message buffer

2014-07-14 Thread Pranith Kumar
On 07/11/2014 04:37 PM, Joe Perches wrote: > On Fri, 2014-07-11 at 16:30 -0400, Pranith Kumar wrote: >> Use snprintf() instead of sprintf() for writing to the message buffer. >> Also use vmalloc() for the allocation of the message buffer. Since >> pr_alert() is >> li

Re: [PATCH 1/1] rcutorture: fixes for printing message buffer

2014-07-14 Thread Pranith Kumar
On 07/11/2014 04:37 PM, Joe Perches wrote: On Fri, 2014-07-11 at 16:30 -0400, Pranith Kumar wrote: Use snprintf() instead of sprintf() for writing to the message buffer. Also use vmalloc() for the allocation of the message buffer. Since pr_alert() is limited to print LOG_LINE_MAX characters

Re: [RFC PATCH 1/1] rcu: use atomic_read(v) instead of atomic_add_return(0, v)

2014-07-14 Thread Pranith Kumar
On Sat, Jul 12, 2014 at 8:08 AM, Paul E. McKenney wrote: They ensure that any RCU read-side critical sections that took place before the current (or previous) idle/userspace period on the remote CPU in question are seen as having completed before the completion of the current grace period.

Re: [PATCH RFC tip/core/rcu 2/2] rcu: Create rcuo kthreads only for onlined CPUs

2014-07-14 Thread Pranith Kumar
On 07/14/2014 06:06 AM, Paul E. McKenney wrote: From: Paul E. McKenney paul...@linux.vnet.ibm.com RCU currently uses for_each_possible_cpu() to spawn rcuo kthreads, which can result in more rcuo kthreads than one would expect, for example, derRichard reported 64 CPUs worth of rcuo kthreads

[PATCH 1/1] doc: cpu-hotplug.txt: Minor grammar fix

2014-07-14 Thread Pranith Kumar
fix minor grammar in sentence Signed-off-by: Pranith Kumar bobby.pr...@gmail.com --- Documentation/cpu-hotplug.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/cpu-hotplug.txt b/Documentation/cpu-hotplug.txt index a0b005d..2ec86f6 100644 --- a/Documentation

[PATCH 1/1] doc: fix docbook generation

2014-07-12 Thread Pranith Kumar
kernel/timer.c and kernel/hrtimer.c have moved to kernel/time directory. This causes docbook generation to fail. The following commit fixes it by updating the references. Signed-off-by: Pranith Kumar --- Documentation/DocBook/device-drivers.tmpl | 4 ++-- 1 file changed, 2 insertions(+), 2

[PATCH 1/1] scripts/get_maintainer: increase threshold for --follow to reduce time

2014-07-12 Thread Pranith Kumar
. Time take dropped from 24 sec to 12 sec after this change. It can be reduced further by increasing the threshold, but I think 90% is sufficient. Signed-off-by: Pranith Kumar --- scripts/get_maintainer.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts

[PATCH 1/1] scripts/get_maintainer: increase threshold for --follow to reduce time

2014-07-12 Thread Pranith Kumar
. Time take dropped from 24 sec to 12 sec after this change. It can be reduced further by increasing the threshold, but I think 90% is sufficient. Signed-off-by: Pranith Kumar bobby.pr...@gmail.com --- scripts/get_maintainer.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH 1/1] doc: fix docbook generation

2014-07-12 Thread Pranith Kumar
kernel/timer.c and kernel/hrtimer.c have moved to kernel/time directory. This causes docbook generation to fail. The following commit fixes it by updating the references. Signed-off-by: Pranith Kumar bobby.pr...@gmail.com --- Documentation/DocBook/device-drivers.tmpl | 4 ++-- 1 file changed, 2

[PATCH 1/1] rcutorture: set executable bit and drop bash from Usage

2014-07-11 Thread Pranith Kumar
This patch is on top of the previous changes. Set the executable bit on test scripts config2frag.sh and kvm.sh Since #!/bin/bash is set in all the scripts, drop it from the usage line as the scripts can be invoked directly. Signed-off-by: Pranith Kumar --- tools/testing/selftests/rcutorture

Re: [PATCH 1/1] rcutorture: use bash shell for all the test scripts

2014-07-11 Thread Pranith Kumar
On Fri, Jul 11, 2014 at 7:23 PM, wrote: > On Fri, Jul 11, 2014 at 05:31:27PM -0400, Pranith Kumar wrote: >> Some of the scripts encode a default /bin/sh shell. On systems which use >> dash as >> default shell, these scripts fail as they are bash scripts. I encountered >

Re: [RFC PATCH 1/1] rcu: use atomic_read(v) instead of atomic_add_return(0, v)

2014-07-11 Thread Pranith Kumar
On Fri, Jul 11, 2014 at 5:43 AM, Paul E. McKenney wrote: > On Thu, Jul 10, 2014 at 09:17:33PM -0400, Pranith Kumar wrote: >> On Wed, Jul 9, 2014 at 3:56 PM, Paul E. McKenney >> wrote: >> >> > OK, so ->dynticks_snap is accessed by only one task, namely the &g

[PATCH 1/1] rcutorture: use bash shell for all the test scripts

2014-07-11 Thread Pranith Kumar
explicitly. Signed-off-by: Pranith Kumar --- tools/testing/selftests/rcutorture/bin/config2frag.sh | 4 ++-- tools/testing/selftests/rcutorture/bin/configcheck.sh | 4 ++-- tools/testing/selftests/rcutorture/bin/configinit.sh | 4 ++-- tools/testing/selftests/rcutorture/bin/kvm

Re: [PATCH 1/1] rcutorture: fixes for printing message buffer

2014-07-11 Thread Pranith Kumar
On Fri, Jul 11, 2014 at 4:37 PM, Joe Perches wrote: > On Fri, 2014-07-11 at 16:30 -0400, Pranith Kumar wrote: >> Use snprintf() instead of sprintf() for writing to the message buffer. >> Also use vmalloc() for the allocation of the message buffer. Since >> pr_alert() i

[PATCH 1/1] rcutorture: fixes for printing message buffer

2014-07-11 Thread Pranith Kumar
script as follows: $ dmesg | grep torture > log.txt $ bash parse-torture.sh log.txt test $ There were no warnings which means that parsing went fine. Signed-off-by: Pranith Kumar cc: Joe Perches Link: https://lkml.org/lkml/2014/6/18/604 --- include/linux/torture.h | 2 +- kernel/

[PATCH 1/1] rcutorture: fixes for printing message buffer

2014-07-11 Thread Pranith Kumar
script as follows: $ dmesg | grep torture log.txt $ bash parse-torture.sh log.txt test $ There were no warnings which means that parsing went fine. Signed-off-by: Pranith Kumar bobby.pr...@gmail.com cc: Joe Perches j...@perches.com Link: https://lkml.org/lkml/2014/6/18/604 --- include/linux

Re: [PATCH 1/1] rcutorture: fixes for printing message buffer

2014-07-11 Thread Pranith Kumar
On Fri, Jul 11, 2014 at 4:37 PM, Joe Perches j...@perches.com wrote: On Fri, 2014-07-11 at 16:30 -0400, Pranith Kumar wrote: Use snprintf() instead of sprintf() for writing to the message buffer. Also use vmalloc() for the allocation of the message buffer. Since pr_alert() is limited

[PATCH 1/1] rcutorture: use bash shell for all the test scripts

2014-07-11 Thread Pranith Kumar
explicitly. Signed-off-by: Pranith Kumar bobby.pr...@gmail.com --- tools/testing/selftests/rcutorture/bin/config2frag.sh | 4 ++-- tools/testing/selftests/rcutorture/bin/configcheck.sh | 4 ++-- tools/testing/selftests/rcutorture/bin/configinit.sh | 4 ++-- tools/testing/selftests

Re: [RFC PATCH 1/1] rcu: use atomic_read(v) instead of atomic_add_return(0, v)

2014-07-11 Thread Pranith Kumar
On Fri, Jul 11, 2014 at 5:43 AM, Paul E. McKenney wrote: On Thu, Jul 10, 2014 at 09:17:33PM -0400, Pranith Kumar wrote: On Wed, Jul 9, 2014 at 3:56 PM, Paul E. McKenney paul...@linux.vnet.ibm.com wrote: snip OK, so -dynticks_snap is accessed by only one task, namely the corresponding RCU

Re: [PATCH 1/1] rcutorture: use bash shell for all the test scripts

2014-07-11 Thread Pranith Kumar
On Fri, Jul 11, 2014 at 7:23 PM, j...@joshtriplett.org wrote: On Fri, Jul 11, 2014 at 05:31:27PM -0400, Pranith Kumar wrote: Some of the scripts encode a default /bin/sh shell. On systems which use dash as default shell, these scripts fail as they are bash scripts. I encountered

[PATCH 1/1] rcutorture: set executable bit and drop bash from Usage

2014-07-11 Thread Pranith Kumar
This patch is on top of the previous changes. Set the executable bit on test scripts config2frag.sh and kvm.sh Since #!/bin/bash is set in all the scripts, drop it from the usage line as the scripts can be invoked directly. Signed-off-by: Pranith Kumar bobby.pr...@gmail.com --- tools/testing

Re: [RFC PATCH 1/1] rcu: use atomic_read(v) instead of atomic_add_return(0, v)

2014-07-10 Thread Pranith Kumar
On Wed, Jul 9, 2014 at 3:56 PM, Paul E. McKenney wrote: > OK, so ->dynticks_snap is accessed by only one task, namely the > corresponding RCU grace-period kthread. So it can be accessed without > any atomic instructions or memory barriers, since all accesses to it are > single-threaded. On the

[PATCH 1/1] doc: fix acronym for read-modify-write

2014-07-10 Thread Pranith Kumar
fix acronym for read-modify-write from RMV to RMW Signed-off-by: Pranith Kumar --- Documentation/this_cpu_ops.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/this_cpu_ops.txt b/Documentation/this_cpu_ops.txt index 1a4ce7e..9e44fdf 100644 --- a/Documentation

[PATCH 1/1] doc: fix acronym for read-modify-write

2014-07-10 Thread Pranith Kumar
fix acronym for read-modify-write from RMV to RMW Signed-off-by: Pranith Kumar bobby.pr...@gmail.com --- Documentation/this_cpu_ops.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/this_cpu_ops.txt b/Documentation/this_cpu_ops.txt index 1a4ce7e..9e44fdf

Re: [RFC PATCH 1/1] rcu: use atomic_read(v) instead of atomic_add_return(0, v)

2014-07-10 Thread Pranith Kumar
On Wed, Jul 9, 2014 at 3:56 PM, Paul E. McKenney paul...@linux.vnet.ibm.com wrote: snip OK, so -dynticks_snap is accessed by only one task, namely the corresponding RCU grace-period kthread. So it can be accessed without any atomic instructions or memory barriers, since all accesses to it are

[PATCH 1/1] rcu: use true/false instead of 1/0 for a bool type

2014-07-08 Thread Pranith Kumar
One more bool type change which I found while reading the code. Use true/false instead of 0/1 for a bool type Signed-off-by: Pranith Kumar --- kernel/rcu/tree.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c index 1b70cb6

Re: [RFC PATCH 1/1] rcu: use atomic_read(v) instead of atomic_add_return(0, v)

2014-07-08 Thread Pranith Kumar
On Tue, Jul 8, 2014 at 8:07 PM, Paul E. McKenney wrote: > On Tue, Jul 08, 2014 at 06:55:45PM -0400, Pranith Kumar wrote: >> atomic_add_return() invalidates the cache line in other processors where-as >> atomic_read does not. I don't see why we would need invalidation i

[RFC PATCH 1/1] rcu: use atomic_read(v) instead of atomic_add_return(0, v)

2014-07-08 Thread Pranith Kumar
atomic_add_return(0, v) with atomic_read(v) as the latter is better. Signed-off-by: Pranith Kumar --- kernel/rcu/tree.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c index dac6d20..a4a8f5f 100644 --- a/kernel/rcu/tree.c +++ b/kernel/rcu

Re: [RFC PATCH 5/5] kernel/rcu/rcutorture.c:185 fix a sparse warning

2014-07-08 Thread Pranith Kumar
On Tue, Jul 8, 2014 at 6:35 PM, Paul E. McKenney wrote: > On Wed, Jun 11, 2014 at 02:47:52PM -0700, j...@joshtriplett.org wrote: >> On Wed, Jun 11, 2014 at 04:39:43PM -0400, Pranith Kumar wrote: >> > fix the following sparse warning >> > >> > kernel/rcu

Re: [PATCH 0/9] rcu: trivial sparse and return type fixes for rcu

2014-07-08 Thread Pranith Kumar
This patch series contains trivial fixes for sparse warnings and using bool types where appropriate instead of 0/1. I can probably merge the return type changes into one commit if you think that is appropriate. Pranith Kumar (9): rcu: fix sparse warning about rcu_batches_completed_preempt

[PATCH 2/9] rcu: use bool type for return value in rcu_is_watching()

2014-07-08 Thread Pranith Kumar
use a bool type for return in rcu_is_watching() Signed-off-by: Pranith Kumar --- kernel/rcu/tree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c index dac6d20..dff3d5b 100644 --- a/kernel/rcu/tree.c +++ b/kernel/rcu/tree.c @@ -819,7

[PATCH 3/9] rcu: Fix a sparse warning about boost_mutex being non-static

2014-07-08 Thread Pranith Kumar
fix a sparse warning about boost_mutex being non-static by marking it as static Signed-off-by: Pranith Kumar --- kernel/rcu/rcutorture.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/rcu/rcutorture.c b/kernel/rcu/rcutorture.c index 7fa34f8..5ec0452 100644

[PATCH 1/9] rcu: fix sparse warning about rcu_batches_completed_preempt() being non-static

2014-07-08 Thread Pranith Kumar
fix sparse warning about rcu_batches_completed_preempt() being non-static by marking it as static Signed-off-by: Pranith Kumar --- kernel/rcu/tree_plugin.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/rcu/tree_plugin.h b/kernel/rcu/tree_plugin.h index 637a8a9

[PATCH 4/9] rcu: return bool type for rcu_try_advance_all_cbs()

2014-07-08 Thread Pranith Kumar
return a bool type instead of 0 in rcu_try_advance_all_cbs() Signed-off-by: Pranith Kumar --- kernel/rcu/tree_plugin.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/rcu/tree_plugin.h b/kernel/rcu/tree_plugin.h index 1a4ab26..6c1feee 100644 --- a/kernel/rcu

[PATCH 8/9] rcu: return false instead of 0 in rcu_nocb_adopt_orphan_cbs()

2014-07-08 Thread Pranith Kumar
return false instead of 0 in rcu_nocb_adopt_orphan_cbs() as this has bool as return type Signed-off-by: Pranith Kumar --- kernel/rcu/tree_plugin.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/rcu/tree_plugin.h b/kernel/rcu/tree_plugin.h index 5c21f4b..9a4dc07

<    3   4   5   6   7   8   9   10   >