Re: [PATCH 2/3] cputime: Rename thread_group_times to thread_group_cputime_adjusted

2012-11-26 Thread Frederic Weisbecker
2012/11/26 Steven Rostedt : > On Fri, 2012-11-23 at 15:21 +0100, Frederic Weisbecker wrote: >> We have thread_group_cputime() and thread_group_times(). The naming >> doesn't provide enough information about the difference between >> these two APIs. >> &

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

2012-11-26 Thread Frederic Weisbecker
2012/11/6 Gilad Ben-Yossef : > On Sat, Nov 3, 2012 at 6:09 PM, Frederic Weisbecker > wrote: >> diff --git a/arch/Kconfig b/arch/Kconfig >> index 366ec06..3855e06 100644 >> --- a/arch/Kconfig >> +++ b/arch/Kconfig >> @@ -300,15 +300,15 @@ config SECCOMP_FILT

Re: [RFC PATCH] Fix abnormal rcu dynticks_nesting values related to async page fault

2012-11-27 Thread Frederic Weisbecker
2012/11/27 Li Zhong : > I noticed some warnings complaining about dynticks_nesting value, like > > [ 267.545032] [ cut here ] > [ 267.545032] WARNING: at kernel/rcutree.c:382 rcu_eqs_enter+0xab/0xc0() > [ 267.545032] Hardware name: Bochs > [ 267.545032] Modules linked in

Re: [RFC PATCH] Fix abnormal rcu dynticks_nesting values related to async page fault

2012-11-27 Thread Frederic Weisbecker
2012/11/27 Gleb Natapov : > On Tue, Nov 27, 2012 at 01:15:25PM +0800, Li Zhong wrote: >> @@ -247,10 +247,17 @@ do_async_page_fault(struct pt_regs *regs, unsigned >> long error_code) >> break; >> case KVM_PV_REASON_PAGE_NOT_PRESENT: >> /* page is swapped out by the

Re: [RFC PATCH] Fix abnormal rcu dynticks_nesting values related to async page fault

2012-11-27 Thread Frederic Weisbecker
2012/11/27 Li Zhong : > I noticed some warnings complaining about dynticks_nesting value, like > > [ 267.545032] [ cut here ] > [ 267.545032] WARNING: at kernel/rcutree.c:382 rcu_eqs_enter+0xab/0xc0() > [ 267.545032] Hardware name: Bochs > [ 267.545032] Modules linked in

Re: [RFC PATCH] Fix abnormal rcu dynticks_nesting values related to async page fault

2012-11-27 Thread Frederic Weisbecker
2012/11/27 Gleb Natapov : > For KVM_PV_REASON_PAGE_NOT_PRESENT it behaves like an exception. Ok. There seem to be a bug in kvm_async_pf_task_wait(). Using idle_cpu(cpu) to find out if the current task is the idle task may not work if there is pending wake up. Me may schedule another task but when

Re: [RFC PATCH] Fix abnormal rcu dynticks_nesting values related to async page fault

2012-11-27 Thread Frederic Weisbecker
2012/11/27 Li Zhong : > @@ -247,10 +247,17 @@ do_async_page_fault(struct pt_regs *regs, unsigned long > error_code) > break; > case KVM_PV_REASON_PAGE_NOT_PRESENT: > /* page is swapped out by the host. */ > - rcu_irq_enter(); > +

Re: [RFC PATCH] Fix abnormal rcu dynticks_nesting values related to async page fault

2012-11-27 Thread Frederic Weisbecker
2012/11/27 Paul E. McKenney : > It is OK to call rcu_irq_exit() without a matching rcu_irq_enter() -only- > if you have also called rcu_idle_exit() since the last rcu_idle_enter(). > There will be a similar rule for rcu_user_exit(). > > More generally, it is OK to call rcu_irq_exit() without a matc

Re: [RFC PATCH] Fix abnormal rcu dynticks_nesting values related to async page fault

2012-11-27 Thread Frederic Weisbecker
2012/11/27 Li Zhong : > I noticed some warnings complaining about dynticks_nesting value, like > > [ 267.545032] [ cut here ] > [ 267.545032] WARNING: at kernel/rcutree.c:382 rcu_eqs_enter+0xab/0xc0() > [ 267.545032] Hardware name: Bochs > [ 267.545032] Modules linked in

Re: [RFC PATCH] Fix abnormal rcu dynticks_nesting values related to async page fault

2012-11-27 Thread Frederic Weisbecker
2012/11/27 Paul E. McKenney : > On Tue, Nov 27, 2012 at 04:56:30PM +0100, Frederic Weisbecker wrote: >> 2012/11/27 Gleb Natapov : >> > For KVM_PV_REASON_PAGE_NOT_PRESENT it behaves like an exception. >> >> Ok. >> There seem to be a bug in kvm_async_pf_task_wa

Re: [RFC PATCH] Fix abnormal rcu dynticks_nesting values related to async page fault

2012-11-27 Thread Frederic Weisbecker
2012/11/27 Gleb Natapov : > On Tue, Nov 27, 2012 at 04:56:30PM +0100, Frederic Weisbecker wrote: >> 2012/11/27 Gleb Natapov : >> > For KVM_PV_REASON_PAGE_NOT_PRESENT it behaves like an exception. >> >> Ok. >> There seem to be a bug in kvm_async_pf_task_wait(). U

Re: [RFC PATCH] Fix abnormal rcu dynticks_nesting values related to async page fault

