[RFC PATCH 0/7] softirq: Consolidation and stack overrun fix v2

2013-09-25 Thread Frederic Weisbecker
__do_softirq() * more comments * introduction of a longer term solution via a new arch symbol for archs to tell about irq_exit() stack coverage. Thanks. Frederic Weisbecker (7): irq: Force hardirq exit's softirq processing on its own stack irq: Consolidate do_softirq() arch over

[PATCH 4/7] irq: Improve a bit softirq debugging

2013-09-25 Thread Frederic Weisbecker
t one step further and generalize that debug check to any softirq processing. Signed-off-by: Frederic Weisbecker Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Ingo Molnar Cc: Thomas Gleixner Cc: Peter Zijlstra Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Paul Mackerras Cc: James Hogan Cc:

[PATCH 7/7] x86: Tell about irq stack coverage

2013-09-25 Thread Frederic Weisbecker
there. x86-32 is not concerned because it only runs the irq handler on the irq stack. Signed-off-by: Frederic Weisbecker Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Ingo Molnar Cc: Thomas Gleixner Cc: Peter Zijlstra Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Paul Mackerras Cc: James

[PATCH 6/7] irq: Optimize softirq stack selection in irq exit

2013-09-25 Thread Frederic Weisbecker
defined when irq_exit() runs on the irq stack. That way we can spare some stack switch on irq processing and all the cache issues that come along. Signed-off-by: Frederic Weisbecker Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Ingo Molnar Cc: Thomas Gleixner Cc: Peter Zijlstra Cc: H. P

[PATCH 5/7] irq: Justify the various softirq stack choices

2013-09-25 Thread Frederic Weisbecker
For clarity, comment the various stack choices for softirqs processing, whether we execute them from ksoftirqd or local_irq_enable() calls. Their use on irq_exit() is already commented. Signed-off-by: Frederic Weisbecker Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Ingo Molnar Cc

[PATCH 3/7] irq: Optimize call to softirq on hardirq exit

2013-09-25 Thread Frederic Weisbecker
Before processing softirqs on hardirq exit, we already do the check for pending softirqs while hardirqs are guaranteed to be disabled. So we can take a shortcut and safely jump to the arch specific implementation directly. Signed-off-by: Frederic Weisbecker Cc: Benjamin Herrenschmidt Cc: Paul

[PATCH 2/7] irq: Consolidate do_softirq() arch overriden implementations

2013-09-25 Thread Frederic Weisbecker
switch. Signed-off-by: Frederic Weisbecker Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Ingo Molnar Cc: Thomas Gleixner Cc: Peter Zijlstra Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Paul Mackerras Cc: James Hogan Cc: James E.J. Bottomley Cc: Helge Deller Cc: Martin Schwidefsky Cc

Re: [PATCH 1/7] perf: Enable function tracing for perf core

2012-09-08 Thread Frederic Weisbecker
On Sat, Sep 08, 2012 at 07:55:16AM -0400, Steven Rostedt wrote: > According to Steven R. there is no reason left to not support > function tracing for the perf core. This makes it easier to debug > perf. > > Don't remove -pg for the x86 and generic perf core. Actually, perf can use function traci

[PATCH 0/6] cputime: More cleanups

2012-09-10 Thread Frederic Weisbecker
Hi, More cleanups for the cputime code. Tested on x86 and built-tested only on ia64, powerpc and s390. This is pullable from: git://github.com/fweisbec/linux-dynticks.git cputime/cleanups (based on tip:sched/core) Frederic Weisbecker (6): cputime: Use a proper subsystem

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

2012-09-10 Thread Frederic Weisbecker
e want 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 Cc: Tony Luck Cc: Fenghua Yu Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Heiko Carstens Cc: Martin Schwidefsky Cc

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

2012-09-10 Thread Frederic Weisbecker
Factorize the code that accounts user time into a single function to avoid code duplication. Signed-off-by: Frederic Weisbecker Cc: Tony Luck Cc: Fenghua Yu Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Martin Schwidefsky Cc: Heiko Carstens Cc: Ingo Molnar Cc: Thomas Gleixner Cc

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

2012-09-10 Thread Frederic Weisbecker
This debloats a bit the general config menu and make these config options easier to find. Signed-off-by: Frederic Weisbecker Cc: Tony Luck Cc: Fenghua Yu Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Martin Schwidefsky Cc: Heiko Carstens Cc: Ingo Molnar Cc: Thomas Gleixner Cc: Peter

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

