Re: [RFC PATCH 4/9] irq_work: Let the arch tell us about self-IPI support

2012-10-29 Thread Frederic Weisbecker
2012/10/29 Steven Rostedt rost...@goodmis.org: On Mon, 2012-10-29 at 14:28 +0100, Frederic Weisbecker wrote: This prepares us to make printk working on nohz CPUs using irq work. -ENOTENOUGHINFO Please state how this prepares printk for nohz CPUS using irq_work. RIght, I'll add the details

Re: [RFC PATCH 9/9] printk: Wake up klogd using irq_work

2012-10-29 Thread Frederic Weisbecker
2012/10/29 Steven Rostedt rost...@goodmis.org: On Mon, 2012-10-29 at 14:28 +0100, Frederic Weisbecker wrote: klogd is woken up asynchronously from the tick in order to do it safely. However if printk is called when the tick is stopped, the reader won't be woken up until the next interrupt

[GIT PULL] cputime: Cleanups and optimizations

2012-10-29 Thread Frederic Weisbecker
a bit scattered around * Separate irqtime and vtime namespaces that were colliding, resulting in useless calls to irqtime accounting. * Slightly optimize irq and guest vtime accounting. Signed-off-by: Frederic Weisbecker fweis...@gmail.com

[PATCH 1/2] irq_work: Fix racy check on work pending flag

2012-10-30 Thread Frederic Weisbecker
-by: Frederic Weisbecker fweis...@gmail.com Cc: Peter Zijlstra pet...@infradead.org Cc: Ingo Molnar mi...@kernel.org Cc: Thomas Gleixner t...@linutronix.de Cc: Andrew Morton a...@linux-foundation.org Cc: Steven Rostedt rost...@goodmis.org Cc: Paul Gortmaker paul.gortma...@windriver.com --- kernel

[PATCH 2/2] irq_work: Fix racy IRQ_WORK_BUSY flag setting

2012-10-30 Thread Frederic Weisbecker
in claim) execute_work (sees data from CPU 0) try to claim As a shortcut, let's just use xchg() that implies a full memory barrier. Signed-off-by: Frederic Weisbecker fweis...@gmail.com Cc: Peter Zijlstra pet...@infradead.org Cc: Ingo Molnar mi...@kernel.org Cc: Thomas Gleixner t...@linutronix.de

[PATCH 0/2] irq_work: A couple fixes

2012-10-30 Thread Frederic Weisbecker
Hi, The first patch is extracted from my printk patches, with changelog reworked. The second patch is an addition. And I still wonder if cpu_relax() is enough to prevent the compiler from correctly reloading work-flags in irq_work_sync() loop. Do we need ACCESS_ONCE()? Thanks. Frederic

Re: [PATCH 0/2] irq_work: A couple fixes

2012-10-30 Thread Frederic Weisbecker
2012/10/30 Steven Rostedt rost...@goodmis.org: On Tue, 2012-10-30 at 16:34 +0100, Frederic Weisbecker wrote: Hi, And I still wonder if cpu_relax() is enough to prevent the compiler from correctly reloading work-flags in irq_work_sync() loop. Do we need ACCESS_ONCE()? You mean this loop

Re: [PATCH 0/2] irq_work: A couple fixes

2012-10-30 Thread Frederic Weisbecker
2012/10/30 Steven Rostedt rost...@goodmis.org: On Tue, 2012-10-30 at 17:25 +0100, Frederic Weisbecker wrote: No I was worried about the cpu_relax() in irq_work_sync() That one is fine too, as this is the purpose of cpu_relax(). Not only to relax the cpu, but also to tell gcc that the loop

Re: [PATCH 04/32] x86: New cpuset nohz irq vector

2012-10-30 Thread Frederic Weisbecker
2012/10/30 Steven Rostedt rost...@goodmis.org: On Mon, 2012-10-29 at 16:27 -0400, Steven Rostedt wrote: plain text document attachment (0004-x86-New-cpuset-nohz-irq-vector.patch) From: Frederic Weisbecker fweis...@gmail.com We need a way to send an IPI (remote or local) in order

Re: [PATCH 10/32] nohz/cpuset: Restart the tick if printk needs it

2012-10-30 Thread Frederic Weisbecker
2012/10/30 Steven Rostedt rost...@goodmis.org: Probably need to at least disable preemption. I don't see any requirement that wake_up_klogd() needs to be called with preemption disabled. The this_cpu_or() doesn't care which CPU it triggers, but the enabling of nohz does. This patch is

Re: [PATCH 2/2] irq_work: Fix racy IRQ_WORK_BUSY flag setting