2012-11-27 Thread Frederic Weisbecker
2012/11/27 Gleb Natapov : > diff --git a/arch/x86/kernel/kvm.c b/arch/x86/kernel/kvm.c > index 4180a87..636800d 100644 > --- a/arch/x86/kernel/kvm.c > +++ b/arch/x86/kernel/kvm.c > @@ -113,7 +113,7 @@ void kvm_async_pf_task_wait(u32 token) > int cpu, idle; > > cpu = get_cpu(); > -

Re: [RFC PATCH] Fix abnormal rcu dynticks_nesting values related to async page fault

2012-11-27 Thread Frederic Weisbecker
2012/11/27 Gleb Natapov : > On Tue, Nov 27, 2012 at 06:30:32PM +0100, Frederic Weisbecker wrote: >> 2012/11/27 Gleb Natapov : >> > diff --git a/arch/x86/kernel/kvm.c b/arch/x86/kernel/kvm.c >> > index 4180a87..636800d 100644 >> > --- a/arch/x86/kernel/kv

Re: [RFC PATCH] Fix abnormal rcu dynticks_nesting values related to async page fault

2012-11-27 Thread Frederic Weisbecker
2012/11/27 Gleb Natapov : > What is the semantics of enter_idle()/exit_idle(), what are they used for? It's used by drivers/idle/i7300_idle.c for some tracking. I don't know much the details. enter_idle() is called right before the CPU is set to lower power mode: hlt() exit_idle() is called anyt

Re: [RFC PATCH] Fix abnormal rcu dynticks_nesting values related to async page fault

2012-11-27 Thread Frederic Weisbecker
2012/11/27 Frederic Weisbecker : > 2012/11/27 Gleb Natapov : >> What is the semantics of enter_idle()/exit_idle(), what are they used for? > > It's used by drivers/idle/i7300_idle.c for some tracking. I don't know much > the details. > > enter_idle() is called ri

Re: [PATCH 2/3] cputime: Rename thread_group_times to thread_group_cputime_adjusted

2012-11-27 Thread Frederic Weisbecker
2012/11/26 Steven Rostedt : > OK, let's take a look at the other version now: > > void thread_group_times(struct task_struct *p, cputime_t *ut, cputime_t *st) So this does the same thing than thread_group_cputime(), ie: fetch the raw cputime stats from the task/signal struct, with a two adjustment

Re: [RFC PATCH v2] Add rcu user eqs exception hooks for async page fault

2012-11-28 Thread Frederic Weisbecker
2012/11/28 Li Zhong : > Thank you all for the review and education. > > Below are my current understandings and an update version. Would you > please help to review it again and give your comments? > > Thanks, Zhong > > Now it seems to me that it is legal to call rcu_irq_exit/enter() without > a ma

Re: [RFC PATCH v2] Add rcu user eqs exception hooks for async page fault

2012-11-28 Thread Frederic Weisbecker
2012/11/28 Gleb Natapov : > On Wed, Nov 28, 2012 at 01:55:42PM +0100, Frederic Weisbecker wrote: >> Yes but if rcu_irq_*() calls are fine to be called there, and I >> believe they are because exception_enter() exits the user mode, we >> should start to protect there right n

[PATCH 0/4] cputime: Cleanups on adjusted cputime code v2

2012-11-28 Thread Frederic Weisbecker
Hi, Changes since v1 address Steven Rostedt and Paul Gortmaker reviews: - More comments to distinguish struct cputime / struct task_cputime [3/4] - Comment the reasons and the details for cputime adjustment [4/4] Thanks. Frederic Weisbecker (4): cputime: Move thread_group_cputime() to sched

[PATCH 1/4] cputime: Move thread_group_cputime() to sched code

2012-11-28 Thread Frederic Weisbecker
thread_group_cputime() is a general cputime API that is not only used by posix cpu timer. Let's move this helper to sched code. Signed-off-by: Frederic Weisbecker Cc: Ingo Molnar Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Steven Rostedt Cc: Paul Gortmaker --- kernel/posix-cpu-tim

[PATCH 3/4] cputime: Consolidate cputime adjustment code

2012-11-28 Thread Frederic Weisbecker
ks in the group and the previous adjusted snapshot of the whole group from the signal structure. Just consolidate the common code that does the adjustment. These functions just need to fetch the values from the appropriate source. Signed-off-by: Frederic Weisbecker Cc: Ingo Molnar Cc: Peter Zij

[PATCH 2/4] cputime: Rename thread_group_times to thread_group_cputime_adjusted

2012-11-28 Thread Frederic Weisbecker
version of thread_group_cputime() that does some stabilization on the raw cputime values. ie here: scale on top of CFS runtime stats and bound lower value for monotonicity. Signed-off-by: Frederic Weisbecker Cc: Ingo Molnar Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Steven Rostedt Cc: Paul Gortmaker --

[PATCH 4/4] cputime: Comment cputime's adjusting code

2012-11-28 Thread Frederic Weisbecker
The reason for the scaling and monotonicity correction performed by cputime_adjust() may not be immediately clear to the reviewer. Add some comments to explain what happens there. Signed-off-by: Frederic Weisbecker Cc: Ingo Molnar Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Steven Rostedt Cc

Re: [PATCH] context_tracking: New context tracking susbsystem