2012-09-10 Thread Frederic Weisbecker
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 Cc: Tony Luck Cc: Fenghua Yu Cc: Benjamin

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

2012-09-10 Thread Frederic Weisbecker
. Signed-off-by: Frederic Weisbecker Cc: Tony Luck Cc: Fenghua Yu Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Martin Schwidefsky Cc: Heiko Carstens Cc: Ingo Molnar Cc: Thomas Gleixner Cc: Peter Zijlstra Cc: Russell King --- arch/Kconfig |6 ++ arch/x86/Kconfig | 12

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

2012-09-10 Thread Frederic Weisbecker
To avoid code duplication. Signed-off-by: Frederic Weisbecker Cc: Tony Luck Cc: Fenghua Yu Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Martin Schwidefsky Cc: Heiko Carstens Cc: Ingo Molnar Cc: Thomas Gleixner Cc: Peter Zijlstra --- arch/ia64/kernel/time.c | 11 +++ 1

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

2012-09-10 Thread Frederic Weisbecker
On Mon, Sep 10, 2012 at 09:43:13PM +0200, Frederic Weisbecker wrote: > There is no known reason for this option to be unavailable on other > archs than x86. They just need to call enable_sched_clock_irqtime() > if they have a sufficiently finegrained clock to make it working. > >

Re: [PATCH tip/core/rcu 11/26] rcu: Exit RCU extended QS on user preemption

2012-09-10 Thread Frederic Weisbecker
On Thu, Sep 06, 2012 at 07:13:11PM +0200, Peter Zijlstra wrote: > On Thu, 2012-09-06 at 19:02 +0200, Peter Zijlstra wrote: > > On Thu, 2012-08-30 at 14:05 -0700, Paul E. McKenney wrote: > > > From: Frederic Weisbecker > > > > > > When exceptions or irq are abo

Re: [PATCH tip/core/rcu 10/26] rcu: Exit RCU extended QS on kernel preemption after irq/exception

2012-09-10 Thread Frederic Weisbecker
On Thu, Sep 06, 2012 at 06:52:44PM +0200, Peter Zijlstra wrote: > On Thu, 2012-08-30 at 14:05 -0700, Paul E. McKenney wrote: > > From: Frederic Weisbecker > > > > When an exception or an irq exits, and we are going to resume into > > interrupted kernel code, the low le

Re: [PATCH tip/core/rcu 04/26] rcu: Settle config for userspace extended quiescent state

2012-09-10 Thread Frederic Weisbecker
On Tue, Sep 04, 2012 at 05:46:19PM -0700, Josh Triplett wrote: > > It actually does depend on SMP. There has to be at least one CPU taking > > scheduling-clock interrupts in order to keep time computation accurate, > > so a de-facto UP system cannot adaptive-dynticks its sole CPU. > > Ah. That s

Re: [PATCH tip/core/rcu 08/26] x86: Syscall hooks for userspace RCU extended QS

2012-09-10 Thread Frederic Weisbecker
On Fri, Aug 31, 2012 at 04:59:10PM -0700, Josh Triplett wrote: > On Thu, Aug 30, 2012 at 02:05:25PM -0700, Paul E. McKenney wrote: > > From: Frederic Weisbecker > > > > Add syscall slow path hooks to notify syscall entry > > and exit on CPUs that want to support

Re: [PATCH 00/11] rcu: Add missing RCU idle APIs on idle loop v2

2012-09-10 Thread Frederic Weisbecker
On Sun, Aug 26, 2012 at 11:21:37AM +0200, Tobias Klausmann wrote: > Hi! > > On Sat, 25 Aug 2012, Paul E. McKenney wrote: > > Both Alpha patches should apply as-is back to 3.3, and should also fix > > the problem. Could you please check this on the versions of interest? > > I just now tried them

Re: [PATCH 00/11] rcu: Add missing RCU idle APIs on idle loop v2

2012-09-10 Thread Frederic Weisbecker
On Sat, Aug 25, 2012 at 02:19:14AM +0100, Ben Hutchings wrote: > On Fri, 2012-08-24 at 14:26 -0700, Paul E. McKenney wrote: > > On Thu, Aug 23, 2012 at 04:58:24PM +0200, Frederic Weisbecker wrote: > > > Hi, > > > > > > Changes since v1: > > > >

Re: [PATCH] make CONFIG_EXPERIMENTAL invisible and default

