[PATCH 10/27] rcu: Restart the tick on non-responding full dynticks CPUs

2012-12-29 Thread Frederic Weisbecker
When a CPU in full dynticks mode doesn't respond to complete a grace period, issue it a specific IPI so that it restarts the tick and chases a quiescent state. Signed-off-by: Frederic Weisbecker fweis...@gmail.com Cc: Alessio Igor Bogani abog...@kernel.org Cc: Andrew Morton a...@linux

[PATCH 12/27] sched: Update rq clock on nohz CPU before migrating tasks

2012-12-29 Thread Frederic Weisbecker
Because the sched_class::put_prev_task() callback of rt and fair classes are referring to the rq clock to update their runtime statistics. A CPU running in tickless mode may carry a stale value. We need to update it there. Signed-off-by: Frederic Weisbecker fweis...@gmail.com Cc: Alessio Igor

[PATCH 14/27] sched: Update rq clock on tickless CPUs before calling check_preempt_curr()

2012-12-29 Thread Frederic Weisbecker
manually in case the CPU runs tickless because ttwu_do_wakeup() calls check_preempt_wakeup(). Signed-off-by: Frederic Weisbecker fweis...@gmail.com Cc: Alessio Igor Bogani abog...@kernel.org Cc: Andrew Morton a...@linux-foundation.org Cc: Chris Metcalf cmetc...@tilera.com Cc: Christoph Lameter c

[PATCH 18/27] sched: Update nohz rq clock before searching busiest group on load balancing

2012-12-29 Thread Frederic Weisbecker
is in dyntick-idle mode? Signed-off-by: Frederic Weisbecker fweis...@gmail.com Cc: Alessio Igor Bogani abog...@kernel.org Cc: Andrew Morton a...@linux-foundation.org Cc: Chris Metcalf cmetc...@tilera.com Cc: Christoph Lameter c...@linux.com Cc: Geoff Levand ge...@infradead.org Cc: Gilad Ben Yossef

[PATCH 21/27] nohz: Only stop the tick on RCU nocb CPUs

2012-12-29 Thread Frederic Weisbecker
On a full dynticks CPU, we want the RCU callbacks to be offlined to another CPU, otherwise we need to keep the tick to wait for the grace period completion. Ensure the full dynticks CPU is also an rcu_nocb one. Signed-off-by: Frederic Weisbecker fweis...@gmail.com Cc: Alessio Igor Bogani abog

[PATCH 23/27] nohz: Don't stop the tick if posix cpu timers are running

2012-12-29 Thread Frederic Weisbecker
-off-by: Frederic Weisbecker fweis...@gmail.com Cc: Alessio Igor Bogani abog...@kernel.org Cc: Andrew Morton a...@linux-foundation.org Cc: Chris Metcalf cmetc...@tilera.com Cc: Christoph Lameter c...@linux.com Cc: Geoff Levand ge...@infradead.org Cc: Gilad Ben Yossef gi...@benyossef.com Cc: Hakan

[PATCH 25/27] rcu: Don't keep the tick for RCU while in userspace

2012-12-29 Thread Frederic Weisbecker
callbacks? Signed-off-by: Frederic Weisbecker fweis...@gmail.com Cc: Alessio Igor Bogani abog...@kernel.org Cc: Andrew Morton a...@linux-foundation.org Cc: Chris Metcalf cmetc...@tilera.com Cc: Christoph Lameter c...@linux.com Cc: Geoff Levand ge...@infradead.org Cc: Gilad Ben Yossef gi

[PATCH 26/27] profiling: Remove unused timer hook

2012-12-29 Thread Frederic Weisbecker
out of tree user. Let's remove it. Signed-off-by: Frederic Weisbecker fweis...@gmail.com Cc: Alessio Igor Bogani abog...@kernel.org Cc: Andrew Morton a...@linux-foundation.org Cc: Chris Metcalf cmetc...@tilera.com Cc: Christoph Lameter c...@linux.com Cc: Geoff Levand ge...@infradead.org Cc: Gilad

[PATCH 27/27] timer: Don't run non-pinned timer to full dynticks CPUs

2012-12-29 Thread Frederic Weisbecker
until we provide a way for the user to tune that policy. A CPU mask affinity for non pinned timers could be such a solution. Original-patch-by: Thomas Gleixner t...@linutronix.de Signed-off-by: Frederic Weisbecker fweis...@gmail.com Cc: Alessio Igor Bogani abog...@kernel.org Cc: Andrew Morton

[PATCH 24/27] nohz: Add some tracing