2012-11-29 Thread Frederic Weisbecker
2012/11/29 Li Zhong : > On Tue, 2012-11-27 at 19:33 +0100, Frederic Weisbecker wrote: > [] >> - >> - WARN_ON_ONCE(!current->mm); >> - >> - local_irq_save(flags); >> - rdtp = &__get_cpu_var(rcu_dynticks); >> - if (!rdtp->ignor

Re: [RFC PATCH v2] Add rcu user eqs exception hooks for async page fault

2012-11-29 Thread Frederic Weisbecker
2012/11/29 Li Zhong : > On Wed, 2012-11-28 at 13:55 +0100, Frederic Weisbecker wrote: >> > With rcu_user_exit() at the beginning, now rcu_irq_enter() only protects >> > the cpu idle eqs, but it's not good to call rcu_irq_exit() after the cpu >> > halt and the p

Re: [RFC PATCH v2] Add rcu user eqs exception hooks for async page fault

2012-11-29 Thread Frederic Weisbecker
2012/11/29 Gleb Natapov : > On Wed, Nov 28, 2012 at 03:25:07PM +0100, Frederic Weisbecker wrote: >> 2012/11/28 Gleb Natapov : >> > On Wed, Nov 28, 2012 at 01:55:42PM +0100, Frederic Weisbecker wrote: >> >> Yes but if rcu_irq_*() calls are fine to be called there

[GIT PULL] cputime: Cleanups on adjusted cputime code

2012-11-29 Thread Frederic Weisbecker
* Comment the adjustement code Signed-off-by: Frederic Weisbecker ---- Frederic Weisbecker (4): cputime: Move thread_group_cputime() to sched code cputime: Rename thread_group_times to thread_group_cputime_adjusted

Re: [PATCH V3 1/7] sched: Create sched_select_cpu() to give preferred CPU for power saving

2013-03-18 Thread Frederic Weisbecker
2013/3/18 Viresh Kumar : > In order to save power, it would be useful to schedule light weight work on > cpus > that aren't IDLE instead of waking up an IDLE one. > > By idle cpu (from scheduler's perspective) we mean: > - Current task is idle task > - nr_running == 0 > - wake_list is empty > > Th

Re: [PATCH V3 1/7] sched: Create sched_select_cpu() to give preferred CPU for power saving