2012-10-06 Thread Frederic Weisbecker
2012/10/5 Paul E. McKenney : > 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 in the past,

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

2012-10-08 Thread Frederic Weisbecker
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 Cc: Tony Luck Cc: Fenghua Yu Cc: Benjamin Herrenschmidt Cc: Paul

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

2012-10-08 Thread Frederic Weisbecker
mize irq time accounting as well in the future. Signed-off-by: Frederic Weisbecker Cc: Peter Zijlstra Cc: Ingo Molnar Cc: Thomas Gleixner --- include/linux/hardirq.h | 82 +++ include/linux/kernel_stat.h |9 - kernel/softirq.c|6

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

2012-10-08 Thread Frederic Weisbecker
chset. 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 cp

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

2012-10-08 Thread Frederic Weisbecker
_irq_*() 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

[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 Cc: Josh Triplett Cc: Peter Zijlstra Cc: Richard Weinberger Signed-off-by: Paul E. McKenney ---

[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 --- init/Kconfig | 12 1 files changed, 12 inser

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

2012-11-30 Thread Frederic Weisbecker
2012/11/28 Hakan Akkan : > +static int check_drop_timer_duty(int cpu) > +{ > + int curr_handler, prev_handler, new_handler; > + int nrepeat = -1; > + bool drop_recheck; > + > +repeat: > + WARN_ON_ONCE(++nrepeat > 1); > + drop_recheck = false; > + curr_handler = c

Re: Request for tree inclusion

2012-12-02 Thread Frederic Weisbecker
2012/12/2 Stephen Rothwell : > 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 to submit that so late. Those branches are in pending pull requests to the -ti

Re: Is not locking task_lock in cgroup_fork() safe?

2012-10-18 Thread Frederic Weisbecker
2012/10/16 Tejun Heo : > Hey, Frederic. > > On Mon, Oct 08, 2012 at 02:48:58PM +0200, Frederic Weisbecker wrote: >> Yeah I missed this one. >> Now the whole cgroup_attach_task() is clusteracy without the > > Clusteracy? > >> threadgroup lock anyway: >>

Re: Is not locking task_lock in cgroup_fork() safe?

2012-10-18 Thread Frederic Weisbecker
2012/10/18 Tejun Heo : > Hello, Frederic. > > On Thu, Oct 18, 2012 at 04:50:59PM +0200, Frederic Weisbecker wrote: >> Ah right I was confused. Hmm, indeed we have a race here on >> cgroup_fork(). How about using css_try_get() in cgroup_fork() and >> refetch the parent&#

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

2012-10-19 Thread Frederic Weisbecker
2012/10/12 Frederic Weisbecker : > 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 >

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 : > On Fri, Oct 19, 2012 at 09:35:26AM -0400, Frederic Weisbecker wrote: >> 2012/10/18 Tejun Heo : >> > From d935a5d6832a264ce52f4257e176f4f96cbaf048 Mon Sep 17 00:00:00 2001 >> > From: Tejun Heo >> > Date: Thu, 18 Oct 2012 17:40:30

[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 Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Andrew Morton Cc: Steven Rostedt Cc: Paul Gortmaker --- arch/x86/include/asm/irq_work.h |4 1 files changed

[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 Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Andrew Morton Cc: Steven Rostedt Cc: Paul Gortmaker

[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 Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Andrew Morton Cc: Steven Rostedt Cc: Paul Gortmaker

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

2012-10-20 Thread Frederic Weisbecker
t 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 Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Andrew Morton Cc: Steven Rostedt Cc: Paul Gortmaker --- include/linux/printk.h |

[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 Cc:

[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 Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Andrew Morton Cc: Steven Rostedt Cc: Paul Gortmaker --- arch/x86/kernel/cpu/mcheck/mce.c |2 +- arch/x86/kvm/pmu.c |2 +- drivers/acpi

[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 Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Andrew Morton Cc: Steven Rostedt Cc: Paul Gortmaker --- arch/alpha/include/asm/irq_work.h |5 - arch/alpha/kernel

[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 Cc:

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

2012-10-20 Thread Frederic Weisbecker
2012/10/20 Joe Perches : > 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, > ht

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 : > 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

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 : > 2012/10/19 Tejun Heo : >> 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&#

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 : > 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

Re: [PATCH 01/10] sched: select_task_rq_fair clean up

2012-12-06 Thread Frederic Weisbecker
2012/12/3 Alex Shi : > It is impossible to miss a task allowed cpu in a eligible group. > > And since find_idlest_group only return a different group which > excludes old cpu, it's also imporissible to find a new cpu same as old > cpu. Is it possible for weighted_cpuload() to return ULONG_MAX? If

Re: [PATCH 02/10] sched: fix find_idlest_group mess logical

2012-12-06 Thread Frederic Weisbecker
2012/12/3 Alex Shi : > There is 4 situations in the function: > 1, no task allowed group; > so min_load = ULONG_MAX, this_load = 0, idlest = NULL > 2, only local group task allowed; > so min_load = ULONG_MAX, this_load assigned, idlest = NULL > 3, only non-local task group allowed;

Re: [PATCH 01/10] sched: select_task_rq_fair clean up

2012-12-06 Thread Frederic Weisbecker
2012/12/7 Alex Shi : > On 12/07/2012 01:50 AM, Frederic Weisbecker wrote: >> 2012/12/3 Alex Shi : >>> It is impossible to miss a task allowed cpu in a eligible group. >>> >>> And since find_idlest_group only return a different group which >>> excludes

Re: [PATCH 02/10] sched: fix find_idlest_group mess logical

2012-12-07 Thread Frederic Weisbecker
2012/12/7 Alex Shi : > On 12/07/2012 08:56 AM, Frederic Weisbecker wrote: >> 2012/12/3 Alex Shi : >>> There is 4 situations in the function: >>> 1, no task allowed group; >>> so min_load = ULONG_MAX, this_load = 0, idlest = NULL >>> 2, only loca

Re: [PATCH v2 00/14] printk() fixes, optimizations, and clean ups

2012-12-07 Thread Frederic Weisbecker
the merge >> window about to open up. Your patience is appreciated. > > I think it'd be easier for a single downstream > maintainer to coordinate these patch sets sequencing. > > You or Andrew might be better than you and Andrew. > > There is a small patch to printk th

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

2012-12-08 Thread Frederic Weisbecker
2012/12/8 Ingo Molnar : > > * Frederic Weisbecker wrote: > >> Ingo, >> >> Please pull the printk support in dynticks mode patches that can >> be found at: >> >> git://git.kernel.org/pub/scm/linux/kernel/git/frederic/linux-dynticks.git >> tags/

Re: [context tracking subsystem] Re: [GIT PULL rcu/next] One more RCU commit for 3.8

2012-12-10 Thread Frederic Weisbecker
anges are available in the git repository at: >> > git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git >> > rcu/next >> > >> > Thanx, Paul >> > >> > > >> > Frederic Weisbecker (1): >> > context

Re: Does anyone use CONFIG_TINY_PREEMPT_RCU?

2012-11-12 Thread Frederic Weisbecker
2012/11/13 Paul E. McKenney : > Hello! > > I know of people using TINY_RCU, TREE_RCU, and TREE_PREEMPT_RCU, but I > have not heard of anyone using TINY_PREEMPT_RCU for whom TREE_PREEMPT_RCU > was not a viable option (in contrast, the people running Linux on > tiny-memmory systems typically use TINY

Re: Does anyone use CONFIG_TINY_PREEMPT_RCU?

2012-11-12 Thread Frederic Weisbecker
2012/11/13 Josh Triplett : > On Tue, Nov 13, 2012 at 02:12:27AM +0100, Frederic Weisbecker wrote: >> 2012/11/13 Paul E. McKenney : >> > Hello! >> > >> > I know of people using TINY_RCU, TREE_RCU, and TREE_PREEMPT_RCU, but I >> > have not he

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

2012-11-14 Thread Frederic Weisbecker
specific case so that we can remove the underscore prefix on other vtime functions. Signed-off-by: Frederic Weisbecker Cc: Peter Zijlstra Cc: Ingo Molnar Cc: Thomas Gleixner Cc: Steven Rostedt Cc: Paul Gortmaker Cc: Tony Luck Cc: Fenghua Yu Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc

[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 Cc: Peter Zijlstra 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 Cc: Peter Zijlstra Cc: Ingo Molnar Cc: Thomas Gleixner Cc: Steven Rostedt Cc: Paul Gortmaker Cc: Tony

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

2012-11-14 Thread Frederic Weisbecker
g its own implementation. Signed-off-by: Frederic Weisbecker Cc: Peter Zijlstra Cc: Ingo Molnar Cc: Thomas Gleixner Cc: Steven Rostedt Cc: Paul Gortmaker Cc: Tony Luck Cc: Fenghua Yu Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Martin Schwidefsky Cc: Heiko Carstens --- arch/ia64/in

[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 ti

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

2012-11-14 Thread Frederic Weisbecker
2012/11/14 Steven Rostedt : > 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 : > 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. >> >> S

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

2012-11-14 Thread Frederic Weisbecker
es the ad-hoc printk_tick()/printk_needs_cpu() hooks and make it working even in dynticks mode. Signed-off-by: Frederic Weisbecker ---- Frederic Weisbecker (7): irq_work: Fix racy IRQ_WORK_BUSY flag setting irq_work: Fix racy c

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

2012-11-14 Thread Frederic Weisbecker
ng the expected ordering. Changelog-heavily-inspired-by: Steven Rostedt Signed-off-by: Frederic Weisbecker Acked-by: Steven Rostedt Cc: Peter Zijlstra Cc: Ingo Molnar Cc: Thomas Gleixner Cc: Andrew Morton Cc: Paul Gortmaker Cc: Anish Kumar --- kernel/irq_work.c |5 - 1 files change

[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 Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Andrew Morton Cc: Steven Rostedt Cc: Paul Gortmaker

[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 Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Andrew

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

2012-11-14 Thread Frederic Weisbecker
by speculating about 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 Signed-off-by: Fr

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

2012-11-14 Thread Frederic Weisbecker
t 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 Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Andrew Morton Cc: Steven Rostedt Cc: Paul Gortmaker --- include/linux/printk.h |

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

2012-11-14 Thread Frederic Weisbecker
e. This is going to be a benefit 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 Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Andrew Morton Cc:

[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 Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Andrew M

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

2012-11-15 Thread Frederic Weisbecker
2012/11/15 Steven Rostedt : > 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 >> @

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

2012-11-15 Thread Frederic Weisbecker
2012/11/15 Frederic Weisbecker : > -> > CPU that offilines CPU offlining > - > - > cpu_down() { > __stop_machine(take_cpu_down) > > take_cpu_down() { > > __cpu_disable

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

2012-11-06 Thread Frederic Weisbecker
2012/10/29 Steven Rostedt : > 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 c

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

2012-11-08 Thread Frederic Weisbecker
ng the expected ordering. Changelog-heavily-inspired-by: Steven Rostedt Signed-off-by: Frederic Weisbecker Cc: Peter Zijlstra Cc: Ingo Molnar Cc: Thomas Gleixner Cc: Andrew Morton Cc: Steven Rostedt Cc: Paul Gortmaker Cc: Anish Kumar --- kernel/irq_work.c |5 - 1 files changed, 4 i

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

2012-11-08 Thread Frederic Weisbecker
e. This is going to be a benefit 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 Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Andrew Morton Cc:

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

2012-11-08 Thread Frederic Weisbecker
scm/linux/kernel/git/frederic/linux-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 sto

[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 Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Andrew M

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

2012-11-08 Thread Frederic Weisbecker
t 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 Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Andrew Morton Cc: Steven Rostedt Cc: Paul Gortmaker --- include/linux/printk.h |

[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 Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Andrew

[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 Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Andrew Morton Cc: Steven Rostedt Cc: Paul Gortmaker

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

2012-11-08 Thread Frederic Weisbecker
by speculating about 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 Signed-off-by: Fre

Re: [PATCH 02/24] cputime: Generic on-demand virtual cputime accounting

2012-12-29 Thread Frederic Weisbecker
2012/12/26 Li Zhong : > On Thu, 2012-12-20 at 19:32 +0100, Frederic Weisbecker wrote: >> diff --git a/init/Kconfig b/init/Kconfig >> index 60579d6..a64b3e8 100644 >> --- a/init/Kconfig >> +++ b/init/Kconfig >> @@ -340,7 +340,9 @@ config TICK_CPU_ACCOUNTING

Re: [PATCH 20/24] nohz: Full dynticks mode

2012-12-29 Thread Frederic Weisbecker
2012/12/26 Namhyung Kim : > Hi Frederic, > > On Thu, 20 Dec 2012 19:33:07 +0100, Frederic Weisbecker wrote: >> When a CPU is in full dynticks mode, try to switch >> it to nohz mode from the interrupt exit path if it is >> running a single non-idle task. >> >>

[ANNOUNCE] 3.8-rc1-nohz1

2012-12-29 Thread Frederic Weisbecker
plan to answer you but for now I'm just a bit backlogged due to holidays. Happy new year! --- Frederic Weisbecker (35): 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

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

2012-12-29 Thread Frederic Weisbecker
true 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: Fre

[PATCH 04/27] cputime: Use accessors to read task cputime stats

2012-12-29 Thread Frederic Weisbecker
This is in preparation for the full dynticks feature. While remotely reading the cputime of a task running in a full dynticks CPU, we'll need to do some extra-computation. This way we can account the time it spent tickless in userspace since its last cputime snapshot. Signed-off-by: Fre

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

2012-12-29 Thread Frederic Weisbecker
z CPU running. But let's use this KISS solution for now. Signed-off-by: Frederic Weisbecker Cc: Alessio Igor Bogani Cc: Andrew Morton Cc: Chris Metcalf Cc: Christoph Lameter Cc: Geoff Levand Cc: Gilad Ben Yossef Cc: Hakan Akkan Cc: Ingo Molnar Cc: Paul E. McKenney Cc: Paul Gortmaker

[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 Cc: Alessio Igor Bogani Cc: Andrew Morton Cc: Chris Metcalf Cc: Christoph Lameter Cc:

[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 Cc: Alessio Igor Bogani Cc: Andrew

[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 Cc: Alessio Igor Bogani Cc: Andrew Morton Cc: Chris Metcalf Cc: Christoph Lameter Cc: Geoff Levand Cc: Gilad Ben Yossef Cc: Hakan Akkan Cc: Ingo Molnar Cc: Paul E

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

2012-12-29 Thread Frederic Weisbecker
s_cpu is in dyntick-idle mode? Signed-off-by: Frederic Weisbecker Cc: Alessio Igor Bogani Cc: Andrew Morton Cc: Chris Metcalf Cc: Christoph Lameter Cc: Geoff Levand Cc: Gilad Ben Yossef Cc: Hakan Akkan Cc: Ingo Molnar Cc: Paul E. McKenney Cc: Paul Gortmaker Cc: Peter Zijlstra Cc: S

[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 Cc: Alessio Igor Bogani Cc: Andrew Morton Cc

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

2012-12-29 Thread Frederic Weisbecker
igned-off-by: Frederic Weisbecker Cc: Alessio Igor Bogani Cc: Andrew Morton Cc: Chris Metcalf Cc: Christoph Lameter Cc: Geoff Levand Cc: Gilad Ben Yossef Cc: Hakan Akkan Cc: Ingo Molnar Cc: Paul E. McKenney Cc: Paul Gortmaker Cc: Peter Zijlstra Cc: Steven Rostedt Cc: Thomas Gle

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

2012-12-29 Thread Frederic Weisbecker
for local callbacks? Signed-off-by: Frederic Weisbecker Cc: Alessio Igor Bogani Cc: Andrew Morton Cc: Chris Metcalf Cc: Christoph Lameter Cc: Geoff Levand Cc: Gilad Ben Yossef Cc: Hakan Akkan Cc: Ingo Molnar Cc: Paul E. McKenney Cc: Paul Gortmaker Cc: Peter Zijlstra Cc: Steven Rostedt

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

2012-12-29 Thread Frederic Weisbecker
ot even aware of any out of tree user. Let's remove it. Signed-off-by: Frederic Weisbecker Cc: Alessio Igor Bogani Cc: Andrew Morton Cc: Chris Metcalf Cc: Christoph Lameter Cc: Geoff Levand Cc: Gilad Ben Yossef Cc: Hakan Akkan Cc: Ingo Molnar Cc: Paul E. McKenney Cc: Paul Gortmake

[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 Signed-off-by: Frederic Weisbecker Cc: Alessio Igor Bogani Cc: Andrew Morton Cc: Chris Metcalf Cc: Christoph Lameter Cc: Geoff Levand

[PATCH 24/27] nohz: Add some tracing

2012-12-29 Thread Frederic Weisbecker
Not for merge, just for debugging. Signed-off-by: Frederic Weisbecker Cc: Alessio Igor Bogani Cc: Andrew Morton Cc: Chris Metcalf Cc: Christoph Lameter Cc: Geoff Levand Cc: Gilad Ben Yossef Cc: Hakan Akkan Cc: Ingo Molnar Cc: Paul E. McKenney Cc: Paul Gortmaker Cc: Peter Zijlstra Cc

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

2012-12-29 Thread Frederic Weisbecker
] CHECKME: 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-o

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