2012-12-29 Thread Frederic Weisbecker
Not for merge, just for debugging. Signed-off-by: Frederic Weisbecker fweis...@gmail.com Cc: Alessio Igor Bogani abog...@kernel.org Cc: Andrew Morton a...@linux-foundation.org Cc: Chris Metcalf cmetc...@tilera.com Cc: Christoph Lameter c...@linux.com Cc: Geoff Levand ge...@infradead.org Cc: Gilad

[PATCH 22/27] nohz: Don't turn off the tick if rcu needs it

2012-12-29 Thread Frederic Weisbecker
: OTOH we don't want to handle a locally started grace period, this should be offloaded for rcu_nocb CPUs. What we want is to be kicked if we stay dynticks in the kernel for too long (ie: to report a quiescent state). rcu_pending() is perhaps an overkill just for that. Signed-off-by: Frederic

[PATCH 20/27] nohz: Full dynticks mode

2012-12-29 Thread Frederic Weisbecker
things to be done from scheduler_tick()] [ Included build fix from Geoff Levand ] Signed-off-by: Frederic Weisbecker fweis...@gmail.com Cc: Alessio Igor Bogani abog...@kernel.org Cc: Andrew Morton a...@linux-foundation.org Cc: Chris Metcalf cmetc...@tilera.com Cc: Christoph Lameter c...@linux.com

[PATCH 17/27] sched: Update rq clock before idle balancing

2012-12-29 Thread Frederic Weisbecker
idle_balance() is called from schedule() right before we schedule the idle task. It needs to record the idle timestamp at that time and for this the rq clock must be accurate. If the CPU is running tickless we need to update the rq clock manually. Signed-off-by: Frederic Weisbecker fweis

[PATCH 19/27] nohz: Move nohz load balancer selection into idle logic

2012-12-29 Thread Frederic Weisbecker
[ ** BUGGY PATCH: I need to put more thinking into this ** ] We want the nohz load balancer to be an idle CPU, thus move that selection to strict dyntick idle logic. Signed-off-by: Frederic Weisbecker fweis...@gmail.com Cc: Alessio Igor Bogani abog...@kernel.org Cc: Andrew Morton a...@linux

[PATCH 16/27] sched: Update clock of nohz busiest rq before balancing

2012-12-29 Thread Frederic Weisbecker
clock before reading it. Signed-off-by: Frederic Weisbecker fweis...@gmail.com Cc: Alessio Igor Bogani abog...@kernel.org Cc: Andrew Morton a...@linux-foundation.org Cc: Chris Metcalf cmetc...@tilera.com Cc: Christoph Lameter c...@linux.com Cc: Geoff Levand ge...@infradead.org Cc: Gilad Ben Yossef

[PATCH 15/27] sched: Update rq clock earlier in unthrottle_cfs_rq

2012-12-29 Thread Frederic Weisbecker
In this function we are making use of rq-clock right before the update of the rq clock, let's just call update_rq_clock() just before that to avoid using a stale rq clock value. Signed-off-by: Frederic Weisbecker fweis...@gmail.com Cc: Alessio Igor Bogani abog...@kernel.org Cc: Andrew Morton

[PATCH 13/27] sched: Update rq clock on nohz CPU before setting fair group shares

2012-12-29 Thread Frederic Weisbecker
tickless because scheduler_tick() is not there to maintain it. Signed-off-by: Frederic Weisbecker fweis...@gmail.com Cc: Alessio Igor Bogani abog...@kernel.org Cc: Andrew Morton a...@linux-foundation.org Cc: Chris Metcalf cmetc...@tilera.com Cc: Christoph Lameter c...@linux.com Cc: Geoff Levand ge

[PATCH 11/27] sched: Comment on rq-clock correctness in ttwu_do_wakeup() in nohz

2012-12-29 Thread Frederic Weisbecker
Just to avoid confusion. Signed-off-by: Frederic Weisbecker fweis...@gmail.com Cc: Alessio Igor Bogani abog...@kernel.org Cc: Andrew Morton a...@linux-foundation.org Cc: Chris Metcalf cmetc...@tilera.com Cc: Christoph Lameter c...@linux.com Cc: Geoff Levand ge...@infradead.org Cc: Gilad Ben

[PATCH 09/27] nohz: Wake up full dynticks CPUs when a timer gets enqueued

2012-12-29 Thread Frederic Weisbecker
Wake up a CPU when a timer list timer is enqueued there and the CPU is in full dynticks mode. Sending an IPI to it makes it reconsidering the next timer to program on top of recent updates. Signed-off-by: Frederic Weisbecker fweis...@gmail.com Cc: Alessio Igor Bogani abog...@kernel.org Cc: Andrew

[PATCH 08/27] nohz: Trace timekeeping update