2013-03-18 Thread Frederic Weisbecker
2013/3/18 Viresh Kumar : > On Mon, Mar 18, 2013 at 9:09 PM, Frederic Weisbecker > wrote: >> 2013/3/18 Viresh Kumar : > >>> +static inline int sched_select_cpu(unsigned int sd_flags) >>> +{ >>> + return raw_smp_processor_id(); >> >>

Re: [PATCH] nohz1: Documentation

2013-03-18 Thread Frederic Weisbecker
2013/3/18 Rob Landley : > On 03/18/2013 11:29:42 AM, Paul E. McKenney wrote: > And really seems like it's kconfig help text? It's more exhaustive than a Kconfig help. A Kconfig help text should have the level of detail that describe the purpose and impact of a feature, as well as some quick refere

Re: [PATCH] nohz1: Documentation

2013-03-18 Thread Frederic Weisbecker
2013/3/18 Rob Landley : > On 03/18/2013 01:46:32 PM, Frederic Weisbecker wrote: >> I really think we want to keep all the detailed explanations from >> Paul's doc. What we need is not a quick reference but a very detailed >> documentation. > > > It's

Re: [PATCH 4/4] selftests: Add basic posix timers selftests

2013-03-18 Thread Frederic Weisbecker
2013/3/18 Andrew Morton : > On Fri, 15 Mar 2013 17:54:02 +0100 Frederic Weisbecker > wrote: > >> Add some initial basic tests on a few posix timers >> interface such as setitimer() and timer_settime(). >> >> These simply check that expiration happens in a reaso

Re: [PATCH 1/4] posix_cpu_timer: Consolidate expiry time type

2013-03-19 Thread Frederic Weisbecker
2013/3/19 Andrew Morton : > On Fri, 15 Mar 2013 17:53:59 +0100 Frederic Weisbecker > wrote: > >> The posix cpu timer expiry time is stored in a union of >> two types: a 64 bits field if we rely on scheduler precise >> accounting, or a cputime_t if we rely on jiffies.

Re: [PATCH] dynticks: avoid flow_cache_flush() interrupting every core

2013-03-20 Thread Frederic Weisbecker
2013/3/20 David Miller : > From: Chris Metcalf > Date: Tue, 19 Mar 2013 17:35:58 -0400 > >> Previously, if you did an "ifconfig down" or similar on one core, and >> the kernel had CONFIG_XFRM enabled, every core would be interrupted to >> check its percpu flow list for items that could be garbage

[GIT PULL] nohz: Full dynticks base interface

2013-03-21 Thread Frederic Weisbecker
. Sorry for the missing credits, I lost a bit track... Thanks. --- Frederic Weisbecker (3): nohz: Basic full dynticks interface nohz: Assign timekeeping duty to a CPU outside the full dynticks range nohz: Wake up full dynticks CPUs when a timer gets enqueued Documentation/kernel

[PATCH 1/3] nohz: Basic full dynticks interface

2013-03-21 Thread Frederic Weisbecker
sted-by: Paul E. McKenney Signed-off-by: Frederic Weisbecker Cc: Andrew Morton Cc: Chris Metcalf Cc: Christoph Lameter Cc: Geoff Levand Cc: Gilad Ben Yossef Cc: Hakan Akkan Cc: Ingo Molnar Cc: Kevin Hilman Cc: Li Zhong Cc: Namhyung Kim Cc: Paul E. McKenney Cc: Paul Gortmaker Cc: Peter Zijls

[PATCH 2/3] nohz: Assign timekeeping duty to a CPU outside the full dynticks range

2013-03-21 Thread Frederic Weisbecker
imple approach first. Signed-off-by: Frederic Weisbecker Cc: Andrew Morton Cc: Chris Metcalf Cc: Christoph Lameter Cc: Geoff Levand Cc: Gilad Ben Yossef Cc: Hakan Akkan Cc: Ingo Molnar Cc: Kevin Hilman Cc: Li Zhong Cc: Namhyung Kim Cc: Paul E. McKenney Cc: Paul Gortmaker Cc: Peter Zijlstra

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

2013-03-21 Thread Frederic Weisbecker
need some careful synchronization though. So deal with such optimization later and start simple. Signed-off-by: Frederic Weisbecker Cc: Andrew Morton Cc: Chris Metcalf Cc: Christoph Lameter Cc: Geoff Levand Cc: Gilad Ben Yossef Cc: Hakan Akkan Cc: Ingo Molnar Cc: Kevin Hilman Cc: Li Zhong

[PATCH] irq_work: irq_work_queue function return value not used.

2013-02-03 Thread Frederic Weisbecker
From: anish kumar As no one is using the return value of irq_work_queue function it is better to just make it void. Acked-by: Steven Rostedt Signed-off-by: anish kumar [fix stale comments, remove now unnecessary __irq_work_queue intermediate function] Signed-off-by: Frederic Weisbecker

[GIT PULL] cputime: Full dynticks task/cputime accounting v8

2013-02-04 Thread Frederic Weisbecker
IRT_CPU_ACCOUNTING except that context location and cputime snaphots are synchronized between write and read side such that the latter can safely retrieve the pending tickless cputime of a task and add it to its latest cputime snapshot to return the correct result to the user. Signed-of

[GIT PULL] printk: Support for full dynticks mode

2013-02-04 Thread Frederic Weisbecker
just made a new branch that contains tip:irq/core with nohz/printk-v8 merged inside which deals with the conflict. Thanks. --- Frederic Weisbecker (5): nohz: Add API to check tick state irq_work: Don't stop the tick with pending works irq_work: Make self-IPIs op

Re: [GIT PULL] printk: Support for full dynticks mode

2013-02-04 Thread Frederic Weisbecker
2013/2/5 Andrew Morton : > On Tue, 5 Feb 2013 01:51:18 +0100 > Frederic Weisbecker wrote: > >> printk: Wake up klogd using irq_work > > That seems reasonable. > > I'm wondering if we can now remove the printk_sched() special-case. > iirc, that was

Re: [GIT PULL] printk: Support for full dynticks mode

2013-02-04 Thread Frederic Weisbecker
2013/2/5 Steven Rostedt : > On Mon, 2013-02-04 at 18:09 -0800, Andrew Morton wrote: > >> Maybe there were other deadlock scenarios, dunno. That knowledge >> appears to be disappearing into the mists of time :( > > Discussing this on IRC with Frederic, he brought up that the > up(&console_sem) can

Re: [PATCH v2] printk: Avoid softlockups in console_unlock()

2013-02-05 Thread Frederic Weisbecker
2013/2/5 Andrew Morton : > On Mon, 4 Feb 2013 23:17:10 +0100 > Jan Kara wrote: > >> A CPU can be caught in console_unlock() for a long time (tens of seconds are >> reported by our customers) when other CPUs are using printk heavily and >> serial >> console makes printing slow. Despite serial con

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

2013-02-06 Thread Frederic Weisbecker
2013/2/6 Ingo Molnar : > > btw., I got a non-trivial conflicts in > kernel/context_tracking.c, with the following commits > interacting between the RCU tree (tip:core/rcu) and the > scheduler tree (tip:sched/core): > > 6a61671bb2f3 cputime: Safely read cputime of full dynticks CPUs > abf917cd91cb

[ANNOUNCE] 3.8-rc6-nohz4

2013-02-06 Thread Frederic Weisbecker
applied in -tip --- Frederic Weisbecker (26): nohz: Basic full dynticks interface nohz: Assign timekeeping duty to a non-full-nohz CPU nohz: Trace timekeeping update nohz: Wake up full dynticks CPUs when a timer gets enqueued rcu: Restart the tick on non-responding full dynticks CPUs sched: Comme

Re: [PATCH] perf/hwbp: Fix cleanup in case of kzalloc failure

2013-02-06 Thread Frederic Weisbecker
2013/2/6 Daniel Baluta : > Obviously this is a typo and could result in memory leaks > if kzalloc fails on a given cpu. > > Signed-off-by: Daniel Baluta Good catch! Acked-by: Frederic Weisbecker > --- > kernel/events/hw_breakpoint.c |2 +- > 1 files changed, 1 inser

Re: [RFC PATCH 1/5] powerpc: Syscall hooks for context tracking subsystem

2013-02-06 Thread Frederic Weisbecker
2013/2/1 Li Zhong : > This is the syscall slow path hooks for context tracking subsystem, > corresponding to > [PATCH] x86: Syscall hooks for userspace RCU extended QS > commit bf5a3c13b939813d28ce26c01425054c740d6731 > > TIF_MEMDIE is moved to the second 16-bits (with value 17), as it seems ther

Re: [RFC PATCH 1/5] powerpc: Syscall hooks for context tracking subsystem

2013-02-07 Thread Frederic Weisbecker
2013/2/7 Li Zhong : > On Thu, 2013-02-07 at 01:29 +0100, Frederic Weisbecker wrote: >> In x86-64, schedule_user() and do_notify_resume() can be called before >> syscall_trace_leave(). As a result we may be entering >> syscall_trace_leave() in user mode (from a context tracking

Re: [ANNOUNCE] 3.8-rc6-nohz4

2013-02-07 Thread Frederic Weisbecker
2013/2/7 Ingo Molnar : > > * Steven Rostedt wrote: > >> I'll reply to this as I come up with comments. >> >> First thing is, don't call it NO_HZ_FULL. A better name would >> be NO_HZ_CPU. I would like to reserve NO_HZ_FULL when we >> totally remove jiffies :-) > > I don't think we want yet another

Re: [ANNOUNCE] 3.8-rc6-nohz4

2013-02-07 Thread Frederic Weisbecker
2013/2/7 Steven Rostedt : > I'll reply to this as I come up with comments. > > First thing is, don't call it NO_HZ_FULL. A better name would be > NO_HZ_CPU. I would like to reserve NO_HZ_FULL when we totally remove > jiffies :-) I'm not sure we'll ever be able to completely remove the tick, even i

Re: [ANNOUNCE] 3.8-rc6-nohz4

2013-02-07 Thread Frederic Weisbecker
2013/2/7 Steven Rostedt : > On Thu, 2013-02-07 at 17:25 +0100, Frederic Weisbecker wrote: > >> At least for now we seem to agree on CONFIG_NO_HZ_IDLE and keep >> CONFIG_NO_HZ for compatibility. Are you ok with that? If so I'll send >> a patch. > > I belie

Re: [ANNOUNCE] 3.8-rc6-nohz4

2013-02-07 Thread Frederic Weisbecker
2013/2/7 Steven Rostedt : > On Thu, 2013-02-07 at 17:41 +0100, Frederic Weisbecker wrote: > >> I'm not convinced that "single task" must be a fundamental component >> of this. It's an implementation detail. We should be able to keep the >> tick off in t

Re: [ANNOUNCE] 3.8-rc6-nohz4

2013-02-07 Thread Frederic Weisbecker
2013/2/7 Steven Rostedt : > On Thu, 2013-02-07 at 17:45 +0100, Frederic Weisbecker wrote: > >> > >> > config NO_HZ_TASK >> > bool "Stop tick on specified CPUs when single task is running" >> > default n >> > d

Re: [PATCH 4/8] cputime: Generic on-demand virtual cputime accounting

2013-02-08 Thread Frederic Weisbecker
2013/2/8 Stephen Rothwell : > Hi Frederic, > > On Fri, 8 Feb 2013 14:07:49 +1100 Stephen Rothwell > wrote: >> >> This patch has the side effect of changing the default configurations: >> (This is PowerPC pseries_defconfig before/after this patch) >> >> @@ -119,8 +120,8 @@ >> # >> # CPU/Task tim

Re: [PATCH v2 1/2] sched: fix init NOHZ_IDLE flag

2013-02-08 Thread Frederic Weisbecker
2013/2/4 Vincent Guittot : > On 1 February 2013 19:03, Frederic Weisbecker wrote: >>> diff --git a/kernel/sched/core.c b/kernel/sched/core.c >>> index 257002c..fd41924 100644 >>> --- a/kernel/sched/core.c >>> +++ b/kernel/sched/core.c >>> @@ -5884,

Re: [ANNOUNCE] 3.8-rc6-nohz4

2013-02-08 Thread Frederic Weisbecker
2013/2/7 Ingo Molnar : > > * Frederic Weisbecker wrote: > >> 2013/2/7 Ingo Molnar : >> > >> > * Steven Rostedt wrote: >> > >> >> I'll reply to this as I come up with comments. >> >> >> >> First thing is, don&#x

Re: [ANNOUNCE] 3.8-rc6-nohz4

2013-02-08 Thread Frederic Weisbecker
2013/2/7 Christoph Lameter : > On Thu, 7 Feb 2013, Frederic Weisbecker wrote: > >> Not with hrtick. > > hrtick? Did we not already try that a couple of years back and it turned > out that the overhead of constantly reprogramming a timer via the PCI bus > was causing t

Re: [RFC PATCH 1/5] powerpc: Syscall hooks for context tracking subsystem

2013-02-10 Thread Frederic Weisbecker
e 17), as it seems there > is no asm code using it. TIF_NOHZ is added to _TIF_SYCALL_T_OR_A, so it is > better for it to be in the same 16 bits with others in the group, so in the > asm code, andi. with this group could work. > > Signed-off-by: Li Zhong Looks good. Thanks. Acked-by: Fr

