Re: [PATCH] x86, MCE: Kill CPU_POST_DEAD

2014-05-22 Thread Srivatsa S. Bhat
On 05/23/2014 03:01 AM, Borislav Petkov wrote: > On Fri, May 23, 2014 at 02:43:31AM +0530, Srivatsa S. Bhat wrote: >>>> After you move the cmci_rediscover() call, it is now in a place where we >>>> are >>>> no longer ignoring frozen (i.e. th

Re: [PATCH] intel_rapl: Correct hotplug correction

2014-05-22 Thread Srivatsa S. Bhat
On 05/22/2014 06:02 PM, Peter Zijlstra wrote: > On Thu, May 22, 2014 at 05:24:33PM +0530, Srivatsa S. Bhat wrote: >> Yeah, its complicated and perhaps we can do much better than that. But I'll >> try to explain why there are so many different locks in the existing code. >> [..

Re: [PATCH] x86, MCE: Kill CPU_POST_DEAD

2014-05-22 Thread Srivatsa S. Bhat
y it should be called specifically in the POST_DEAD stage only. So I'm sure we can get rid of that one way or other easily. Regards, Srivatsa S. Bhat >> So we were working around some interaction between cpu hotplug and frozen. >> Do we no longer need to do that? > > Hm

Re: [PATCH] intel_rapl: Correct hotplug correction

2014-05-22 Thread Srivatsa S. Bhat
On 05/22/2014 03:38 PM, Borislav Petkov wrote: > On Thu, May 22, 2014 at 03:13:46PM +0530, Srivatsa S. Bhat wrote: >> On 05/22/2014 02:53 PM, Borislav Petkov wrote: >>> From: Borislav Petkov >>> >>> So 009f225ef050 ("powercap, intel-rapl: Fix CPU hotplug

Re: [PATCH] intel_rapl: Correct hotplug correction

2014-05-22 Thread Srivatsa S. Bhat
to remove the get/put_online_cpus() from intel-rapl driver. Jacob/Srinivas, is the above assumption correct for rapl? Regards, Srivatsa S. Bhat > Let me do what was supposed to be done. > > Cc: Srinivas Pandruvada > Cc: Ingo Molnar > Cc: Jacob Pan > Cc: Srivatsa S. Bhat >

Re: [PATCH] intel_rapl: Correct hotplug correction

2014-05-22 Thread Srivatsa S. Bhat
() from intel-rapl driver. Jacob/Srinivas, is the above assumption correct for rapl? Regards, Srivatsa S. Bhat Let me do what was supposed to be done. Cc: Srinivas Pandruvada srinivas.pandruv...@linux.intel.com Cc: Ingo Molnar mi...@kernel.org Cc: Jacob Pan jacob.jun@linux.intel.com Cc

Re: [PATCH] intel_rapl: Correct hotplug correction

2014-05-22 Thread Srivatsa S. Bhat
On 05/22/2014 03:38 PM, Borislav Petkov wrote: On Thu, May 22, 2014 at 03:13:46PM +0530, Srivatsa S. Bhat wrote: On 05/22/2014 02:53 PM, Borislav Petkov wrote: From: Borislav Petkov b...@suse.de So 009f225ef050 (powercap, intel-rapl: Fix CPU hotplug callback registration) says how get_

Re: [PATCH] x86, MCE: Kill CPU_POST_DEAD

2014-05-22 Thread Srivatsa S. Bhat
.. the original commit 88ccbedd9 didn't explain that. Either way, cmci_rediscover() doesn't seem to have any reason why it should be called specifically in the POST_DEAD stage only. So I'm sure we can get rid of that one way or other easily. Regards, Srivatsa S. Bhat So we were working around some

Re: [PATCH] intel_rapl: Correct hotplug correction

2014-05-22 Thread Srivatsa S. Bhat
On 05/22/2014 06:02 PM, Peter Zijlstra wrote: On Thu, May 22, 2014 at 05:24:33PM +0530, Srivatsa S. Bhat wrote: Yeah, its complicated and perhaps we can do much better than that. But I'll try to explain why there are so many different locks in the existing code. [...] So I think we can

Re: [PATCH] x86, MCE: Kill CPU_POST_DEAD

2014-05-22 Thread Srivatsa S. Bhat
On 05/23/2014 03:01 AM, Borislav Petkov wrote: On Fri, May 23, 2014 at 02:43:31AM +0530, Srivatsa S. Bhat wrote: After you move the cmci_rediscover() call, it is now in a place where we are no longer ignoring frozen (i.e. the old placement did the rediscover even if the CPU_TASKS_FROZEN

Re: [PATCH] x86, MCE: Kill CPU_POST_DEAD

2014-05-22 Thread Srivatsa S. Bhat
banks at the end of CPU_DEAD. Signed-off-by: Borislav Petkov b...@suse.de Reviewed-by: Srivatsa S. Bhat srivatsa.b...@linux.vnet.ibm.com Regards, Srivatsa S. Bhat --- arch/x86/kernel/cpu/mcheck/mce.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/arch/x86

Re: [tip:sched/core] sched: Fix hotplug vs. set_cpus_allowed_ptr()

2014-05-22 Thread Srivatsa S. Bhat
: Paul Gortmaker paul.gortma...@windriver.com Cc: Rafael J. Wysocki rafael.j.wyso...@intel.com Cc: Srivatsa S. Bhat srivatsa.b...@linux.vnet.ibm.com Cc: Toshi Kani toshi.k...@hp.com Link: http://lkml.kernel.org/r/53758b12.8060...@cn.fujitsu.com Signed-off-by: Ingo Molnar mi...@kernel.org Reviewed

Re: [PATCH v3] cpufreq: Catch double invocations of cpufreq_freq_transition_begin/end

2014-05-21 Thread Srivatsa S. Bhat
On 05/21/2014 06:31 PM, Rafael J. Wysocki wrote: > On Wednesday, May 21, 2014 06:02:51 PM Srivatsa S. Bhat wrote: >> On 05/05/2014 02:39 PM, Srivatsa S. Bhat wrote: >>> On 05/05/2014 02:23 PM, Meelis Roos wrote: >>>>> >>>>> Changes in v3: >>&

Re: [PATCH v3] cpufreq: Catch double invocations of cpufreq_freq_transition_begin/end

2014-05-21 Thread Srivatsa S. Bhat
On 05/05/2014 02:39 PM, Srivatsa S. Bhat wrote: > On 05/05/2014 02:23 PM, Meelis Roos wrote: >>> >>> Changes in v3: >>> Expanded the comment in the code to briefly mention why ASYNC_NOTIFICATION >>> drivers are left out from the check, as suggested by

Re: [PATCH v3] cpufreq: Catch double invocations of cpufreq_freq_transition_begin/end

2014-05-21 Thread Srivatsa S. Bhat
On 05/05/2014 02:39 PM, Srivatsa S. Bhat wrote: On 05/05/2014 02:23 PM, Meelis Roos wrote: Changes in v3: Expanded the comment in the code to briefly mention why ASYNC_NOTIFICATION drivers are left out from the check, as suggested by Gautham R. Shenoy. No code changes in this version. v2

Re: [PATCH v3] cpufreq: Catch double invocations of cpufreq_freq_transition_begin/end

2014-05-21 Thread Srivatsa S. Bhat
On 05/21/2014 06:31 PM, Rafael J. Wysocki wrote: On Wednesday, May 21, 2014 06:02:51 PM Srivatsa S. Bhat wrote: On 05/05/2014 02:39 PM, Srivatsa S. Bhat wrote: On 05/05/2014 02:23 PM, Meelis Roos wrote: Changes in v3: Expanded the comment in the code to briefly mention why ASYNC_NOTIFICATION

Re: [PATCH v5 UPDATEDv3 3/3] CPU hotplug, smp: Flush any pending IPI callbacks before CPU offline

2014-05-20 Thread Srivatsa S. Bhat
On 05/20/2014 04:08 PM, Srivatsa S. Bhat wrote: > On 05/20/2014 04:01 PM, Srivatsa S. Bhat wrote: >> On 05/20/2014 03:55 PM, Peter Zijlstra wrote: >>> On Tue, May 20, 2014 at 03:39:59PM +0530, Srivatsa S. Bhat wrote: >>>>> The multi_cpu_stop() path isn't exclus

Re: [PATCH v5 UPDATEDv3 3/3] CPU hotplug, smp: Flush any pending IPI callbacks before CPU offline

2014-05-20 Thread Srivatsa S. Bhat
On 05/20/2014 04:01 PM, Srivatsa S. Bhat wrote: > On 05/20/2014 03:55 PM, Peter Zijlstra wrote: >> On Tue, May 20, 2014 at 03:39:59PM +0530, Srivatsa S. Bhat wrote: >>>> The multi_cpu_stop() path isn't exclusive to hotplug, so your changelog >>>> is wrong or the p

Re: [PATCH] powerpc/powernv: Fix build error when CONFIG_SMP=n

2014-05-20 Thread Srivatsa S. Bhat
> However, includes only on SMP configs and hence UP > builds fail. Fix this by directly including in setup.c > unconditionally. > > Reported-by: Geert Uytterhoeven > Signed-off-by: Shreyas B. Prabhu Reviewed-by: Srivatsa S. Bhat Regards, Srivatsa S. Bhat > --- >

Re: [PATCH v5 UPDATEDv3 3/3] CPU hotplug, smp: Flush any pending IPI callbacks before CPU offline

2014-05-20 Thread Srivatsa S. Bhat
On 05/20/2014 03:55 PM, Peter Zijlstra wrote: > On Tue, May 20, 2014 at 03:39:59PM +0530, Srivatsa S. Bhat wrote: >>> The multi_cpu_stop() path isn't exclusive to hotplug, so your changelog >>> is wrong or the patch is. >>> >> >> Yes, I know that multi_cpu

Re: [PATCH v5 UPDATEDv3 3/3] CPU hotplug, smp: Flush any pending IPI callbacks before CPU offline

2014-05-20 Thread Srivatsa S. Bhat
On 05/20/2014 03:12 PM, Peter Zijlstra wrote: > On Tue, May 20, 2014 at 01:52:41AM +0530, Srivatsa S. Bhat wrote: >> From: Srivatsa S. Bhat >> [PATCH v5 UPDATEDv3 3/3] CPU hotplug, smp: Flush any pending IPI callbacks >> before CPU offline >> >> During CPU offl

Re: [PATCH v5 UPDATEDv3 3/3] CPU hotplug, smp: Flush any pending IPI callbacks before CPU offline

2014-05-20 Thread Srivatsa S. Bhat
On 05/20/2014 03:12 PM, Peter Zijlstra wrote: On Tue, May 20, 2014 at 01:52:41AM +0530, Srivatsa S. Bhat wrote: From: Srivatsa S. Bhat srivatsa.b...@linux.vnet.ibm.com [PATCH v5 UPDATEDv3 3/3] CPU hotplug, smp: Flush any pending IPI callbacks before CPU offline During CPU offline

Re: [PATCH v5 UPDATEDv3 3/3] CPU hotplug, smp: Flush any pending IPI callbacks before CPU offline

2014-05-20 Thread Srivatsa S. Bhat
On 05/20/2014 03:55 PM, Peter Zijlstra wrote: On Tue, May 20, 2014 at 03:39:59PM +0530, Srivatsa S. Bhat wrote: The multi_cpu_stop() path isn't exclusive to hotplug, so your changelog is wrong or the patch is. Yes, I know that multi_cpu_stop() isn't exclusive to hotplug. That's why I have

Re: [PATCH] powerpc/powernv: Fix build error when CONFIG_SMP=n

2014-05-20 Thread Srivatsa S. Bhat
, linux/smp.h includes asm/smp.h only on SMP configs and hence UP builds fail. Fix this by directly including asm/smp.h in setup.c unconditionally. Reported-by: Geert Uytterhoeven ge...@linux-m68k.org Signed-off-by: Shreyas B. Prabhu shre...@linux.vnet.ibm.com Reviewed-by: Srivatsa S. Bhat

Re: [PATCH v5 UPDATEDv3 3/3] CPU hotplug, smp: Flush any pending IPI callbacks before CPU offline

2014-05-20 Thread Srivatsa S. Bhat
On 05/20/2014 04:01 PM, Srivatsa S. Bhat wrote: On 05/20/2014 03:55 PM, Peter Zijlstra wrote: On Tue, May 20, 2014 at 03:39:59PM +0530, Srivatsa S. Bhat wrote: The multi_cpu_stop() path isn't exclusive to hotplug, so your changelog is wrong or the patch is. Yes, I know that multi_cpu_stop

Re: [PATCH v5 UPDATEDv3 3/3] CPU hotplug, smp: Flush any pending IPI callbacks before CPU offline

2014-05-20 Thread Srivatsa S. Bhat
On 05/20/2014 04:08 PM, Srivatsa S. Bhat wrote: On 05/20/2014 04:01 PM, Srivatsa S. Bhat wrote: On 05/20/2014 03:55 PM, Peter Zijlstra wrote: On Tue, May 20, 2014 at 03:39:59PM +0530, Srivatsa S. Bhat wrote: The multi_cpu_stop() path isn't exclusive to hotplug, so your changelog is wrong

[PATCH v5 UPDATEDv3 3/3] CPU hotplug, smp: Flush any pending IPI callbacks before CPU offline

2014-05-19 Thread Srivatsa S. Bhat
On 05/20/2014 01:19 AM, Srivatsa S. Bhat wrote: > On 05/19/2014 09:48 PM, Oleg Nesterov wrote: >> On 05/19, Srivatsa S. Bhat wrote: >>> >>> However, an IPI sent much earlier might arrive late on the target CPU >>> (possibly _after_ the CPU has gone offline) du

Re: [PATCH v5 UPDATEDv2 3/3] CPU hotplug, smp: Flush any pending IPI callbacks before CPU offline

2014-05-19 Thread Srivatsa S. Bhat
On 05/19/2014 09:48 PM, Oleg Nesterov wrote: > On 05/19, Srivatsa S. Bhat wrote: >> >> However, an IPI sent much earlier might arrive late on the target CPU >> (possibly _after_ the CPU has gone offline) due to hardware latencies, >> and due to this, the smp-cal

[PATCH v5 UPDATEDv2 3/3] CPU hotplug, smp: Flush any pending IPI callbacks before CPU offline

2014-05-19 Thread Srivatsa S. Bhat
On 05/16/2014 01:13 AM, Srivatsa S. Bhat wrote: > --- > > From: Srivatsa S. Bhat > [PATCH v5 UPDATED 3/3] CPU hotplug, smp: Flush any pending IPI callbacks > before CPU offline > [...] > diff --git a/ke

[PATCH v5 UPDATEDv2 3/3] CPU hotplug, smp: Flush any pending IPI callbacks before CPU offline

2014-05-19 Thread Srivatsa S. Bhat
On 05/16/2014 01:13 AM, Srivatsa S. Bhat wrote: --- From: Srivatsa S. Bhat srivatsa.b...@linux.vnet.ibm.com [PATCH v5 UPDATED 3/3] CPU hotplug, smp: Flush any pending IPI callbacks before CPU offline [...] diff --git

Re: [PATCH v5 UPDATEDv2 3/3] CPU hotplug, smp: Flush any pending IPI callbacks before CPU offline

2014-05-19 Thread Srivatsa S. Bhat
On 05/19/2014 09:48 PM, Oleg Nesterov wrote: On 05/19, Srivatsa S. Bhat wrote: However, an IPI sent much earlier might arrive late on the target CPU (possibly _after_ the CPU has gone offline) due to hardware latencies, and due to this, the smp-call-function callbacks queued on the outgoing

[PATCH v5 UPDATEDv3 3/3] CPU hotplug, smp: Flush any pending IPI callbacks before CPU offline

2014-05-19 Thread Srivatsa S. Bhat
On 05/20/2014 01:19 AM, Srivatsa S. Bhat wrote: On 05/19/2014 09:48 PM, Oleg Nesterov wrote: On 05/19, Srivatsa S. Bhat wrote: However, an IPI sent much earlier might arrive late on the target CPU (possibly _after_ the CPU has gone offline) due to hardware latencies, and due to this, the smp

Re: [REGRESSION] funny sched_domain build failure during resume

2014-05-16 Thread Srivatsa S. Bhat
lly different either in terms of quantity or the order of the allocation, right? If that's the case, then what happened to the freed memory? Did the page-cache or other caching mechanism launder most of that so soon, that we are forced to rely on reclaim to allocate memory during resume? Isn't that

Re: [REGRESSION] funny sched_domain build failure during resume

2014-05-16 Thread Srivatsa S. Bhat
expect that whatever memory was freed during suspend would naturally remain available during resume as well. Thoughts? Regards, Srivatsa S. Bhat --- From: Johannes Weiner han...@cmpxchg.org Subject: [patch] mm: page_alloc: warn about higher-order allocations during suspend Higher-order

Re: [PATCH v5 2/3] CPU hotplug, stop-machine: Plug race-window that leads to "IPI-to-offline-CPU"

2014-05-15 Thread Srivatsa S. Bhat
On 05/16/2014 12:47 AM, Tejun Heo wrote: > On Fri, May 16, 2014 at 12:43:44AM +0530, Srivatsa S. Bhat wrote: >> During CPU offline, stop-machine is used to take control over all the online >> CPUs (via the per-cpu stopper thread) and then run take_cpu_down() on the CPU >>

[PATCH v5 UPDATED 1/3] smp: Print more useful debug info upon receiving IPI on an offline CPU

2014-05-15 Thread Srivatsa S. Bhat
ficient there. Thanks! ------- From: Srivatsa S. Bhat [PATCH v5 UPDATED 1/3] smp: Print more useful debug info upon receiving IPI on an offline CPU Today the smp-call-function code just prints a warning if we get an IPI on an offline CPU. This info is suff

[PATCH v5 UPDATED 3/3] CPU hotplug, smp: Flush any pending IPI callbacks before CPU offline

2014-05-15 Thread Srivatsa S. Bhat
On 05/16/2014 01:06 AM, Paul E. McKenney wrote: > On Fri, May 16, 2014 at 12:56:11AM +0530, Srivatsa S. Bhat wrote: >> On 05/16/2014 12:49 AM, Tejun Heo wrote: >>> Hello, >>> >>> On Fri, May 16, 2014 at 12:44:13AM +0530, Srivatsa S. Bhat wrote: >>>

Re: [PATCH v5 1/3] smp: Print more useful debug info upon receiving IPI on an offline CPU

2014-05-15 Thread Srivatsa S. Bhat
On 05/16/2014 12:49 AM, Joe Perches wrote: > On Fri, 2014-05-16 at 00:43 +0530, Srivatsa S. Bhat wrote: >> Today the smp-call-function code just prints a warning if we get an IPI on >> an offline CPU. This info is sufficient to let us know that something went >> wrong, but

Re: [PATCH v5 3/3] CPU hotplug, smp: Flush any pending IPI callbacks before CPU offline

2014-05-15 Thread Srivatsa S. Bhat
On 05/16/2014 12:49 AM, Tejun Heo wrote: > Hello, > > On Fri, May 16, 2014 at 12:44:13AM +0530, Srivatsa S. Bhat wrote: >> /* >> + * flush_smp_call_function_queue - Flush any pending smp-call-function > > Don't we need a blank line here? > Hmm? That sentence conti

[PATCH v5 3/3] CPU hotplug, smp: Flush any pending IPI callbacks before CPU offline

2014-05-15 Thread Srivatsa S. Bhat
IPIs can be sent by the other CPUs to the outgoing CPU at that point, because they will all be executing the stop-machine code with interrupts disabled. Suggested-by: Frederic Weisbecker Signed-off-by: Srivatsa S. Bhat --- include/linux/smp.h |2 ++ kernel/smp.c | 32

[PATCH v5 2/3] CPU hotplug, stop-machine: Plug race-window that leads to "IPI-to-offline-CPU"

2014-05-15 Thread Srivatsa S. Bhat
the cpu_online_mask, and hence future invocations of smp_call_function() and friends will automatically prune that CPU out. Thus, we can guarantee that no CPU will end up *inadvertently* sending IPIs to an offline CPU. Signed-off-by: Srivatsa S. Bhat --- kernel/s

[PATCH v5 1/3] smp: Print more useful debug info upon receiving IPI on an offline CPU

2014-05-15 Thread Srivatsa S. Bhat
linked list and print out the payload (i.e., the name of the function which was supposed to be executed by the target CPU). This would give us an insight as to who might have sent the IPI and help us debug this further. Signed-off-by: Srivatsa S. Bhat --- kernel/smp.c | 18 +++--- 1

[PATCH v5 0/3] CPU hotplug: Fix the long-standing "IPI to offline CPU" issue

2014-05-15 Thread Srivatsa S. Bhat
this framework to ensure that the CPU going offline always disables its interrupts last. Suggested by Tejun Heo. v1 and v2: https://lkml.org/lkml/2014/5/6/474 Srivatsa S. Bhat (3): smp: Print more useful debug info upon receiving IPI on an offline CPU CPU hotplug, stop-machine: Plug race

Re: [PATCH v4 2/2] CPU hotplug, stop-machine: Plug race-window that leads to "IPI-to-offline-CPU"

2014-05-15 Thread Srivatsa S. Bhat
On 05/13/2014 09:27 PM, Frederic Weisbecker wrote: > On Tue, May 13, 2014 at 02:32:00PM +0530, Srivatsa S. Bhat wrote: >> >> kernel/stop_machine.c | 39 ++- >> 1 file changed, 34 insertions(+), 5 deletions(-) >> >> diff --git

Re: [PATCH v3 1/2] smp: Print more useful debug info upon receiving IPI on an offline CPU

2014-05-15 Thread Srivatsa S. Bhat
On 05/13/2014 09:08 PM, Frederic Weisbecker wrote: > On Mon, May 12, 2014 at 02:06:49AM +0530, Srivatsa S. Bhat wrote: >> Today the smp-call-function code just prints a warning if we get an IPI on >> an offline CPU. This info is sufficient to let us know that something went >

Re: [PATCH v3 1/2] smp: Print more useful debug info upon receiving IPI on an offline CPU

2014-05-15 Thread Srivatsa S. Bhat
On 05/13/2014 09:08 PM, Frederic Weisbecker wrote: On Mon, May 12, 2014 at 02:06:49AM +0530, Srivatsa S. Bhat wrote: Today the smp-call-function code just prints a warning if we get an IPI on an offline CPU. This info is sufficient to let us know that something went wrong, but often it is very

Re: [PATCH v4 2/2] CPU hotplug, stop-machine: Plug race-window that leads to IPI-to-offline-CPU

2014-05-15 Thread Srivatsa S. Bhat
On 05/13/2014 09:27 PM, Frederic Weisbecker wrote: On Tue, May 13, 2014 at 02:32:00PM +0530, Srivatsa S. Bhat wrote: kernel/stop_machine.c | 39 ++- 1 file changed, 34 insertions(+), 5 deletions(-) diff --git a/kernel/stop_machine.c b/kernel

[PATCH v5 0/3] CPU hotplug: Fix the long-standing IPI to offline CPU issue

2014-05-15 Thread Srivatsa S. Bhat
this framework to ensure that the CPU going offline always disables its interrupts last. Suggested by Tejun Heo. v1 and v2: https://lkml.org/lkml/2014/5/6/474 Srivatsa S. Bhat (3): smp: Print more useful debug info upon receiving IPI on an offline CPU CPU hotplug, stop-machine: Plug race

[PATCH v5 1/3] smp: Print more useful debug info upon receiving IPI on an offline CPU

2014-05-15 Thread Srivatsa S. Bhat
linked list and print out the payload (i.e., the name of the function which was supposed to be executed by the target CPU). This would give us an insight as to who might have sent the IPI and help us debug this further. Signed-off-by: Srivatsa S. Bhat srivatsa.b...@linux.vnet.ibm.com --- kernel

[PATCH v5 2/3] CPU hotplug, stop-machine: Plug race-window that leads to IPI-to-offline-CPU

2014-05-15 Thread Srivatsa S. Bhat
future invocations of smp_call_function() and friends will automatically prune that CPU out. Thus, we can guarantee that no CPU will end up *inadvertently* sending IPIs to an offline CPU. Signed-off-by: Srivatsa S. Bhat srivatsa.b...@linux.vnet.ibm.com --- kernel/stop_machine.c | 39

[PATCH v5 3/3] CPU hotplug, smp: Flush any pending IPI callbacks before CPU offline

2014-05-15 Thread Srivatsa S. Bhat
IPIs can be sent by the other CPUs to the outgoing CPU at that point, because they will all be executing the stop-machine code with interrupts disabled. Suggested-by: Frederic Weisbecker fweis...@gmail.com Signed-off-by: Srivatsa S. Bhat srivatsa.b...@linux.vnet.ibm.com --- include/linux/smp.h

Re: [PATCH v5 3/3] CPU hotplug, smp: Flush any pending IPI callbacks before CPU offline

2014-05-15 Thread Srivatsa S. Bhat
On 05/16/2014 12:49 AM, Tejun Heo wrote: Hello, On Fri, May 16, 2014 at 12:44:13AM +0530, Srivatsa S. Bhat wrote: /* + * flush_smp_call_function_queue - Flush any pending smp-call-function Don't we need a blank line here? Hmm? That sentence continues on the next line, hence I didn't

Re: [PATCH v5 1/3] smp: Print more useful debug info upon receiving IPI on an offline CPU

2014-05-15 Thread Srivatsa S. Bhat
On 05/16/2014 12:49 AM, Joe Perches wrote: On Fri, 2014-05-16 at 00:43 +0530, Srivatsa S. Bhat wrote: Today the smp-call-function code just prints a warning if we get an IPI on an offline CPU. This info is sufficient to let us know that something went wrong, but often it is very hard to debug

[PATCH v5 UPDATED 3/3] CPU hotplug, smp: Flush any pending IPI callbacks before CPU offline

2014-05-15 Thread Srivatsa S. Bhat
On 05/16/2014 01:06 AM, Paul E. McKenney wrote: On Fri, May 16, 2014 at 12:56:11AM +0530, Srivatsa S. Bhat wrote: On 05/16/2014 12:49 AM, Tejun Heo wrote: Hello, On Fri, May 16, 2014 at 12:44:13AM +0530, Srivatsa S. Bhat wrote: /* + * flush_smp_call_function_queue - Flush any pending smp

[PATCH v5 UPDATED 1/3] smp: Print more useful debug info upon receiving IPI on an offline CPU

2014-05-15 Thread Srivatsa S. Bhat
! --- From: Srivatsa S. Bhat srivatsa.b...@linux.vnet.ibm.com [PATCH v5 UPDATED 1/3] smp: Print more useful debug info upon receiving IPI on an offline CPU Today the smp-call-function code just prints a warning if we get an IPI on an offline CPU. This info

Re: [PATCH v5 2/3] CPU hotplug, stop-machine: Plug race-window that leads to IPI-to-offline-CPU

2014-05-15 Thread Srivatsa S. Bhat
On 05/16/2014 12:47 AM, Tejun Heo wrote: On Fri, May 16, 2014 at 12:43:44AM +0530, Srivatsa S. Bhat wrote: During CPU offline, stop-machine is used to take control over all the online CPUs (via the per-cpu stopper thread) and then run take_cpu_down() on the CPU that is to be taken offline

[PATCH v4 2/2] CPU hotplug, stop-machine: Plug race-window that leads to "IPI-to-offline-CPU"

2014-05-13 Thread Srivatsa S. Bhat
On 05/13/2014 02:27 AM, Tejun Heo wrote: > Hello, > > On Mon, May 12, 2014 at 02:07:04AM +0530, Srivatsa S. Bhat wrote: >> @@ -189,10 +191,27 @@ static int multi_cpu_stop(void *data) >> do { >> /* Chill out and ensure we re-read multi_stop_state. *

[PATCH v4 2/2] CPU hotplug, stop-machine: Plug race-window that leads to IPI-to-offline-CPU

2014-05-13 Thread Srivatsa S. Bhat
On 05/13/2014 02:27 AM, Tejun Heo wrote: Hello, On Mon, May 12, 2014 at 02:07:04AM +0530, Srivatsa S. Bhat wrote: @@ -189,10 +191,27 @@ static int multi_cpu_stop(void *data) do { /* Chill out and ensure we re-read multi_stop_state. */ cpu_relax

[PATCH v3 2/2] CPU hotplug, stop-machine: Plug race-window that leads to "IPI-to-offline-CPU"

2014-05-11 Thread Srivatsa S. Bhat
the cpu_online_mask, and hence future invocations of smp_call_function() and friends will automatically prune that CPU out. Thus, we can guarantee that no CPU will end up *inadvertently* sending IPIs to an offline CPU. Signed-off-by: Srivatsa S. Bhat --- kernel/stop_machine.c | 25 +

[PATCH v3 1/2] smp: Print more useful debug info upon receiving IPI on an offline CPU

2014-05-11 Thread Srivatsa S. Bhat
linked list and print out the payload (i.e., the name of the function which was supposed to be executed by the target CPU). This would give us an insight as to who might have sent the IPI and help us debug this further. Signed-off-by: Srivatsa S. Bhat --- kernel/smp.c | 18 ++ 1

[PATCH v3 0/2] CPU hotplug: Fix the long-standing "IPI to offline CPU" issue

2014-05-11 Thread Srivatsa S. Bhat
: MULTI_STOP_DISABLE_IRQ_INACTIVE and MULTI_STOP_DISABLE_IRQ_ACTIVE, and used this framework to ensure that the CPU going offline always disables its interrupts last. Suggested by Tejun Heo. v1 and v2: https://lkml.org/lkml/2014/5/6/474 Srivatsa S. Bhat (2): smp: Print more useful debug info upon receiving

Re: [PATCH v2 2/2] CPU hotplug, stop-machine: Plug race-window that leads to "IPI-to-offline-CPU"

2014-05-11 Thread Srivatsa S. Bhat
On 05/10/2014 08:36 AM, Tejun Heo wrote: > On Wed, May 07, 2014 at 03:31:51AM +0530, Srivatsa S. Bhat wrote: >> diff --git a/kernel/stop_machine.c b/kernel/stop_machine.c >> index 01fbae5..7abb361 100644 >> --- a/kernel/stop_machine.c >> +++ b/kernel/stop_machine.c >

Re: [PATCH v2 2/2] CPU hotplug, stop-machine: Plug race-window that leads to IPI-to-offline-CPU

2014-05-11 Thread Srivatsa S. Bhat
On 05/10/2014 08:36 AM, Tejun Heo wrote: On Wed, May 07, 2014 at 03:31:51AM +0530, Srivatsa S. Bhat wrote: diff --git a/kernel/stop_machine.c b/kernel/stop_machine.c index 01fbae5..7abb361 100644 --- a/kernel/stop_machine.c +++ b/kernel/stop_machine.c @@ -165,12 +165,13 @@ static void

[PATCH v3 1/2] smp: Print more useful debug info upon receiving IPI on an offline CPU

2014-05-11 Thread Srivatsa S. Bhat
linked list and print out the payload (i.e., the name of the function which was supposed to be executed by the target CPU). This would give us an insight as to who might have sent the IPI and help us debug this further. Signed-off-by: Srivatsa S. Bhat srivatsa.b...@linux.vnet.ibm.com --- kernel

[PATCH v3 0/2] CPU hotplug: Fix the long-standing IPI to offline CPU issue

2014-05-11 Thread Srivatsa S. Bhat
: MULTI_STOP_DISABLE_IRQ_INACTIVE and MULTI_STOP_DISABLE_IRQ_ACTIVE, and used this framework to ensure that the CPU going offline always disables its interrupts last. Suggested by Tejun Heo. v1 and v2: https://lkml.org/lkml/2014/5/6/474 Srivatsa S. Bhat (2): smp: Print more useful debug info upon receiving

[PATCH v3 2/2] CPU hotplug, stop-machine: Plug race-window that leads to IPI-to-offline-CPU

2014-05-11 Thread Srivatsa S. Bhat
future invocations of smp_call_function() and friends will automatically prune that CPU out. Thus, we can guarantee that no CPU will end up *inadvertently* sending IPIs to an offline CPU. Signed-off-by: Srivatsa S. Bhat srivatsa.b...@linux.vnet.ibm.com --- kernel/stop_machine.c | 25

Re: [PATCH] CPU hotplug: Slow down hotplug operations

2014-05-07 Thread Srivatsa S. Bhat
ane.org/gmane.linux.kernel/1435249 Attempt to upstream that patchset in parts, v3: http://lwn.net/Articles/556727/ Generic SMP boot/cpu-hotplug framework to consolidate arch/ code: https://lwn.net/Articles/500185/ But, luckily the recent work to fix the notifier deadlock mess actually went upstr

Re: [PATCH] CPU hotplug: Slow down hotplug operations

2014-05-07 Thread Srivatsa S. Bhat
CPU hotplug problem to fix! :-) https://lkml.org/lkml/2014/3/10/522 Regards, Srivatsa S. Bhat -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please

[PATCH v2 2/2] CPU hotplug, stop-machine: Plug race-window that leads to "IPI-to-offline-CPU"

2014-05-06 Thread Srivatsa S. Bhat
> > Ok, I'll open code it and add an appropriate comment explaining the > synchronization. > How about this? ------- From: Srivatsa S. Bhat [PATCH v2 2/2] CPU hotplug, stop-machine: Plug race-window that leads to "

[PATCH v2 1/2] smp: Print more useful debug info upon receiving IPI on an offline CPU

2014-05-06 Thread Srivatsa S. Bhat
s an insight as to who might have sent the IPI and help us debug this further. Signed-off-by: Srivatsa S. Bhat --- kernel/smp.c | 18 ++ 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/kernel/smp.c b/kernel/smp.c index 06d574e..f864921 100644

Re: [PATCH 2/2] CPU hotplug, stop-machine: Plug race-window that leads to "IPI-to-offline-CPU"

2014-05-06 Thread Srivatsa S. Bhat
On 05/07/2014 02:12 AM, Tejun Heo wrote: > On Tue, May 06, 2014 at 01:40:54PM -0700, Andrew Morton wrote: >> On Tue, 06 May 2014 23:33:03 +0530 "Srivatsa S. Bhat" >> wrote: >> >>> --- a/kernel/stop_machine.c >>> +++ b/kernel/stop_machine.c >&

Re: [PATCH 1/2] smp: Print more useful debug info upon receiving IPI on an offline CPU

2014-05-06 Thread Srivatsa S. Bhat
On 05/07/2014 02:04 AM, Andrew Morton wrote: > On Tue, 06 May 2014 23:32:51 +0530 "Srivatsa S. Bhat" > wrote: > >> Today the smp-call-function code just prints a warning if we get an IPI on >> an offline CPU. This info is sufficient to let us know that som

[PATCH 1/2] smp: Print more useful debug info upon receiving IPI on an offline CPU

2014-05-06 Thread Srivatsa S. Bhat
linked list and print out the payload (i.e., the name of the function which was supposed to be executed by the target CPU). This would give us an insight as to who might have sent the IPI and help us debug this further. Signed-off-by: Srivatsa S. Bhat --- kernel/smp.c | 15 ++- 1 file

[PATCH 2/2] CPU hotplug, stop-machine: Plug race-window that leads to "IPI-to-offline-CPU"

2014-05-06 Thread Srivatsa S. Bhat
ot;holding area" for the CPUs marked as 'active_cpus', and use this infrastructure to let the other CPUs progress from one stage to the next, before allowing the active_cpus to do the same thing. Signed-off-by: Srivatsa S. Bhat --- kernel/stop_machine.c | 22 +++--- 1 file changed,

[PATCH 0/2] CPU hotplug: Fix the long-standing "IPI to offline CPU" issue

2014-05-06 Thread Srivatsa S. Bhat
that there is a race-window which makes the IPI _receiver_ the culprit, not the sender. Patch 2 fixes that race and hence this should put an end to most of the hard-to-debug IPI-to-offline-CPU issues. Srivatsa S. Bhat (2): smp: Print more useful debug info upon receiving IPI on an offline CPU

[PATCH 1/2] smp: Print more useful debug info upon receiving IPI on an offline CPU

2014-05-06 Thread Srivatsa S. Bhat
linked list and print out the payload (i.e., the name of the function which was supposed to be executed by the target CPU). This would give us an insight as to who might have sent the IPI and help us debug this further. Signed-off-by: Srivatsa S. Bhat srivatsa.b...@linux.vnet.ibm.com --- kernel

[PATCH 2/2] CPU hotplug, stop-machine: Plug race-window that leads to IPI-to-offline-CPU

2014-05-06 Thread Srivatsa S. Bhat
marked as 'active_cpus', and use this infrastructure to let the other CPUs progress from one stage to the next, before allowing the active_cpus to do the same thing. Signed-off-by: Srivatsa S. Bhat srivatsa.b...@linux.vnet.ibm.com --- kernel/stop_machine.c | 22 +++--- 1 file

[PATCH 0/2] CPU hotplug: Fix the long-standing IPI to offline CPU issue

2014-05-06 Thread Srivatsa S. Bhat
that there is a race-window which makes the IPI _receiver_ the culprit, not the sender. Patch 2 fixes that race and hence this should put an end to most of the hard-to-debug IPI-to-offline-CPU issues. Srivatsa S. Bhat (2): smp: Print more useful debug info upon receiving IPI on an offline CPU

Re: [PATCH 1/2] smp: Print more useful debug info upon receiving IPI on an offline CPU

2014-05-06 Thread Srivatsa S. Bhat
On 05/07/2014 02:04 AM, Andrew Morton wrote: On Tue, 06 May 2014 23:32:51 +0530 Srivatsa S. Bhat srivatsa.b...@linux.vnet.ibm.com wrote: Today the smp-call-function code just prints a warning if we get an IPI on an offline CPU. This info is sufficient to let us know that something went

Re: [PATCH 2/2] CPU hotplug, stop-machine: Plug race-window that leads to IPI-to-offline-CPU

2014-05-06 Thread Srivatsa S. Bhat
On 05/07/2014 02:12 AM, Tejun Heo wrote: On Tue, May 06, 2014 at 01:40:54PM -0700, Andrew Morton wrote: On Tue, 06 May 2014 23:33:03 +0530 Srivatsa S. Bhat srivatsa.b...@linux.vnet.ibm.com wrote: --- a/kernel/stop_machine.c +++ b/kernel/stop_machine.c @@ -165,12 +165,21 @@ static void

[PATCH v2 1/2] smp: Print more useful debug info upon receiving IPI on an offline CPU

2014-05-06 Thread Srivatsa S. Bhat
to hand-code things. Like this? Yeah, this version looks better. Sorry for missing this earlier. I'll incorporate this in my next version of the patchset. Here is the updated patch: - From: Srivatsa S. Bhat srivatsa.b

[PATCH v2 2/2] CPU hotplug, stop-machine: Plug race-window that leads to IPI-to-offline-CPU

2014-05-06 Thread Srivatsa S. Bhat
this? --- From: Srivatsa S. Bhat srivatsa.b...@linux.vnet.ibm.com [PATCH v2 2/2] CPU hotplug, stop-machine: Plug race-window that leads to IPI-to-offline-CPU During CPU offline, stop-machine is used to take control over all

Re: [PATCH v3] cpufreq: Catch double invocations of cpufreq_freq_transition_begin/end

2014-05-05 Thread Srivatsa S. Bhat
t; v2: https://lkml.org/lkml/2014/4/29/283 >> v1: https://lkml.org/lkml/2014/4/28/469 > > Seems to work on VIA EPIA with 3.15-rc2 (no other cpufreq fixes): > Great! Thanks a lot for testing this! Rafael/Viresh, can you please add Meelis' Tested-by while taking this patch?

[PATCH v3] cpufreq: Catch double invocations of cpufreq_freq_transition_begin/end

2014-05-05 Thread Srivatsa S. Bhat
for invoking _begin()/_end() and hence there shouldn't be any conflicts which lead to double invocations. So, we can skip these drivers, since the probability that such drivers will hit this problem is extremely low, as outlined above. Signed-off-by: Srivatsa S. Bhat Acked-by: Viresh Kumar

[PATCH v3] cpufreq: Catch double invocations of cpufreq_freq_transition_begin/end

2014-05-05 Thread Srivatsa S. Bhat
for invoking _begin()/_end() and hence there shouldn't be any conflicts which lead to double invocations. So, we can skip these drivers, since the probability that such drivers will hit this problem is extremely low, as outlined above. Signed-off-by: Srivatsa S. Bhat srivatsa.b

Re: [PATCH v3] cpufreq: Catch double invocations of cpufreq_freq_transition_begin/end

2014-05-05 Thread Srivatsa S. Bhat
://lkml.org/lkml/2014/4/28/469 Seems to work on VIA EPIA with 3.15-rc2 (no other cpufreq fixes): Great! Thanks a lot for testing this! Rafael/Viresh, can you please add Meelis' Tested-by while taking this patch? Thank you! Regards, Srivatsa S. Bhat [8.250959] [ cut here

Re: [BUG] kernel BUG at mm/vmacache.c:85!

2014-04-30 Thread Srivatsa S. Bhat
On 05/01/2014 12:48 AM, Srivatsa S. Bhat wrote: > On 05/01/2014 12:46 AM, Srivatsa S. Bhat wrote: >> On 04/29/2014 03:29 PM, Srivatsa S. Bhat wrote: >>> On 04/29/2014 03:55 AM, Linus Torvalds wrote: >>>> On Mon, Apr 28, 2014 at 3:14 PM, Davidlohr Bueso wrote: >

Re: [BUG] kernel BUG at mm/vmacache.c:85!

2014-04-30 Thread Srivatsa S. Bhat
On 05/01/2014 12:46 AM, Srivatsa S. Bhat wrote: > On 04/29/2014 03:29 PM, Srivatsa S. Bhat wrote: >> On 04/29/2014 03:55 AM, Linus Torvalds wrote: >>> On Mon, Apr 28, 2014 at 3:14 PM, Davidlohr Bueso wrote: >>>> >>>> I think that returning some

Re: [BUG] kernel BUG at mm/vmacache.c:85!

2014-04-30 Thread Srivatsa S. Bhat
On 05/01/2014 12:46 AM, Srivatsa S. Bhat wrote: On 04/29/2014 03:29 PM, Srivatsa S. Bhat wrote: On 04/29/2014 03:55 AM, Linus Torvalds wrote: On Mon, Apr 28, 2014 at 3:14 PM, Davidlohr Bueso davidl...@hp.com wrote: I think that returning some stale/bogus vma is causing those segfaults

Re: [BUG] kernel BUG at mm/vmacache.c:85!

2014-04-30 Thread Srivatsa S. Bhat
On 05/01/2014 12:48 AM, Srivatsa S. Bhat wrote: On 05/01/2014 12:46 AM, Srivatsa S. Bhat wrote: On 04/29/2014 03:29 PM, Srivatsa S. Bhat wrote: On 04/29/2014 03:55 AM, Linus Torvalds wrote: On Mon, Apr 28, 2014 at 3:14 PM, Davidlohr Bueso davidl...@hp.com wrote: I think that returning some

Re: [PATCH v2] cpufreq: Catch double invocations of cpufreq_freq_transition_begin/end

2014-04-29 Thread Srivatsa S. Bhat
On 04/29/2014 06:39 PM, Meelis Roos wrote: >> >> Signed-off-by: Srivatsa S. Bhat >> --- >> >> v2: Removed the coverage of ASYNC_NOTIFICATION drivers, in order to avoid >> false-positives. > > I am confused - on top of what patches should I test it? &

Re: [PATCH] vmacache: change vmacache_find() to always check ->vm_mm

2014-04-29 Thread Srivatsa S. Bhat
On 04/29/2014 06:22 PM, Oleg Nesterov wrote: > On 04/29, Srivatsa S. Bhat wrote: >> >> I guess I'll hold off on testing this fix until I get to reproduce >> the bug more reliably.. > > perhaps the

[PATCH v2] cpufreq: Catch double invocations of cpufreq_freq_transition_begin/end

2014-04-29 Thread Srivatsa S. Bhat
for invoking _begin()/_end() and hence there shouldn't be any conflicts which lead to double invocations. So, we can skip these drivers, since the probability that such drivers will hit this problem is extremely low, as outlined above. Signed-off-by: Srivatsa S. Bhat --- v2: Removed the coverage

Re: [BUG] kernel BUG at mm/vmacache.c:85!

2014-04-29 Thread Srivatsa S. Bhat
gt; - the mm of a thread changed >> >>This is exec, use_mm(), and fork() (and fork really only just >> because we copy the vmacache). >> >>exec and fork do that "vmacache_flush(tsk)", which is why I was >> looking at use_mm(). > > Here'

Re: [BUG] kernel BUG at mm/vmacache.c:85!

2014-04-29 Thread Srivatsa S. Bhat
which have a higher likelihood of hitting this (like running multi- threaded workloads or whatever), I could probably give it a try as well. Thank you! Regards, Srivatsa S. Bhat -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord

Re: [BUG] kernel BUG at mm/vmacache.c:85!

2014-04-29 Thread Srivatsa S. Bhat
On 04/29/2014 05:30 AM, Dave Jones wrote: > On Tue, Apr 29, 2014 at 12:48:14AM +0530, Srivatsa S. Bhat wrote: > > Hi, > > > > I hit this during boot on v3.15-rc3, just once so far. > > Subsequent reboots went fine, and a few quick runs of multi- > > thr

Re: [PATCH v2 5/5] cpufreq: Catch double invocations of cpufreq_freq_transition_begin/end

2014-04-29 Thread Srivatsa S. Bhat
On 04/29/2014 01:34 PM, Viresh Kumar wrote: > On 29 April 2014 13:05, Srivatsa S. Bhat > wrote: >> On 04/29/2014 12:19 PM, Viresh Kumar wrote: >>> + WARN_ON(!(cpufreq_driver->flags & CPUFREQ_ASYNC_NOTIFICATION) >>> &

Re: [BUG] kernel BUG at mm/vmacache.c:85!

2014-04-29 Thread Srivatsa S. Bhat
tasks are special" check. >> >> Srivatsa, are you doing something peculiar on that system that would >> trigger this? I see some kdump failures in the log, anything else? > > Is this perhaps a KVM guest? fwiw I see CONFIG_KVM_ASYNC_PF=y which is a > u

Re: [BUG] kernel BUG at mm/vmacache.c:85!

2014-04-29 Thread Srivatsa S. Bhat
ome kdump failures in the log, anything else? > No, it was just plain booting. The machine is simply configured with kdump, that's all. I'm surprised that so many processes got segfaults during boot. Looks like an mm bug in the kernel. Regards, Srivatsa S. Bhat -- To unsubscribe from this

Re: [PATCH v2 5/5] cpufreq: Catch double invocations of cpufreq_freq_transition_begin/end

2014-04-29 Thread Srivatsa S. Bhat
On 04/29/2014 12:19 PM, Viresh Kumar wrote: > On 29 April 2014 11:46, Srivatsa S. Bhat > wrote: >> Yes, I'm aware that this corner case doesn't work well with my debug > > Don't know if its a corner case, it may be the most obvious case for > some :) > Yeah, it could

<    1   2   3   4   5   6   7   8   9   10   >