2012-10-30 Thread Frederic Weisbecker
2012/10/30 anish kumar anish198519851...@gmail.com: As I understand without the memory barrier proposed by you the situation would be as below: CPU 0 CPU 1 data = something flags = IRQ_WORK_BUSY smp_mb() (implicit with cmpxchg

Re: [PATCH 04/32] x86: New cpuset nohz irq vector

2012-10-30 Thread Frederic Weisbecker
2012/10/31 Steven Rostedt rost...@goodmis.org: On Wed, 2012-10-31 at 00:51 +0100, Frederic Weisbecker wrote: Probably just use irq_work for self ipis, and normal ipis for other CPUs. Right. And that's one more reason why we want to know if the arch implements irq work with self ipis

Re: [PATCH 2/2] irq_work: Fix racy IRQ_WORK_BUSY flag setting

2012-10-30 Thread Frederic Weisbecker
2012/10/31 Steven Rostedt rost...@goodmis.org: More confidence over what? The xchg()? They are equivalent (wrt memory barriers). Here's the issue that currently exists. Let's look at the code: /* * Claim the entry so that no one else will poke at it. */ static bool

Re: [PATCH 2/2] irq_work: Fix racy IRQ_WORK_BUSY flag setting

2012-10-31 Thread Frederic Weisbecker
2012/10/31 Steven Rostedt rost...@goodmis.org: On Wed, 2012-10-31 at 20:04 +0900, anish kumar wrote: nflags = 1 | 3 nflags = 2 | 3 In both cases the result would be same.If I am right then wouldn't this operation be redundant? Right. Actually we could change the new loop to: for

Re: [PATCH tip/core/rcu 1/2] rcu: Add callback-free CPUs

2012-10-31 Thread Frederic Weisbecker
2012/10/31 Paul E. McKenney paul...@linux.vnet.ibm.com: +/* + * Per-rcu_data kthread, but only for no-CBs CPUs. Each kthread invokes + * callbacks queued by the corresponding no-CBs CPU. + */ +static int rcu_nocb_kthread(void *arg) +{ + int c, cl; + struct rcu_head *list; +

[PATCH 0/2] irq_work: A couple fixes v2

2012-11-02 Thread Frederic Weisbecker
Hey, After some discussion with Steve, this is a respin with changelogs and comments sanitized. The code itself hasn't changed. Thanks. Frederic Weisbecker (2): irq_work: Fix racy IRQ_WORK_BUSY flag setting irq_work: Fix racy check on work pending flag kernel/irq_work.c | 21

[PATCH 1/2] irq_work: Fix racy IRQ_WORK_BUSY flag setting

2012-11-02 Thread Frederic Weisbecker
ordering. Changelog-heavily-inspired-by: Steven Rostedt rost...@goodmis.org Signed-off-by: Frederic Weisbecker fweis...@gmail.com Cc: Peter Zijlstra pet...@infradead.org Cc: Ingo Molnar mi...@kernel.org Cc: Thomas Gleixner t...@linutronix.de Cc: Andrew Morton a...@linux-foundation.org Cc: Steven Rostedt

[PATCH 2/2] irq_work: Fix racy check on work pending flag

2012-11-02 Thread Frederic Weisbecker
the value we wish to be in the work-flags but we only make any conclusion after the value returned by the cmpxchg() call that either claims the work or let the current owner handle the pending work for us. Changelog-heavily-inspired-by: Steven Rostedt rost...@goodmis.org Signed-off-by: Frederic

Re: rcu self-detected stall messages on OMAP3, 4 boards

2012-09-22 Thread Frederic Weisbecker
2012/9/22 Paul E. McKenney paul...@linux.vnet.ibm.com: On Fri, Sep 21, 2012 at 01:31:49PM -0700, Tony Lindgren wrote: * Paul E. McKenney paul...@linux.vnet.ibm.com [120921 12:58]: Just to make sure I understand the combinations: o All stalls have happened when running a minimal

Re: RCU idle CPU detection is broken in linux-next

2012-09-24 Thread Frederic Weisbecker
2012/9/23 Sasha Levin levinsasha...@gmail.com: On 09/23/2012 02:21 AM, Paul E. McKenney wrote: On Sat, Sep 22, 2012 at 02:27:35PM -0700, Paul E. McKenney wrote: On Sat, Sep 22, 2012 at 07:50:29PM +0200, Sasha Levin wrote: On 09/22/2012 05:56 PM, Paul E. McKenney wrote: And now the prime

Re: RCU idle CPU detection is broken in linux-next

2012-09-24 Thread Frederic Weisbecker
2012/9/25 Sasha Levin levinsasha...@gmail.com: On 09/25/2012 12:47 AM, Sasha Levin wrote: - While I no longer see the warnings I've originally noticed, if I run with Paul's last debug patch I see the following warning: Correction: Original warnings are still there, they just got buried in

Re: RCU idle CPU detection is broken in linux-next

2012-09-24 Thread Frederic Weisbecker
2012/9/25 Sasha Levin levinsasha...@gmail.com: On 09/25/2012 01:06 AM, Frederic Weisbecker wrote: 2012/9/25 Sasha Levin levinsasha...@gmail.com: On 09/25/2012 12:47 AM, Sasha Levin wrote: - While I no longer see the warnings I've originally noticed, if I run with Paul's last debug patch I

Re: RCU idle CPU detection is broken in linux-next

2012-09-24 Thread Frederic Weisbecker
2012/9/25 Frederic Weisbecker fweis...@gmail.com: 2012/9/25 Sasha Levin levinsasha...@gmail.com: On 09/25/2012 01:06 AM, Frederic Weisbecker wrote: 2012/9/25 Sasha Levin levinsasha...@gmail.com: On 09/25/2012 12:47 AM, Sasha Levin wrote: - While I no longer see the warnings I've originally

Re: RCU idle CPU detection is broken in linux-next

2012-09-25 Thread Frederic Weisbecker
On Mon, Sep 24, 2012 at 09:04:20PM -0700, Paul E. McKenney wrote: On Tue, Sep 25, 2012 at 01:41:18AM +0200, Frederic Weisbecker wrote: [ 168.703017] [ cut here ] [ 168.708117] WARNING: at kernel/rcutree.c:502 rcu_eqs_exit_common+0x4a/0x3a0() [ 168.710034

Re: RCU idle CPU detection is broken in linux-next

2012-09-25 Thread Frederic Weisbecker
On Tue, Sep 25, 2012 at 01:10:27AM +0200, Sasha Levin wrote: On 09/25/2012 01:06 AM, Frederic Weisbecker wrote: 2012/9/25 Sasha Levin levinsasha...@gmail.com: On 09/25/2012 12:47 AM, Sasha Levin wrote: - While I no longer see the warnings I've originally noticed, if I run with Paul's

[PATCH] x86: Unspaghettize do_trap()

2012-09-25 Thread Frederic Weisbecker
Cleanup the label maze in this function. Having a seperate function to first handle the traps that don't generate a signal makes it easier to convert into more readable conditional paths. Signed-off-by: Frederic Weisbecker fweis...@gmail.com Cc: Thomas Gleixner t...@linutronix.de Cc: Ingo Molnar

[GIT PULL] cputime: More cleanups v2

2012-09-25 Thread Frederic Weisbecker
option (reported by Russell King) Please pull from: git://github.com/fweisbec/linux-dynticks.git cputime/cleanups-v2 It is based on tip:sched/core Thanks. Frederic Weisbecker (6): cputime: Use a proper subsystem naming for vtime related APIs vtime: Consolidate system/idle context

[PATCH 1/6] cputime: Use a proper subsystem naming for vtime related APIs

2012-09-25 Thread Frederic Weisbecker
to find out the context we account to from generic code. This also make it better to know on which subsystem these APIs refer to. Signed-off-by: Frederic Weisbecker fweis...@gmail.com Cc: Tony Luck tony.l...@intel.com Cc: Fenghua Yu fenghua...@intel.com Cc: Benjamin Herrenschmidt b

[PATCH 2/6] vtime: Consolidate system/idle context detection

2012-09-25 Thread Frederic Weisbecker
the generic code to decide when to call which API. Archs that have their own meaning of idle time, such as s390 that only considers the time spent in CPU low power mode as idle time, can just override vtime_account(). Signed-off-by: Frederic Weisbecker fweis...@gmail.com Cc: Tony Luck tony.l...@intel.com Cc

[PATCH 3/6] ia64: Consolidate user vtime accounting

2012-09-25 Thread Frederic Weisbecker
Factorize the code that accounts user time into a single function to avoid code duplication. Signed-off-by: Frederic Weisbecker fweis...@gmail.com Cc: Tony Luck tony.l...@intel.com Cc: Fenghua Yu fenghua...@intel.com Cc: Benjamin Herrenschmidt b...@kernel.crashing.org Cc: Paul Mackerras pau

[PATCH 4/6] ia64: Reuse system and user vtime accounting functions on task switch

2012-09-25 Thread Frederic Weisbecker
To avoid code duplication. Signed-off-by: Frederic Weisbecker fweis...@gmail.com Cc: Tony Luck tony.l...@intel.com Cc: Fenghua Yu fenghua...@intel.com Cc: Benjamin Herrenschmidt b...@kernel.crashing.org Cc: Paul Mackerras pau...@samba.org Cc: Martin Schwidefsky schwidef...@de.ibm.com Cc: Heiko

[PATCH 5/6] cputime: Gather time/stats accounting config options into a single menu

2012-09-25 Thread Frederic Weisbecker
This debloats a bit the general config menu and make these config options easier to find. Signed-off-by: Frederic Weisbecker fweis...@gmail.com Cc: Tony Luck tony.l...@intel.com Cc: Fenghua Yu fenghua...@intel.com Cc: Benjamin Herrenschmidt b...@kernel.crashing.org Cc: Paul Mackerras pau

[PATCH 6/6] cputime: Make finegrained irqtime accounting generally available

2012-09-25 Thread Frederic Weisbecker
. Signed-off-by: Frederic Weisbecker fweis...@gmail.com Cc: Tony Luck tony.l...@intel.com Cc: Fenghua Yu fenghua...@intel.com Cc: Benjamin Herrenschmidt b...@kernel.crashing.org Cc: Paul Mackerras pau...@samba.org Cc: Martin Schwidefsky schwidef...@de.ibm.com Cc: Heiko Carstens heiko.carst

Re: [PATCH] x86: Unspaghettize do_trap()

2012-09-26 Thread Frederic Weisbecker
2012/9/26 Ingo Molnar mi...@kernel.org: * Frederic Weisbecker fweis...@gmail.com wrote: + return -1 this bit wasn't very well tested. I applied it with the obvious fix, lets hope it holds up in testing. Ouch. Bad indeed. I booted with x86-64 but forgot to try x86-32. Sorry

Re: RCU idle CPU detection is broken in linux-next

2012-09-26 Thread Frederic Weisbecker
2012/9/25 Paul E. McKenney paul...@linux.vnet.ibm.com: On Tue, Sep 25, 2012 at 01:59:26PM +0200, Frederic Weisbecker wrote: Given that we have: rcu_irq_enter() rcu_user_exit() rcu_user_enter() rcu_irq_exit() Indeed, the code to deal with irq misnestings won't like that at all

Re: RCU idle CPU detection is broken in linux-next

2012-09-26 Thread Frederic Weisbecker
2012/9/25 Sasha Levin levinsasha...@gmail.com: On 09/25/2012 02:06 PM, Frederic Weisbecker wrote: Sasha, sorry to burden you with more testing request. Could you please try out this new branch? It includes some fixes after Wu Fenguang and Dan Carpenter reports (not related to your warnings

Re: RCU idle CPU detection is broken in linux-next

2012-09-26 Thread Frederic Weisbecker
On Tue, Sep 25, 2012 at 11:36:54AM -0700, Paul E. McKenney wrote: On Tue, Sep 25, 2012 at 08:28:23PM +0200, Sasha Levin wrote: On 09/25/2012 02:06 PM, Frederic Weisbecker wrote: Sasha, sorry to burden you with more testing request. Could you please try out this new branch? It includes

Re: powerpc/perf: hw breakpoints return ENOSPC

2012-09-27 Thread Frederic Weisbecker
2012/9/25 Michael Neuling mi...@neuling.org: Michael Neuling mi...@neuling.org wrote: Frederic Weisbecker fweis...@gmail.com wrote: On Thu, Aug 16, 2012 at 02:23:54PM +1000, Michael Neuling wrote: Hi, I've been trying to get hardware breakpoints with perf to work on POWER7

Re: [RFC/PATCHSET 00/15] perf report: Add support to accumulate hist periods

2012-09-27 Thread Frederic Weisbecker
On Tue, Sep 25, 2012 at 01:57:26PM +0900, Namhyung Kim wrote: Ping. Any comments for this? Arun, thanks for testing! Namhyung When Arun was working on this, I asked him to explore if it could make sense to reuse the -b, --branch-stack perf report option. Because after all, this feature

Re: [PATCHv3] perf x86_64: Fix rsp register for system call fast path

2012-10-03 Thread Frederic Weisbecker
On Wed, Oct 03, 2012 at 02:29:47PM +0200, Jiri Olsa wrote: +#ifdef CONFIG_X86_64 +__weak void Only annotate with __weak the default implementation you want to be overriden. Here you want it to actually override the default __weak version. +arch_sample_regs_user_fixup(struct perf_regs_user

Re: [PATCH] make CONFIG_EXPERIMENTAL invisible and default

2012-10-03 Thread Frederic Weisbecker
Morton a...@linux-foundation.org CC: Frederic Weisbecker fweis...@gmail.com Signed-off-by: Kees Cook keesc...@chromium.org --- This is the first of a series of 202 patches removing EXPERIMENTAL from all the Kconfigs in the tree. Should I send them all to lkml

[PATCH] rcu: Remove rcu_switch()

2012-10-03 Thread Frederic Weisbecker
It's only there to call rcu_user_hooks_switch(). Let's just call rcu_user_hooks_switch() directly, we don't need this function in the middle. Signed-off-by: Frederic Weisbecker fweis...@gmail.com Cc: Josh Triplett j...@joshtriplett.org Cc: Peter Zijlstra pet...@infradead.org --- include/linux

Re: [PATCH] rcu: Remove rcu_switch()

2012-10-03 Thread Frederic Weisbecker
On Wed, Oct 03, 2012 at 11:39:45AM -0700, Paul E. McKenney wrote: On Wed, Oct 03, 2012 at 08:21:52PM +0200, Frederic Weisbecker wrote: It's only there to call rcu_user_hooks_switch(). Let's just call rcu_user_hooks_switch() directly, we don't need this function in the middle. Hello

Re: [PATCH] make CONFIG_EXPERIMENTAL invisible and default

2012-10-03 Thread Frederic Weisbecker
On Wed, Oct 03, 2012 at 11:43:32AM -0700, Kees Cook wrote: I would expect a simple addition of this is dangerous/buggy to the description and default n is likely the way to go for that kind of thing. Agreed. I think the history of CONFIG_EXPERIMENTAL has proven there isn't a sensible way to

Re: [PATCH] make CONFIG_EXPERIMENTAL invisible and default

2012-10-03 Thread Frederic Weisbecker
On Wed, Oct 03, 2012 at 03:36:53PM -0400, Dave Jones wrote: On Wed, Oct 03, 2012 at 07:46:18PM +0200, Frederic Weisbecker wrote: it in the kernel tree, unless we wanted people to use the option? A solution could be to add that option under CONFIG_DEBUG_KERNEL and specify

Re: [PATCH 1/3] perf tools: Check existence of _get_comp_words_by_ref when bash completing

2012-10-04 Thread Frederic Weisbecker
On Thu, Oct 04, 2012 at 10:43:03AM +0900, Namhyung Kim wrote: Hi Frederic, On Tue, 2 Oct 2012 17:54:10 +0200, Frederic Weisbecker wrote: On Wed, Oct 03, 2012 at 12:21:32AM +0900, Namhyung Kim wrote: The '_get_comp_words_by_ref' function is available from the bash completion v1.2 so

Re: RCU_USER_QS traces.

2012-10-05 Thread Frederic Weisbecker
also need to enable: - CONFIG_EVENT_TRACING and CONFIG_RCU_TRACE And you also need this boot parameter: - trace_event=rcu_dyntick Thanks a lot! --- From 824f2ef855597d6dd263bb363727e4585db88ca3 Mon Sep 17 00:00:00 2001 From: Frederic Weisbecker fweis...@gmail.com Date: Thu, 4 Oct 2012 17:30:36

Re: [PATCH 33/42] perf tools: Complete tracepoint event names

2012-10-05 Thread Frederic Weisbecker
On Thu, Oct 04, 2012 at 03:08:33PM -0300, Arnaldo Carvalho de Melo wrote: From: Namhyung Kim namhyung@lge.com Currently tracepoint events cannot be completed because they contain a colon (:) character. The colon is considered as a word separator when bash completion is done - variable

Re: [PATCH] make CONFIG_EXPERIMENTAL invisible and default

2012-10-06 Thread Frederic Weisbecker
2012/10/5 Paul E. McKenney paul...@linux.vnet.ibm.com: On Thu, Oct 04, 2012 at 07:31:50AM -0700, Paul E. McKenney wrote: On Thu, Oct 04, 2012 at 02:55:39AM +0100, Matthew Garrett wrote: On Wed, Oct 03, 2012 at 01:03:14PM -0700, Paul E. McKenney wrote: That has not proven sufficient for me

[PATCH 1/3] context_tracking: New context tracking susbsystem

2012-11-03 Thread Frederic Weisbecker
this up from RCU into this new level of indirection because this tracking is also going to be used to implement an on demand generic virtual cputime accounting. A necessary step to shutdown the tick while still accounting the cputime. Signed-off-by: Frederic Weisbecker fweis...@gmail.com Cc: Andrew

[PATCH 3/3] cputime: Generic on-demand virtual cputime accounting

2012-11-03 Thread Frederic Weisbecker
native virtual based cputime accounting which hooks on low level code and use a cpu hardware clock. Precision is not the goal of this though. - There is probably more overhead than a native virtual based cputime accounting. But this relies on hooks that are already set anyway. Signed-off-by: Frederic

[PATCH 0/3] cputime: Generic virtual based cputime accounting v4

2012-11-03 Thread Frederic Weisbecker
/linux-dynticks.git vtime/generic-v4 Frederic Weisbecker (3): context_tracking: New context tracking susbsystem cputime: Allow dynamic switch between tick/virtual based cputime accounting cputime: Generic on-demand virtual cputime accounting arch/Kconfig

[PATCH 2/3] cputime: Allow dynamic switch between tick/virtual based cputime accounting

2012-11-03 Thread Frederic Weisbecker
anytime in order to minimize the overhead associated to user hooks. Signed-off-by: Frederic Weisbecker fweis...@gmail.com Cc: Andrew Morton a...@linux-foundation.org Cc: H. Peter Anvin h...@zytor.com Cc: Ingo Molnar mi...@kernel.org Cc: Paul E. McKenney paul...@linux.vnet.ibm.com Cc: Peter Zijlstra pet

Re: [PATCH 00/32] [RFC] nohz/cpuset: Start discussions on nohz CPUs

2012-11-05 Thread Frederic Weisbecker
2012/11/2 Christoph Lameter c...@linux.com: Also could we have this support without cpusets? There are multiple means to do system segmentation (f.e. cgroups) and something like hz control is pretty basic. Control via some cpumask like irq affinities in f.e.

Re: [PATCH 00/32] [RFC] nohz/cpuset: Start discussions on nohz CPUs

2012-11-05 Thread Frederic Weisbecker
2012/11/5 Christoph Lameter c...@linux.com: On Fri, 2 Nov 2012, Paul E. McKenney wrote: On Fri, Nov 02, 2012 at 04:51:50PM -0400, Steven Rostedt wrote: On Fri, 2012-11-02 at 13:41 -0700, Paul E. McKenney wrote: The no-CBs mask would be read-only for some time -- changed only at boot.

Re: [RFC PATCH 7/9] irq_work: Make self-IPIs optable

2012-11-06 Thread Frederic Weisbecker
2012/10/29 Steven Rostedt rost...@goodmis.org: On Mon, 2012-10-29 at 14:28 +0100, Frederic Weisbecker wrote: On irq work initialization, let the user choose to define it as lazy or not. Lazy means that we don't want to send an IPI (provided the arch can anyway) when we enqueue this work

[PATCH 1/7] irq_work: Fix racy IRQ_WORK_BUSY flag setting

2012-11-08 Thread Frederic Weisbecker
ordering. Changelog-heavily-inspired-by: Steven Rostedt rost...@goodmis.org Signed-off-by: Frederic Weisbecker fweis...@gmail.com Cc: Peter Zijlstra pet...@infradead.org Cc: Ingo Molnar mi...@kernel.org Cc: Thomas Gleixner t...@linutronix.de Cc: Andrew Morton a...@linux-foundation.org Cc: Steven Rostedt

[PATCH 6/7] irq_work: Make self-IPIs optable

2012-11-08 Thread Frederic Weisbecker
for non-urgent enqueuers (like printk in the future) that may prefer not to raise an IPI storm in case of frequent enqueuing on short periods of time. Signed-off-by: Frederic Weisbecker fweis...@gmail.com Cc: Peter Zijlstra pet...@infradead.org Cc: Thomas Gleixner t...@linutronix.de Cc: Ingo Molnar

[PATCH 0/7] printk: Make it usable on nohz CPUs v4

2012-11-08 Thread Frederic Weisbecker
-dynticks.git nohz/printk-v4 Thanks. Frederic Weisbecker (7): irq_work: Fix racy IRQ_WORK_BUSY flag setting irq_work: Fix racy check on work pending flag irq_work: Remove CONFIG_HAVE_IRQ_WORK nohz: Add API to check tick state irq_work: Don't stop the tick with pending works irq_work

[PATCH 3/7] irq_work: Remove CONFIG_HAVE_IRQ_WORK

2012-11-08 Thread Frederic Weisbecker
irq work can run on any arch even without IPI support because of the hook on update_process_times(). So lets remove HAVE_IRQ_WORK because it doesn't reflect any backend requirement. Signed-off-by: Frederic Weisbecker fweis...@gmail.com Cc: Peter Zijlstra pet...@infradead.org Cc: Thomas Gleixner

[PATCH 7/7] printk: Wake up klogd using irq_work

2012-11-08 Thread Frederic Weisbecker
the printk tick using a lazy irq work. This subsystem takes care of the timer tick state and can fix up accordingly. Signed-off-by: Frederic Weisbecker fweis...@gmail.com Cc: Peter Zijlstra pet...@infradead.org Cc: Thomas Gleixner t...@linutronix.de Cc: Ingo Molnar mi...@kernel.org Cc: Andrew Morton

[PATCH 5/7] irq_work: Don't stop the tick with pending works

2012-11-08 Thread Frederic Weisbecker
Don't stop the tick if we have pending irq works on the queue, otherwise if the arch can't raise self-IPIs, we may not find an opportunity to execute the pending works for a while. Signed-off-by: Frederic Weisbecker fweis...@gmail.com Cc: Peter Zijlstra pet...@infradead.org Cc: Thomas Gleixner t

[PATCH 4/7] nohz: Add API to check tick state

2012-11-08 Thread Frederic Weisbecker
We need some quick way to check if the CPU has stopped its tick. This will be useful to implement the printk tick using the irq work subsystem. Signed-off-by: Frederic Weisbecker fweis...@gmail.com Cc: Peter Zijlstra pet...@infradead.org Cc: Thomas Gleixner t...@linutronix.de Cc: Ingo Molnar mi

[PATCH 2/7] irq_work: Fix racy check on work pending flag

2012-11-08 Thread Frederic Weisbecker
the value we wish to be in the work-flags but we only make any conclusion after the value returned by the cmpxchg() call that either claims the work or let the current owner handle the pending work for us. Changelog-heavily-inspired-by: Steven Rostedt rost...@goodmis.org Signed-off-by: Frederic

Re: [RFC PATCH 0/5] printk: Make it usable on nohz CPUs

2012-10-19 Thread Frederic Weisbecker
2012/10/12 Frederic Weisbecker fweis...@gmail.com: Hi, So here is a proposition on what we can do to make printk correctly working on a tickless CPU. Although it's targeted to be part of the adaptive tickmess implemetation, it's pretty standalone and generic and also works for printk

Re: [PATCH cgroup/for-3.7-fixes 1/2] Revert cgroup: Remove task_lock() from cgroup_post_fork()

2012-10-19 Thread Frederic Weisbecker
2012/10/19 Tejun Heo t...@kernel.org: On Fri, Oct 19, 2012 at 09:35:26AM -0400, Frederic Weisbecker wrote: 2012/10/18 Tejun Heo t...@kernel.org: From d935a5d6832a264ce52f4257e176f4f96cbaf048 Mon Sep 17 00:00:00 2001 From: Tejun Heo t...@kernel.org Date: Thu, 18 Oct 2012 17:40:30 -0700

[RFC PATCH 3/8] x86: Implement arch_irq_work_has_ipi()

2012-10-20 Thread Frederic Weisbecker
Most of the time, x86 can trigger self-IPIs. Tell irq work subsystem about it. Signed-off-by: Frederic Weisbecker fweis...@gmail.com Cc: Peter Zijlstra pet...@infradead.org Cc: Thomas Gleixner t...@linutronix.de Cc: Ingo Molnar mi...@kernel.org Cc: Andrew Morton a...@linux-foundation.org Cc

[RFC PATCH 4/8] nohz: Add API to check tick state

2012-10-20 Thread Frederic Weisbecker
We need some quick way to check if the CPU has stopped its tick. This will be useful to implement the printk tick using the irq work subsystem. Signed-off-by: Frederic Weisbecker fweis...@gmail.com Cc: Peter Zijlstra pet...@infradead.org Cc: Thomas Gleixner t...@linutronix.de Cc: Ingo Molnar mi

[RFC PATCH 7/8] irq_work: Remove CONFIG_HAVE_IRQ_WORK

2012-10-20 Thread Frederic Weisbecker
irq work is supposed to work everywhere because of the irq work hook in the generic timer tick function. I might be missing something though... Signed-off-by: Frederic Weisbecker fweis...@gmail.com Cc: Peter Zijlstra pet...@infradead.org Cc: Thomas Gleixner t...@linutronix.de Cc: Ingo Molnar mi

[RFC PATCH 8/8] printk: Wake up klogd using irq_work

2012-10-20 Thread Frederic Weisbecker
the printk tick using irq work. This subsystem takes care of the timer tick state and can fix up accordingly. Signed-off-by: Frederic Weisbecker fweis...@gmail.com Cc: Peter Zijlstra pet...@infradead.org Cc: Thomas Gleixner t...@linutronix.de Cc: Ingo Molnar mi...@kernel.org Cc: Andrew Morton

[RFC PATCH 6/8] irq_work: Handle queuing without IPI support in dyntick idle mode

2012-10-20 Thread Frederic Weisbecker
If we enqueue a work while in dyntick idle mode and the arch doesn't have self-IPI support, we may not find an opportunity to run the work before a while. In this case, exit the idle loop to re-evaluate irq_work_needs_cpu() and restart the tick. Signed-off-by: Frederic Weisbecker fweis

[RFC PATCH 0/8] printk: Make it usable on nohz CPUs v2

2012-10-20 Thread Frederic Weisbecker
to avoid IPI storm when we have lots of enqueuing of non-urgent works like klogd wakeup in short period of time so this keeps the old printk_tick behaviour. It also teaches irq_work to handle nohz mode. Warning: only compile tested in x86 for now. Frederic Weisbecker (8): irq_work: Move

[RFC PATCH 5/8] irq_work: Make self-IPIs optable

2012-10-20 Thread Frederic Weisbecker
periods of time. Signed-off-by: Frederic Weisbecker fweis...@gmail.com Cc: Peter Zijlstra pet...@infradead.org Cc: Thomas Gleixner t...@linutronix.de Cc: Ingo Molnar mi...@kernel.org Cc: Andrew Morton a...@linux-foundation.org Cc: Steven Rostedt rost...@goodmis.org Cc: Paul Gortmaker paul.gortma

[RFC PATCH 2/8] irq_work: Let the arch tell us about self-IPI support

2012-10-20 Thread Frederic Weisbecker
This prepares us to make printk working on nohz CPUs using irq work. Signed-off-by: Frederic Weisbecker fweis...@gmail.com Cc: Peter Zijlstra pet...@infradead.org Cc: Thomas Gleixner t...@linutronix.de Cc: Ingo Molnar mi...@kernel.org Cc: Andrew Morton a...@linux-foundation.org Cc: Steven Rostedt

[RFC PATCH 1/8] irq_work: Move irq_work_raise() declaration/default definition to arch headers

2012-10-20 Thread Frederic Weisbecker
This optimization doesn't matter much. But this prepares the arch headers that we need to add a new API in order to detect when the arch can trigger self IPIs to implement the irq work. This is necessary later to make printk working in nohz CPUs. Signed-off-by: Frederic Weisbecker fweis

Re: [RFC PATCH 8/8] printk: Wake up klogd using irq_work

2012-10-20 Thread Frederic Weisbecker
2012/10/20 Joe Perches j...@perches.com: On Sat, 2012-10-20 at 12:22 -0400, Frederic Weisbecker wrote: lets implement the printk tick using irq work. Hi Frederic. Can you redo this change please against -next in a few days? Andrew Morton picked up this series, https://lkml.org/lkml/2012

Re: [PATCH cgroup/for-3.7-fixes 1/2] Revert cgroup: Remove task_lock() from cgroup_post_fork()

2012-10-20 Thread Frederic Weisbecker
2012/10/19 Tejun Heo t...@kernel.org: Hello, Frederic. On Fri, Oct 19, 2012 at 03:44:20PM -0400, Frederic Weisbecker wrote: For -stable, I think it's better to revert. If you want to remove task_lock, let's do it for 3.8. I don't think that a wrong comment justifies a patch to stable

Re: [PATCH cgroup/for-3.7-fixes 1/2] Revert cgroup: Remove task_lock() from cgroup_post_fork()

2012-10-20 Thread Frederic Weisbecker
2012/10/20 Frederic Weisbecker fweis...@gmail.com: 2012/10/19 Tejun Heo t...@kernel.org: Hello, Frederic. On Fri, Oct 19, 2012 at 03:44:20PM -0400, Frederic Weisbecker wrote: For -stable, I think it's better to revert. If you want to remove task_lock, let's do it for 3.8. I don't think

Re: [PATCH cgroup/for-3.7-fixes 1/2] Revert cgroup: Remove task_lock() from cgroup_post_fork()

2012-10-22 Thread Frederic Weisbecker
2012/10/21 Tejun Heo t...@kernel.org: Hello, Frederic. On Sat, Oct 20, 2012 at 02:21:43PM -0400, Frederic Weisbecker wrote: CPU 0 CPU 1 cgroup_task_migrate { task_lock(p) rcu_assign_pointer(tsk-cgroups, newcg); task_unlock(tsk

Re: [RFC PATCH 5/8] irq_work: Make self-IPIs optable

2012-10-23 Thread Frederic Weisbecker
2012/10/22 Peter Zijlstra pet...@infradead.org: On Sat, 2012-10-20 at 12:22 -0400, Frederic Weisbecker wrote: + if (empty) { + /* +* If an IPI is requested, raise it right away. Otherwise wait +* for the next tick unless it's stopped. Now

[PATCH 1/3] kvm: Directly account vtime to system on guest switch

2012-10-08 Thread Frederic Weisbecker
for no good reason. vtime_account_system() OTOH is a no-op in this config option. A further optimization may consist in introducing a vtime_account_guest() that directly calls account_guest_time(). Signed-off-by: Frederic Weisbecker fweis...@gmail.com Cc: Tony Luck tony.l...@intel.com Cc: Fenghua Yu

[PATCH 2/3] cputime: Specialize irq vtime hooks

2012-10-08 Thread Frederic Weisbecker
accounting as well in the future. Signed-off-by: Frederic Weisbecker fweis...@gmail.com Cc: Peter Zijlstra pet...@infradead.org Cc: Ingo Molnar mi...@kernel.org Cc: Thomas Gleixner t...@linutronix.de --- include/linux/hardirq.h | 82 +++ include/linux

[PATCH 0/3] cputime: Moar cleanups / enhancements

2012-10-08 Thread Frederic Weisbecker
. That, for sure, will inspire for even more cputime optimizations/cleanups. Thanks. PS: tested on x86 and ppc64 (checked reliability of times and /proc/stat). But only built tested on s390 and ia64. Frederic Weisbecker (3): kvm: Directly account vtime to system on guest switch cputime

[PATCH 3/3] cputime: Separate irqtime accounting from generic vtime

2012-10-08 Thread Frederic Weisbecker
*() this call is pointless to CONFIG_IRQ_TIME_ACCOUNTING. To fix the confusion, change vtime_account() to irqtime_account_irq() in CONFIG_IRQ_TIME_ACCOUNTING. This way we ensure future account_vtime() calls won't waste useless cycles in the irqtime APIs. Signed-off-by: Frederic Weisbecker fweis

[PATCH v2] rcu: Remove rcu_switch()

2012-10-10 Thread Frederic Weisbecker
It's only there to call rcu_user_hooks_switch(). Let's just call rcu_user_hooks_switch() directly, we don't need this function in the middle. Signed-off-by: Frederic Weisbecker fweis...@gmail.com Cc: Josh Triplett j...@joshtriplett.org Cc: Peter Zijlstra pet...@infradead.org Cc: Richard

[PATCH] rcu: Advise most users not to enable RCU user mode

2012-10-10 Thread Frederic Weisbecker
Discourage distros from enabling CONFIG_RCU_USER_QS because it brings overhead for no benefits yet. It's not a useful feature on its own until we can fully run an adaptive tickless kernel. Signed-off-by: Frederic Weisbecker fweis...@gmail.com --- init/Kconfig | 12 1 files

[RFC PATCH 1/5] irq_work: Move irq_work_raise() declaration/default definition to arch headers

2012-10-12 Thread Frederic Weisbecker
This optimization doesn't matter much. But this prepares the arch headers that we need to add a new API in order to detect when the arch hooks on the tick to implement the irq work. This is necessary later to make printk working in nohz CPUs. Signed-off-by: Frederic Weisbecker fweis...@gmail.com

[RFC PATCH 3/5] x86: Implement arch_irq_work_use_tick

2012-10-12 Thread Frederic Weisbecker
Most of the time, x86 can trigger self-IPIs. Tell irq work subsystem about it. Signed-off-by: Frederic Weisbecker fweis...@gmail.com Cc: Peter Zijlstra pet...@infradead.org Cc: Thomas Gleixner t...@linutronix.de Cc: Ingo Molnar mi...@kernel.org Cc: Andrew Morton a...@linux-foundation.org Cc

[RFC PATCH 5/5] printk: Wake up klogd with irq_work on nohz CPU

2012-10-12 Thread Frederic Weisbecker
this when the tick is stopped only. Signed-off-by: Frederic Weisbecker fweis...@gmail.com Cc: Peter Zijlstra pet...@infradead.org Cc: Thomas Gleixner t...@linutronix.de Cc: Ingo Molnar mi...@kernel.org Cc: Andrew Morton a...@linux-foundation.org Cc: Steven Rostedt rost...@goodmis.org --- kernel

[RFC PATCH 2/5] irq_work: Only run irq_work from tick if arch needs it

2012-10-12 Thread Frederic Weisbecker
It may optimize a bit the tick path for archs that have their own way to run irq work. This may be further optimized using static keys. Signed-off-by: Frederic Weisbecker fweis...@gmail.com Cc: Peter Zijlstra pet...@infradead.org Cc: Thomas Gleixner t...@linutronix.de Cc: Ingo Molnar mi

[RFC PATCH 0/5] printk: Make it usable on nohz CPUs

2012-10-12 Thread Frederic Weisbecker
for your comments. Thanks. PS: only built-tested for now. Frederic Weisbecker (5): irq_work: Move irq_work_raise() declaration/default definition to arch headers irq_work: Only run irq_work from tick if arch needs it x86: Implement arch_irq_work_use_tick nohz: Add API to check tick

[RFC PATCH 4/5] nohz: Add API to check tick state

2012-10-12 Thread Frederic Weisbecker
We need some quick way to check if the CPU has stopped its tick. This will be useful for printk when it wants to wake up klogd on nohz CPU. Signed-off-by: Frederic Weisbecker fweis...@gmail.com Cc: Peter Zijlstra pet...@infradead.org Cc: Thomas Gleixner t...@linutronix.de Cc: Ingo Molnar mi

Re: lots of suspicious RCU traces

2012-10-24 Thread Frederic Weisbecker
First of all, thanks a lot for your report. 2012/10/24 Sergey Senozhatsky sergey.senozhat...@gmail.com: On (10/24/12 20:06), Oleg Nesterov wrote: On 10/24, Sergey Senozhatsky wrote: small question, ptrace_notify() and forward calls are able to both indirectly and directly call

[PATCH 1/5] vtime: Gather vtime declarations to their own header file

2012-10-24 Thread Frederic Weisbecker
These APIs are scattered around and are going to expand a bit. Let's create a dedicated header file for sanity. Signed-off-by: Frederic Weisbecker fweis...@gmail.com Cc: Peter Zijlstra pet...@infradead.org Cc: Ingo Molnar mi...@kernel.org Cc: Thomas Gleixner t...@linutronix.de Cc: Steven Rostedt

[PATCH 4/5] cputime: Specialize irq vtime hooks

2012-10-24 Thread Frederic Weisbecker
vtime_account_system(). CONFIG_IRQ_TIME_ACCOUNTING behaviour doesn't change and directly maps to its own vtime_account() implementation. One may want to take benefits from the new APIs to optimize irq time accounting as well in the future. Signed-off-by: Frederic Weisbecker fweis...@gmail.com Cc: Peter Zijlstra pet

[PATCH 3/5] kvm: Directly account vtime to system on guest switch

2012-10-24 Thread Frederic Weisbecker
consist in introducing a vtime_account_guest() that directly calls account_guest_time(). Signed-off-by: Frederic Weisbecker fweis...@gmail.com Cc: Tony Luck tony.l...@intel.com Cc: Fenghua Yu fenghua...@intel.com Cc: Benjamin Herrenschmidt b...@kernel.crashing.org Cc: Paul Mackerras pau

[PATCH 0/5] cputime: Moar cleanups / enhancements v2

2012-10-24 Thread Frederic Weisbecker
and x86. Built tested on ia64. s390 doesn't build defconfig on v3.7-rc2. Frederic Weisbecker (5): vtime: Gather vtime declarations to their own header file vtime: Provide an irq safe version of vtime_account_system() kvm: Directly account vtime to system on guest switch cputime: Specialize irq

[PATCH 5/5] cputime: Separate irqtime accounting from generic vtime

2012-10-24 Thread Frederic Weisbecker
*() this call is pointless to CONFIG_IRQ_TIME_ACCOUNTING. To fix the confusion, change vtime_account() to irqtime_account_irq() in CONFIG_IRQ_TIME_ACCOUNTING. This way we ensure future account_vtime() calls won't waste useless cycles in the irqtime APIs. Signed-off-by: Frederic Weisbecker fweis

[PATCH 2/5] vtime: Provide an irq safe version of vtime_account_system()

2012-10-24 Thread Frederic Weisbecker
vtime_account_system() currently has only one caller with vtime_account() that is irq safe. Now we are going to call it from other places like kvm, so let's provide an irqsafe version. Signed-off-by: Frederic Weisbecker fweis...@gmail.com Cc: Peter Zijlstra pet...@infradead.org Cc: Ingo Molnar

Re: lots of suspicious RCU traces

2012-10-25 Thread Frederic Weisbecker
2012/10/25 Sergey Senozhatsky sergey.senozhat...@gmail.com: On (10/25/12 00:32), Frederic Weisbecker wrote: First of all, thanks a lot for your report. 2012/10/24 Sergey Senozhatsky sergey.senozhat...@gmail.com: On (10/24/12 20:06), Oleg Nesterov wrote: On 10/24, Sergey Senozhatsky wrote

  1   2   3   4   5   6   7   8   9   10   >