Re: [RFC PATCH 2/5] powerpc: Exception hooks for context tracking subsystem

2013-02-10 Thread Frederic Weisbecker
2013/2/1 Li Zhong : > This is the exception hooks for context tracking subsystem, including > data access, program check, single step, instruction breakpoint, machine > check, > alignment, fp unavailable, altivec assist, unknown exception, whose handlers > might use RCU. > > This patch corresponds

Re: [PATCH 4/4] nohz: New option to force all CPUs in full dynticks range

2013-04-02 Thread Frederic Weisbecker
2013/3/30 Ingo Molnar : > > * Frederic Weisbecker wrote: > >> 2013/3/28 Ingo Molnar : >> > >> > * Frederic Weisbecker wrote: >> > >> >> +config NO_HZ_EXTENDED_ALL >> >> + bool "Full dynticks system on all CPUs" &

Re: systemtap broken by removal of register_timer_hook

2013-04-03 Thread Frederic Weisbecker
2013/4/3 Mel Gorman : > Commit ba6fdda4 (profiling: Remove unused timer hook) removed > [un]register_timer_hook due to a lack of upstream users and a belief > that there were no out-of-tree users. However, systemtap uses it and > with that patch applied, some stap scripts fail with > > WARNING: "un

[PATCH 2/4] nohz: Rename CONFIG_NO_HZ to CONFIG_NO_HZ_COMMON