2012-12-29 Thread Frederic Weisbecker
Not for merge. This may become a real tracepoint. Signed-off-by: Frederic Weisbecker fweis...@gmail.com Cc: Alessio Igor Bogani abog...@kernel.org Cc: Andrew Morton a...@linux-foundation.org Cc: Chris Metcalf cmetc...@tilera.com Cc: Christoph Lameter c...@linux.com Cc: Geoff Levand ge

[PATCH 06/27] nohz: Basic full dynticks interface

2012-12-29 Thread Frederic Weisbecker
. McKenney paul...@linux.vnet.ibm.com Signed-off-by: Frederic Weisbecker fweis...@gmail.com Cc: Alessio Igor Bogani abog...@kernel.org Cc: Andrew Morton a...@linux-foundation.org Cc: Chris Metcalf cmetc...@tilera.com Cc: Christoph Lameter c...@linux.com Cc: Geoff Levand ge...@infradead.org Cc: Gilad Ben

[PATCH 05/27] cputime: Safely read cputime of full dynticks CPUs

2012-12-29 Thread Frederic Weisbecker
-by: Frederic Weisbecker fweis...@gmail.com Cc: Alessio Igor Bogani abog...@kernel.org Cc: Andrew Morton a...@linux-foundation.org Cc: Chris Metcalf cmetc...@tilera.com Cc: Christoph Lameter c...@linux.com Cc: Geoff Levand ge...@infradead.org Cc: Gilad Ben Yossef gi...@benyossef.com Cc: Hakan Akkan

[PATCH 03/27] cputime: Allow dynamic switch between tick/virtual based cputime accounting

2012-12-29 Thread Frederic Weisbecker
anytime in order to minimize the overhead associated to user hooks. Signed-off-by: Frederic Weisbecker fweis...@gmail.com Cc: Alessio Igor Bogani abog...@kernel.org Cc: Andrew Morton a...@linux-foundation.org Cc: Chris Metcalf cmetc...@tilera.com Cc: Christoph Lameter c...@linux.com Cc: Geoff Levand ge

[PATCH 01/27] context_tracking: Add comments on interface and internals

2012-12-29 Thread Frederic Weisbecker
This subsystem lacks many explanations on its purpose and design. Add these missing comments. Reported-by: Andrew Morton a...@linux-foundation.org Signed-off-by: Frederic Weisbecker fweis...@gmail.com Cc: Alessio Igor Bogani abog...@kernel.org Cc: Andrew Morton a...@linux-foundation.org Cc: Chris

Re: [PATCH 07/27] nohz: Assign timekeeping duty to a non-full-nohz CPU

2013-01-04 Thread Frederic Weisbecker
2013/1/2 Christoph Lameter c...@linux.com: On Sat, 29 Dec 2012, Frederic Weisbecker wrote: @@ -163,6 +164,8 @@ static int __init tick_nohz_full_setup(char *str) return 1; } __setup(full_nohz=, tick_nohz_full_setup); +#else +#define have_full_nohz_mask (0) #endif /* @@ -512,6

Re: [PATCH 21/27] nohz: Only stop the tick on RCU nocb CPUs

2013-01-04 Thread Frederic Weisbecker
2013/1/2 Namhyung Kim namhy...@kernel.org: You may want to add the following also to shut up the gcc: CC kernel/rcutree.o In file included from /home/namhyung/project/linux/kernel/rcutree.c:58:0: /home/namhyung/project/linux/kernel/rcutree.h:539:13: warning: ‘is_nocb_cpu’

Re: [RFC PATCH v1 15/31] ARC: Process/scheduling/clock/Timers/Delay Management