2013-04-03 Thread Frederic Weisbecker
r backward compatibility. Signed-off-by: Frederic Weisbecker Cc: Andrew Morton Cc: Chris Metcalf Cc: Christoph Lameter Cc: Geoff Levand Cc: Gilad Ben Yossef Cc: Hakan Akkan Cc: Ingo Molnar Cc: Kevin Hilman Cc: Li Zhong Cc: Namhyung Kim Cc: Paul E. McKenney Cc: Paul Gortmaker Cc: Peter Zijlstra

[PATCH 4/4] nohz: Print final full dynticks CPUs range on boot

2013-04-03 Thread Frederic Weisbecker
ing to run. Signed-off-by: Frederic Weisbecker Cc: Andrew Morton Cc: Chris Metcalf Cc: Christoph Lameter Cc: Geoff Levand Cc: Gilad Ben Yossef Cc: Hakan Akkan Cc: Ingo Molnar Cc: Kevin Hilman Cc: Li Zhong Cc: Namhyung Kim Cc: Paul E. McKenney Cc: Paul Gortmaker Cc: Peter Zijlstra

[RFC GIT PULL] nohz: Kconfig layout improvements

2013-04-03 Thread Frederic Weisbecker
kernel/git/frederic/linux-dynticks.git timers/nohz-v2 Thanks. --- Frederic Weisbecker (4): nohz: Unhide full dynticks feature from its dependencies nohz: Rename CONFIG_NO_HZ to CONFIG_NO_HZ_COMMON nohz: Pack nohz Kconfig option in a menu of choices nohz: Print final full dynticks

[PATCH 1/4] nohz: Unhide full dynticks feature from its dependencies

2013-04-03 Thread Frederic Weisbecker
: CONFIG_VIRT_CPU_ACCOUNTING_GEN is part of a Kconfig choice menu and it appears we can't select it from another Kconfig selection when it's under such layout. So for now this particular item stays as a passive dependency. Reported-by: Ingo Molnar Signed-off-by: Frederic Weisbecker Cc: Andrew Morton Cc: Chris M

[PATCH 3/4] nohz: Pack nohz Kconfig option in a menu of choices

2013-04-03 Thread Frederic Weisbecker
d-off-by: Frederic Weisbecker Cc: Andrew Morton Cc: Chris Metcalf Cc: Christoph Lameter Cc: Geoff Levand Cc: Gilad Ben Yossef Cc: Hakan Akkan Cc: Ingo Molnar Cc: Kevin Hilman Cc: Li Zhong Cc: Namhyung Kim Cc: Paul E. McKenney Cc: Paul Gortmaker Cc: Peter Zijlstra Cc: Steven Rosted

Re: systemtap broken by removal of register_timer_hook

2013-04-03 Thread Frederic Weisbecker
2013/4/3 Frank Ch. Eigler : > Frederic Weisbecker writes: > >> [...] >> Sometimes I don't mind keeping around code in the kernel for out of >> tree users, depending on the case. But in this specific matter we have >> more standard ways to do this kind of hook

Re: [PATCH -tip 0/4] do not make cputime scaling in kernel

2013-04-04 Thread Frederic Weisbecker
2013/4/4 Stanislaw Gruszka : > This patch series removes cputime scaling from kernel. It can be easily > done in user space using floating point if we provide sum_exec_runtime, > what patches 2/4 and 3/4 do. I have procps patch which utilize that: > > http://people.redhat.com/sgruszka/procps-use-su

Re: systemtap broken by removal of register_timer_hook

2013-04-04 Thread Frederic Weisbecker
2013/4/3 Frank Ch. Eigler : > Hi - > > On Wed, Apr 03, 2013 at 02:49:53PM +0200, Frederic Weisbecker wrote: > >> Sounds good, would you like to propose a version? We are also >> interested in a timer tick event tracepoint for dynticks debugging. > > How about this

Re: [PATCH -tip 0/4] do not make cputime scaling in kernel

2013-04-04 Thread Frederic Weisbecker
2013/4/4 Stanislaw Gruszka : > On Thu, Apr 04, 2013 at 02:31:42PM +0200, Frederic Weisbecker wrote: >> I don't know. I'm not convinced userland is the right place to perform >> this kind of check. The kernel perhaps doesn't give guarantee about >> utime/stime

Re: posix_cpu_timer: initialize "now" variable

2013-04-04 Thread Frederic Weisbecker
2013/4/4 Arnd Bergmann : > Patch 6d0e025 "posix_cpu_timer: consolidate expiry time type" in linux-next > introduces a new compiler warning: > > kernel/posix-cpu-timers.c: In function 'posix_cpu_timer_schedule': > kernel/posix-cpu-timers.c:1127:19: warning: 'now' may be used uninitialized > in this

Re: [PATCH Resend v5] sched: fix init NOHZ_IDLE flag

2013-04-04 Thread Frederic Weisbecker
ted with old sched_domain once it has been initialized. > But this solution introduces a additionnal latency in the rebuild sequence > that is called during cpu hotplug. > > As suggested by Frederic Weisbecker, another solution is to have the same > rcu lifecycle for both NOHZ_IDLE and sche

Re: [PATCH Resend v5] sched: fix init NOHZ_IDLE flag

2013-04-04 Thread Frederic Weisbecker
2013/4/4 Frederic Weisbecker : > 2013/4/3 Vincent Guittot : >> On my smp platform which is made of 5 cores in 2 clusters, I have the >> nr_busy_cpu field of sched_group_power struct that is not null when the >> platform is fully idle. The root cause is: >> During the boo

Re: [PATCH Resend v5] sched: fix init NOHZ_IDLE flag

2013-04-04 Thread Frederic Weisbecker
ted with old sched_domain once it has been initialized. > But this solution introduces a additionnal latency in the rebuild sequence > that is called during cpu hotplug. > > As suggested by Frederic Weisbecker, another solution is to have the same > rcu lifecycle for both NOHZ_IDLE and sche

Re: sched/cputime: sig->prev_stime underflow

2013-04-04 Thread Frederic Weisbecker
2013/4/4 Dave Hansen : > With the 3.9-rcs (and probably much earlier) I'm seeing some weird top > output where the cpu time "spent" is millions of hours: > > 445 root 20 0 000 S0 0.0 5124095h kworker/45:1 > 404 root 20 0 000 S0 0.0 5124095h kworker/

Re: [GIT PULL] cputime: Full dynticks task/cputime accounting v7

2013-01-28 Thread Frederic Weisbecker
2013/1/29 Steven Rostedt : > On Mon, 2013-01-28 at 20:03 +0100, Frederic Weisbecker wrote: >> Ingo, >> >> Please pull the new full dynticks cputime accounting code that >> can be found at: >> >> git://git.kernel.org/pub/scm/linux/kernel/git/frederic/linux-d

Re: [GIT PULL] cputime: Full dynticks task/cputime accounting v7

2013-01-28 Thread Frederic Weisbecker
2013/1/28 Christoph Lameter : > On Mon, 28 Jan 2013, Frederic Weisbecker wrote: > >> 2013/1/28 Christoph Lameter : >> > On Mon, 28 Jan 2013, Frederic Weisbecker wrote: >> > >> >> My last concern is the dependency on CONFIG_64BIT. We rely on cputim

Re: [GIT PULL] cputime: Full dynticks task/cputime accounting v7

2013-01-28 Thread Frederic Weisbecker
2013/1/29 Steven Rostedt : > On Mon, 2013-01-28 at 19:02 -0500, Steven Rostedt wrote: > >> I've ran these through some basic tests and I don't see any issues. But >> why did you drop the 'comment' patch that you had in v6? >> >> Acked-by: Steven Rostedt >> > > I'm sorry but I need to un-Ack. Due t

Re: [GIT PULL] cputime: Full dynticks task/cputime accounting v7

2013-01-28 Thread Frederic Weisbecker
2013/1/29 Steven Rostedt : > On Tue, 2013-01-29 at 03:39 +0100, Frederic Weisbecker wrote: > >> Please send me your kernelspin so I can test as well. > > http://rostedt.homelinux.com/private/kernelspin.c I can't reproduce your issue. I'm getting almost the same result

Re: [GIT PULL] cputime: Full dynticks task/cputime accounting v7

2013-01-29 Thread Frederic Weisbecker
2013/1/29 Steven Rostedt : > On Tue, 2013-01-29 at 16:12 +0100, Frederic Weisbecker wrote: > >> I have set some cputime tracepoint and looked at the stacktrace. They >> are sorted by weight, which is the amount of cputime accounted. I >> can't find anything w

Re: [GIT PULL] cputime: Full dynticks task/cputime accounting v7

2013-01-29 Thread Frederic Weisbecker
2013/1/29 Steven Rostedt : > On Mon, 2013-01-28 at 21:36 -0500, Steven Rostedt wrote: > >> [root@bxtest ~]# time /work/c/kernelspin 10 >> >> real 0m10.001s >> user 0m1.114s >> sys 0m8.886s >> >> >> But after enabling the force context_tracking I get this: >> >> [root@bxtest ~]# time /work/c/ke

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

2013-01-30 Thread Frederic Weisbecker
2013/1/28 Sedat Dilek : > On Mon, Jan 28, 2013 at 8:04 PM, Frederic Weisbecker > wrote: >> While remotely reading the cputime of a task running in a >> full dynticks CPU, the values stored in utime/stime fields >> of struct task_struct may be stale. Its values may be tho

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

2013-01-31 Thread Frederic Weisbecker
2013/1/31 Sedat Dilek : > On Thu, Jan 31, 2013 at 1:38 AM, Frederic Weisbecker > wrote: >> 2013/1/28 Sedat Dilek : >>> On Mon, Jan 28, 2013 at 8:04 PM, Frederic Weisbecker >>> wrote: >>>> While remotely reading the cputime of a task running in a &g

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

2013-01-31 Thread Frederic Weisbecker
2013/1/31 Sedat Dilek : > I still dunno all parts of dynticks and their correlation. > AFAICS they seem to be independent, can't say if it is "complete" with > dynticks-cputime-only. Dynticks cputime and dynticks printk are both standalone and independant. In mainline, both printk and cputime acco

Re: [PATCH v2 1/2] sched: fix init NOHZ_IDLE flag

2013-02-01 Thread Frederic Weisbecker
2013/1/29 Vincent Guittot : > On my smp platform which is made of 5 cores in 2 clusters,I have the > nr_busy_cpu field of sched_group_power struct that is not null when the > platform is fully idle. The root cause seems to be: > During the boot sequence, some CPUs reach the idle loop and set their

Re: [PATCH] IRQ CORE: irq_work_queue function return value not used.

2013-02-01 Thread Frederic Weisbecker
2013/2/2 anish kumar : > On Sat, 2013-01-26 at 17:24 +0100, Frederic Weisbecker wrote: >> 2012/11/3 anish kumar : >> > From: anish kumar >> > >> > As no one is using the return value of irq_work_queue function >> > it is better to just make it void. &g

Re: [PATCH Resend 1/3] sched: fix nr_busy_cpus with coupled cpuidle