2013-01-04 Thread Frederic Weisbecker
2013/1/2 Vineet Gupta vineet.gup...@synopsys.com: On Tuesday 13 November 2012 01:59 AM, Thomas Gleixner wrote: On Wed, 7 Nov 2012, Vineet Gupta wrote: +void cpu_idle(void) +{ +/* Since we SLEEP in idle loop, TIF_POLLING_NRFLAG can't be set */ + +/* endless idle loop with no priority

Re: [PATCH 06/27] nohz: Basic full dynticks interface

2013-01-04 Thread Frederic Weisbecker
2012/12/31 Li Zhong zh...@linux.vnet.ibm.com: On Sat, 2012-12-29 at 17:42 +0100, Frederic Weisbecker wrote: Start with a very simple interface to define full dynticks CPU: use a boot time option defined cpumask through the full_nohz= kernel parameter. Make sure you keep at least one CPU

Re: [PATCH 05/27] cputime: Safely read cputime of full dynticks CPUs

2013-01-04 Thread Frederic Weisbecker
2012/12/31 Li Zhong zh...@linux.vnet.ibm.com: On Sat, 2012-12-29 at 17:42 +0100, Frederic Weisbecker wrote: static inline void vtime_task_switch(struct task_struct *prev) { } static inline void vtime_account_system(struct task_struct *tsk) { } static inline void vtime_account_system_irqsafe

Re: [ANNOUNCE] 3.7-nohz1

2013-01-04 Thread Frederic Weisbecker
2012/12/30 Paul E. McKenney paul...@linux.vnet.ibm.com: On Mon, Dec 24, 2012 at 12:43:25AM +0100, Frederic Weisbecker wrote: 2012/12/21 Steven Rostedt rost...@goodmis.org: On Thu, 2012-12-20 at 19:32 +0100, Frederic Weisbecker wrote: Let's imagine you have 4 CPUs. We keep the CPU 0

Re: [RFC][PATCH 1/2] sched: Move idle_balance() to post_schedule

2013-01-05 Thread Frederic Weisbecker
2012/12/22 Steven Rostedt rost...@goodmis.org: The idle_balance() code is called to do task load balancing just before going to idle. This makes sense as the CPU is about to sleep anyway. But currently it's called in the middle of the scheduler and in a place that must have interrupts

Re: [PATCH tip/core/urgent 1/2] rcu: Prevent soft-lockup complaints about no-CBs CPUs

2013-01-05 Thread Frederic Weisbecker
. This commit therefore changes the wait_event() to a wait_event_interruptible(). Reported-by: Frederic Weisbecker fweis...@gmail.com Signed-off-by: Paul Gortmaker paul.gortma...@windriver.com Signed-off-by: Paul E. McKenney paul...@linux.vnet.ibm.com --- kernel/rcutree_plugin.h |3 ++- 1 files

[PATCH] context_tracking: Add comments on interface and internals

2012-12-13 Thread Frederic Weisbecker
This subsystem lacks many explanations on its purpose and design. Add these missing comments. Reported-by: Andrew Morton a...@linux-foundation.org Signed-off-by: Frederic Weisbecker fweis...@gmail.com Cc: Gilad Ben-Yossef gi...@benyossef.com Cc: Thomas Gleixner t...@linutronix.de Cc: Andrew

Re: [PATCH] context_tracking: Add comments on interface and internals

2012-12-13 Thread Frederic Weisbecker
2012/12/13 Andrew Morton a...@linux-foundation.org: On Thu, 13 Dec 2012 21:57:05 +0100 Frederic Weisbecker fweis...@gmail.com wrote: This subsystem lacks many explanations on its purpose and design. Add these missing comments. Thanks, it helps. --- a/kernel/context_tracking.c +++ b

Re: [PATCH] context_tracking: Add comments on interface and internals

2012-12-13 Thread Frederic Weisbecker
2012/12/14 Andrew Morton a...@linux-foundation.org: On Thu, 13 Dec 2012 23:50:23 +0100 Frederic Weisbecker fweis...@gmail.com wrote: + * This call supports re-entrancy. Presumably the explanation for user_exit() applies here. Not sure what you mean here. It's unclear what it means

[PATCH v2] context_tracking: Add comments on interface and internals

2012-12-14 Thread Frederic Weisbecker
This subsystem lacks many explanations on its purpose and design. Add these missing comments. v2: Address comments from Andrew Reported-by: Andrew Morton a...@linux-foundation.org Signed-off-by: Frederic Weisbecker fweis...@gmail.com Cc: Gilad Ben-Yossef gi...@benyossef.com Cc: Thomas Gleixner t

[RFC GIT PULL] printk: Full dynticks support for 3.8

2012-12-17 Thread Frederic Weisbecker
. * Introduce lazy irq works that can wait for the next tick to be executed, unless it's stopped. * Implement klogd wake up using irq work. This removes the ad-hoc printk_tick()/printk_needs_cpu() hooks and make it working even in dynticks mode. Signed-off-by: Frederic Weisbecker fweis...@gmail.com

[PATCH 1/4] vtime: Remove the underscore prefix invasion

2012-11-14 Thread Frederic Weisbecker
() for this specific case so that we can remove the underscore prefix on other vtime functions. 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 rost...@goodmis.org Cc: Paul

[PATCH 2/4] vtime: Explicitly account pending user time on process tick

2012-11-14 Thread Frederic Weisbecker
All vtime implementations just flush the user time on process tick. Consolidate that in generic code by calling a user time accounting helper. This avoids an indirect call in ia64 and prepare to also consolidate vtime context switch code. Signed-off-by: Frederic Weisbecker fweis...@gmail.com Cc

[PATCH 4/4] vtime: No need to disable irqs on vtime_account()

2012-11-14 Thread Frederic Weisbecker
vtime_account() is only called from irq entry. irqs are always disabled at this point so we can safely remove the irq disabling guards on that function. Signed-off-by: Frederic Weisbecker fweis...@gmail.com Cc: Peter Zijlstra pet...@infradead.org Cc: Ingo Molnar mi...@kernel.org Cc: Thomas

[PATCH 3/4] vtime: Consolidate a bit the ctx switch code

2012-11-14 Thread Frederic Weisbecker
own implementation. 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 rost...@goodmis.org Cc: Paul Gortmaker paul.gortma...@windriver.com Cc: Tony Luck tony.l

[PATCH 0/4] cputime: Even more cleanups

2012-11-14 Thread Frederic Weisbecker
Hi, While working on full dynticks, I realized some more cleanups needed to be done. Here is it. If no comment arise, I'll send a pull request to Ingo in a week. Thanks. Frederic Weisbecker (4): vtime: Remove the underscore prefix invasion vtime: Explicitly account pending user time

Re: [PATCH 1/4] vtime: Remove the underscore prefix invasion

2012-11-14 Thread Frederic Weisbecker
2012/11/14 Steven Rostedt rost...@goodmis.org: On Wed, 2012-11-14 at 17:26 +0100, Frederic Weisbecker wrote: Prepending irq-unsafe vtime APIs with underscores was actually a bad idea as the result is a big mess in the API namespace that is even waiting to be further extended. Also

Re: [PATCH 4/4] vtime: No need to disable irqs on vtime_account()

2012-11-14 Thread Frederic Weisbecker
2012/11/14 Steven Rostedt rost...@goodmis.org: On Wed, 2012-11-14 at 17:26 +0100, Frederic Weisbecker wrote: vtime_account() is only called from irq entry. irqs are always disabled at this point so we can safely remove the irq disabling guards on that function. Signed-off-by: Frederic

[GIT PULL] printk: Make it usable on nohz cpus

2012-11-14 Thread Frederic Weisbecker
()/printk_needs_cpu() hooks and make it working even in dynticks mode. Signed-off-by: Frederic Weisbecker fweis...@gmail.com Frederic Weisbecker (7): irq_work: Fix racy IRQ_WORK_BUSY flag setting irq_work: Fix racy check on work pending

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

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

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

2012-11-14 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 5/7] irq_work: Don't stop the tick with pending works

2012-11-14 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 2/7] irq_work: Fix racy check on work pending flag

2012-11-14 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

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

2012-11-14 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 6/7] irq_work: Make self-IPIs optable

2012-11-14 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 3/7] irq_work: Remove CONFIG_HAVE_IRQ_WORK

2012-11-14 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

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

2012-11-15 Thread Frederic Weisbecker
2012/11/15 Steven Rostedt rost...@goodmis.org: On Wed, 2012-11-14 at 21:37 +0100, Frederic Weisbecker wrote: diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c index f249e8c..822d757 100644 --- a/kernel/time/tick-sched.c +++ b/kernel/time/tick-sched.c @@ -289,7 +289,7 @@ static

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

2012-11-15 Thread Frederic Weisbecker
2012/11/15 Frederic Weisbecker fweis...@gmail.com: - CPU that offilines CPU offlining - - cpu_down() { __stop_machine(take_cpu_down) take_cpu_down() { __cpu_disable() { * disable irqs in hw

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

2012-11-15 Thread Frederic Weisbecker
2012/11/15 Steven Rostedt rost...@goodmis.org: On Wed, 2012-11-14 at 21:37 +0100, Frederic Weisbecker wrote: diff --git a/kernel/irq_work.c b/kernel/irq_work.c index 64eddd5..b3c113a 100644 --- a/kernel/irq_work.c +++ b/kernel/irq_work.c @@ -99,6 +99,17 @@ bool irq_work_queue(struct irq_work

Re: [PATCH RFC] irq_work: Flush work on CPU_DYING (was: Re: [PATCH 7/7] printk: Wake up klogd using irq_work)

2012-11-15 Thread Frederic Weisbecker
2012/11/15 Steven Rostedt rost...@goodmis.org: On Thu, 2012-11-15 at 16:25 +0100, Frederic Weisbecker wrote: 2012/11/15 Steven Rostedt rost...@goodmis.org: On Wed, 2012-11-14 at 21:37 +0100, Frederic Weisbecker wrote: diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c index

Re: [PATCH RFC] irq_work: Warn if there's still work on cpu_down

2012-11-15 Thread Frederic Weisbecker
2012/11/15 Steven Rostedt rost...@goodmis.org: If we are in nohz and there's still irq_work to be done when the idle task is about to go offline. Give a nasty warning. Signed-off-by: Steven Rostedt rost...@goodmis.org Index: linux-rt.git/kernel/irq_work.c

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

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

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

2012-11-15 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 5/9] irq_work: Don't stop the tick with pending works

2012-11-15 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 7/9] irq_work: Warn if there's still work on cpu_down

2012-11-15 Thread Frederic Weisbecker
: Paul Gortmaker paul.gortma...@windriver.com Signed-off-by: Frederic Weisbecker fweis...@gmail.com --- kernel/irq_work.c |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/kernel/irq_work.c b/kernel/irq_work.c index cf8b657..fcaadae 100644 --- a/kernel/irq_work.c +++ b/kernel

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

2012-11-15 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 8/9] irq_work: Make self-IPIs optable

2012-11-15 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/9] printk: Make it usable on nohz cpus v6

2012-11-15 Thread Frederic Weisbecker
. 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: Make self-IPIs optable printk: Wake up

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

2012-11-15 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

[PATCH 6/9] irq_work: Flush work on CPU_DYING

2012-11-15 Thread Frederic Weisbecker
Molnar mi...@kernel.org Cc: Andrew Morton a...@linux-foundation.org Cc: Paul Gortmaker paul.gortma...@windriver.com Signed-off-by: Frederic Weisbecker fweis...@gmail.com --- kernel/irq_work.c | 50 -- 1 files changed, 44 insertions(+), 6 deletions

[PATCH 3/9] irq_work: Remove CONFIG_HAVE_IRQ_WORK

2012-11-15 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

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

2012-11-16 Thread Frederic Weisbecker
2012/11/16 Steven Rostedt rost...@goodmis.org: On Fri, 2012-11-16 at 03:21 +0100, Frederic Weisbecker wrote: /* * Claim the entry so that no one else will poke at it. @@ -68,14 +59,18 @@ void __weak arch_irq_work_raise(void) */ static void __irq_work_queue(struct irq_work *work

[GIT PULL v2] printk: Make it usable on nohz cpus

2012-11-17 Thread Frederic Weisbecker
irq works that can wait for the next tick to be executed, unless it's stopped. * Implement klogd wake up using irq work. This removes the ad-hoc printk_tick()/printk_needs_cpu() hooks and make it working even in dynticks mode. Signed-off-by: Frederic Weisbecker fweis...@gmail.com

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

2012-11-17 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

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

2012-11-17 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 Acked-by: Steven Rostedt rost...@goodmis.org Cc: Peter Zijlstra pet...@infradead.org Cc: Thomas Gleixner t...@linutronix.de Cc: Ingo

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

2012-11-17 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 Acked-by: Steven Rostedt rost...@goodmis.org Cc: Peter Zijlstra pet...@infradead.org Cc: Thomas

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

2012-11-17 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 Acked-by: Steven Rostedt rost...@goodmis.org Cc: Peter

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

2012-11-17 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 Acked-by: Steven Rostedt rost...@goodmis.org Cc: Peter Zijlstra pet...@infradead.org Cc: Thomas

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

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

[PATCH 7/9] irq_work: Warn if there's still work on cpu_down

2012-11-17 Thread Frederic Weisbecker
: Paul Gortmaker paul.gortma...@windriver.com Signed-off-by: Frederic Weisbecker fweis...@gmail.com --- kernel/irq_work.c |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/kernel/irq_work.c b/kernel/irq_work.c index 4ed1749..480f747 100644 --- a/kernel/irq_work.c +++ b/kernel

[PATCH 6/9] irq_work: Flush work on CPU_DYING

2012-11-17 Thread Frederic Weisbecker
Molnar mi...@kernel.org Cc: Andrew Morton a...@linux-foundation.org Cc: Paul Gortmaker paul.gortma...@windriver.com Signed-off-by: Frederic Weisbecker fweis...@gmail.com --- kernel/irq_work.c | 51 +-- 1 files changed, 45 insertions(+), 6 deletions

[PATCH 3/9] irq_work: Remove CONFIG_HAVE_IRQ_WORK

2012-11-17 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 Acked-by: Steven Rostedt rost...@goodmis.org Cc: Peter

Re: [PATCH] nohz/cpuset: Make a CPU stick with do_timer() duty in the presence of nohz cpusets

2012-11-19 Thread Frederic Weisbecker
it away so that AHZ CPUs can run tickless. Signed-off-by: Hakan Akkan hakanak...@gmail.com CC: Frederic Weisbecker fweis...@gmail.com --- include/linux/cpuset.h |3 ++- kernel/cpuset.c |5 + kernel/time/tick-sched.c | 31 ++- 3 files

Re: linux-next: manual merge of the tip tree with the rr tree

2012-09-28 Thread Frederic Weisbecker
On Fri, Sep 28, 2012 at 01:33:41PM +1000, Stephen Rothwell wrote: Hi all, Today's linux-next merge of the tip tree got a conflict in arch/Kconfig between commit 9a9d5786a5e7 (Make most arch asm/module.h files use asm-generic/module.h) from the rr tree and commits fdf9c356502a (cputime: Make

Re: rcu: eqs related warnings in linux-next

2012-09-28 Thread Frederic Weisbecker
On Fri, Sep 28, 2012 at 02:51:03PM +0200, Sasha Levin wrote: Hi all, While fuzzing with trinity inside a KVM tools guest with the latest linux-next kernel, I've stumbled on the following during boot: [ 199.224369] WARNING: at kernel/rcutree.c:513 rcu_eqs_exit_common+0x4a/0x3a0() [

Re: rcu: eqs related warnings in linux-next

2012-09-28 Thread Frederic Weisbecker
On Fri, Sep 28, 2012 at 02:51:03PM +0200, Sasha Levin wrote: Hi all, While fuzzing with trinity inside a KVM tools guest with the latest linux-next kernel, I've stumbled on the following during boot: [ 199.224369] WARNING: at kernel/rcutree.c:513 rcu_eqs_exit_common+0x4a/0x3a0() [

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

2012-09-28 Thread Frederic Weisbecker
On Fri, Sep 28, 2012 at 09:07:57AM +0200, Stephane Eranian wrote: On Fri, Sep 28, 2012 at 7:49 AM, Namhyung Kim namhy...@kernel.org wrote: Hi Frederic, On Fri, 28 Sep 2012 01:01:48 +0200, Frederic Weisbecker wrote: When Arun was working on this, I asked him to explore if it could make

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

2012-09-28 Thread Frederic Weisbecker
On Fri, Sep 28, 2012 at 02:49:55PM +0900, Namhyung Kim wrote: Hi Frederic, On Fri, 28 Sep 2012 01:01:48 +0200, Frederic Weisbecker wrote: 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

Re: rcu: eqs related warnings in linux-next

2012-09-29 Thread Frederic Weisbecker
2012/9/29 Sasha Levin levinsasha...@gmail.com: Maybe I could help here a bit. lappy linux # addr2line -i -e vmlinux 8111d45f /usr/src/linux/kernel/timer.c:549 /usr/src/linux/include/linux/jump_label.h:101 /usr/src/linux/include/trace/events/timer.h:44

Re: rcu: eqs related warnings in linux-next

2012-09-29 Thread Frederic Weisbecker
On Sat, Sep 29, 2012 at 06:37:37AM -0700, Paul E. McKenney wrote: On Sat, Sep 29, 2012 at 02:25:04PM +0200, Frederic Weisbecker wrote: 2012/9/29 Sasha Levin levinsasha...@gmail.com: Maybe I could help here a bit. lappy linux # addr2line -i -e vmlinux 8111d45f /usr/src/linux

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

2012-10-02 Thread Frederic Weisbecker
On Tue, Oct 02, 2012 at 04:58:15PM +0200, Jiri Olsa wrote: diff --git a/arch/x86/kernel/cpu/perf_event.c b/arch/x86/kernel/cpu/perf_event.c index 915b876..11d62ff 100644 --- a/arch/x86/kernel/cpu/perf_event.c +++ b/arch/x86/kernel/cpu/perf_event.c @@ -34,6 +34,7 @@ #include asm/timer.h

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

2012-10-02 Thread Frederic Weisbecker
the above function doesn't exist. May be only use _get_cword then, if it works everywhere? Cc: Frederic Weisbecker fweis...@gmail.com Cc: David Ahern dsah...@gmail.com Signed-off-by: Namhyung Kim namhy...@kernel.org --- tools/perf/bash_completion | 15 +-- 1 file changed, 13

Re: [PATCH 0/3] perf tools: Bash completion update

2012-10-02 Thread Frederic Weisbecker
needs to be renamed (at least adding a couple of dashes in it). Thanks, Namhyung Acked-by: Frederic Weisbecker fweis...@gmail.com Thanks Namhyung! Namhyung Kim (3): perf tools: Check existence of _get_comp_words_by_ref when bash completing perf tools: Complete long option names

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

2012-10-02 Thread Frederic Weisbecker
On Tue, Oct 02, 2012 at 06:06:26PM +0200, Jiri Olsa wrote: On Tue, Oct 02, 2012 at 05:49:26PM +0200, Frederic Weisbecker wrote: On Tue, Oct 02, 2012 at 04:58:15PM +0200, Jiri Olsa wrote: diff --git a/arch/x86/kernel/cpu/perf_event.c b/arch/x86/kernel/cpu/perf_event.c index 915b876

Re: [PATCH] hardlockup: detect hard lockups without NMIs using secondary cpus

2013-01-10 Thread Frederic Weisbecker
2013/1/10 Russell King - ARM Linux li...@arm.linux.org.uk: On Thu, Jan 10, 2013 at 09:02:15AM -0500, Don Zickus wrote: On Wed, Jan 09, 2013 at 05:57:39PM -0800, Colin Cross wrote: Emulate NMIs on systems where they are not available by using timer interrupts on other cpus. Each cpu will use

Re: Request for tree inclusion

2013-01-10 Thread Frederic Weisbecker
2012/12/3 Frederic Weisbecker fweis...@gmail.com: 2012/12/2 Stephen Rothwell s...@canb.auug.org.au: Well, these are a bit late (I expected Linus to release v3.7 today), but since Ingo has not piped in over the weekend, I have added them from today after the tip tree merge. Yeah sorry

Re: [PATCH v2] hardlockup: detect hard lockups without NMIs using secondary cpus

2013-01-14 Thread Frederic Weisbecker
2013/1/11 Colin Cross ccr...@android.com: Emulate NMIs on systems where they are not available by using timer interrupts on other cpus. Each cpu will use its softlockup hrtimer to check that the next cpu is processing hrtimer interrupts by verifying that a counter is increasing. This patch

Re: [PATCH v2] hardlockup: detect hard lockups without NMIs using secondary cpus

2013-01-14 Thread Frederic Weisbecker
2013/1/15 Colin Cross ccr...@android.com: On Mon, Jan 14, 2013 at 4:13 PM, Frederic Weisbecker fweis...@gmail.com wrote: I believe this is pretty much what the RCU stall detector does already: checks for other CPUs being responsive. The only difference is on how it checks that. For RCU it's

Re: [PATCH v2] hardlockup: detect hard lockups without NMIs using secondary cpus

2013-01-14 Thread Frederic Weisbecker
2013/1/15 Colin Cross ccr...@android.com: On Mon, Jan 14, 2013 at 4:25 PM, Frederic Weisbecker fweis...@gmail.com wrote: 2013/1/15 Colin Cross ccr...@android.com: On Mon, Jan 14, 2013 at 4:13 PM, Frederic Weisbecker fweis...@gmail.com wrote: I believe this is pretty much what the RCU stall

Re: [PATCH tip/core/urgent 1/2] rcu: Prevent soft-lockup complaints about no-CBs CPUs

2013-01-05 Thread Frederic Weisbecker
2013/1/5 Paul E. McKenney paul...@linux.vnet.ibm.com: On Sat, Jan 05, 2013 at 06:21:01PM +0100, Frederic Weisbecker wrote: Hi Paul, 2013/1/5 Paul E. McKenney paul...@linux.vnet.ibm.com: From: Paul Gortmaker paul.gortma...@windriver.com The wait_event() at the head of the rcu_nocb_kthread

Re: [PATCH 03/27] cputime: Allow dynamic switch between tick/virtual based cputime accounting

2013-01-07 Thread Frederic Weisbecker
Hey Paul, 2013/1/4 Paul Gortmaker paul.gortma...@windriver.com: On 12-12-29 11:42 AM, Frederic Weisbecker wrote: Allow to dynamically switch between tick and virtual based cputime accounting. This way we can provide a kind of on-demand virtual based cputime accounting. In this mode

Re: [PATCH rcu] Remove unused code originally used for context tracking

2013-01-07 Thread Frederic Weisbecker
2013/1/7 Paul E. McKenney paul...@linux.vnet.ibm.com: On Fri, Nov 30, 2012 at 02:19:22PM +0800, Li Zhong wrote: As new context tracking subsystem added, it seems ignore_user_qs and in_user defined in struct rcu_dynticks are no longer needed, so remove them. Signed-off-by: Li Zhong

Re: [PATCH v2] context_tracking: Add comments on interface and internals

2013-01-07 Thread Frederic Weisbecker
2012/12/16 Ingo Molnar mi...@kernel.org: * Frederic Weisbecker fweis...@gmail.com wrote: + +/** + * context_tracking_task_switch - context switch the syscall hooks + * + * The context tracking uses the syscall slow path to implement its user-kernel + * boundaries hooks on syscalls

[PATCH] sched: Remove broken check for skip clock update

2013-01-07 Thread Frederic Weisbecker
deactivate_task() already did the rq clock update in schedule(). But we want to ignore that update if a ttwu did it for us, in which case rq-skip_clock_update is 1. But update_rq_clock() already takes care of that so we can just remove the broken condition. Signed-off-by: Frederic Weisbecker fweis...@gmail.com

<    3   4   5   6   7   8   9   10   11   12   >