2013-01-24 Thread Frederic Weisbecker
2012/12/3 Vincent Guittot : > With the coupled cpuidle driver (but probably also with other drivers), > a CPU loops in a temporary safe state while waiting for other CPUs of its > cluster to be ready to enter the coupled C-state. If an IRQ or a softirq > occurs, the CPU will stay in this internal l

Re: [PATCH v2 repost] sched: cputime: avoid multiplication overflow (in common cases)

2013-01-24 Thread Frederic Weisbecker
2013/1/24 Xiaotian Feng : > On Thu, Jan 10, 2013 at 2:33 AM, Frederic Weisbecker > wrote: >> --- a/kernel/sched/cputime.c >> +++ b/kernel/sched/cputime.c >> @@ -509,11 +509,11 @@ EXPORT_SYMBOL_GPL(vtime_account); >> # define nsecs_to_cputime(__nsecs) nsecs_

Re: [PATCH Resend 1/3] sched: fix nr_busy_cpus with coupled cpuidle

2013-01-25 Thread Frederic Weisbecker
2013/1/25 Vincent Guittot : > This sequence is not the right one > >> I'm going to look for the saved trace to check the sequence above > > I haven't been able to reproduce the bug that this patch was supposed to > solved. The patch 2 and 3 seem enough to fix the nr_busy_cpus field. I will > contin

Re: [PATCH Resend 1/3] sched: fix nr_busy_cpus with coupled cpuidle

2013-01-25 Thread Frederic Weisbecker
2013/1/25 Vincent Guittot : > > Le 25 janv. 2013 13:00, "Frederic Weisbecker" a écrit : > > >> >> 2013/1/25 Vincent Guittot : >> > This sequence is not the right one >> > >> >> I'm going to look for the saved trace to check

Re: [PATCH 0/7] cputime: Full dynticks task/cputime accounting v5

2013-01-25 Thread Frederic Weisbecker
2013/1/26 Paul E. McKenney : > Right... Replied to the wrong email. :-/ > > I queued "context_tracking: Add comments on interface and internals". Sounds perfect, thanks :) -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel

Re: [PATCH]cputime: make bool type for steal ticks

2013-01-25 Thread Frederic Weisbecker
2012/11/16 liguang : > Signed-off-by: liguang > --- > kernel/sched/cputime.c |2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/kernel/sched/cputime.c b/kernel/sched/cputime.c > index 81b763b..d2c24c1 100644 > --- a/kernel/sched/cputime.c > +++ b/kernel/sched/cputime.c

Re: [PATCH]cputime: make bool type for steal ticks

2013-01-26 Thread Frederic Weisbecker
2013/1/26 Joe Perches : > On Sat, 2013-01-26 at 01:45 +0100, Frederic Weisbecker wrote: >> > diff --git a/kernel/sched/cputime.c b/kernel/sched/cputime.c > [] >> > @@ -282,7 +282,7 @@ static __always_inline bool >> > steal_account_process_tick(void) &g

[PATCH] cputime: Avoid multiplication overflow on utime scaling

2013-01-26 Thread Frederic Weisbecker
ld considerably reduce the chances of an overflow on most workloads. This is largely inspired by a patch from Stanislaw Gruszka: http://lkml.kernel.org/r/20130107113144.ga7...@redhat.com Inspired-by: Stanislaw Gruszka Reported-by: Stanislaw Gruszka Acked-by: Stanislaw Gruszka Signed-off-by: Frederic

Re: [PATCH] IRQ CORE: irq_work_queue function return value not used.

2013-01-26 Thread Frederic Weisbecker
2012/11/3 anish kumar : > From: anish kumar > > As no one is using the return value of irq_work_queue function > it is better to just make it void. > > Acked-by: Steven Rostedt > Signed-off-by: anish kumar > --- > kernel/irq_work.c |5 ++--- > 1 files changed, 2 insertions(+), 3 deletions(-

[GIT PULL] cputime: Full dynticks task/cputime accounting v7

2013-01-28 Thread Frederic Weisbecker
he correct result to the user. Signed-off-by: Frederic Weisbecker --- Changes since v6: * Fix build error with kvm modules (Thanks Sedat Dilek and Wu Fenguang) * Fix mistyped header inclusion in ia64 * Fix more missing symbols for kvm --- Frederic Weisbecker (8): context_tracking: Export con

[PATCH 1/8] context_tracking: Export context state for generic vtime

2013-01-28 Thread Frederic Weisbecker
Export the context state: whether we run in user / kernel from the context tracking subsystem point of view. This is going to be used by the generic virtual cputime accounting subsystem that is needed to implement the full dynticks. Signed-off-by: Frederic Weisbecker Cc: Andrew Morton Cc: Ingo

[PATCH 5/8] cputime: Allow dynamic switch between tick/virtual based cputime accounting

2013-01-28 Thread Frederic Weisbecker
ch between tick and vtime based accounting anytime in order to minimize the overhead associated to user hooks. Signed-off-by: Frederic Weisbecker Cc: Andrew Morton Cc: Ingo Molnar Cc: Li Zhong Cc: Namhyung Kim Cc: Paul E. McKenney Cc: Paul Gortmaker Cc: Peter Zijlstra Cc: Steven Rostedt

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

2013-01-28 Thread Frederic Weisbecker
t. To fix this, flush the cputime of the dynticks CPUs on kernel <-> user transition and record the time / context where we did this. Then on top of this snapshot and the current time, perform the fixup on the reader side from task_times() accessors. Signed-off-by: Frederic Weisbecker Cc: A

  1   2   3   4   5   6   7   8   9   10   >