[PATCH 1/3] posix_cpu_timer: Consolidate expiry time type

2013-03-05 Thread Frederic Weisbecker
. cputime_t can always fit into it. Signed-off-by: Frederic Weisbecker fweis...@gmail.com Cc: Stanislaw Gruszka sgrus...@redhat.com Cc: Thomas Gleixner t...@linutronix.de Cc: Peter Zijlstra a.p.zijls...@chello.nl Cc: Andrew Morton a...@linux-foundation.org Cc: Ingo Molnar mi...@elte.hu Cc: Oleg

[PATCH 3/3] posix_cpu_timers: Consolidate expired timers check

2013-03-05 Thread Frederic Weisbecker
Consolidate the common code amongst per thread and per process timers list on tick time. List traversal, expiry check and subsequent updates can be shared in a common helper. Signed-off-by: Frederic Weisbecker fweis...@gmail.com Cc: Stanislaw Gruszka sgrus...@redhat.com Cc: Thomas Gleixner t

[PATCH 2/3] posix_cpu_timers: Consolidate timer list cleanups

2013-03-05 Thread Frederic Weisbecker
Cleaning up the posix cpu timers on task exit shares some common code among timer list types, most notably the list traversal and expiry time update. Unify this in a common helper. Signed-off-by: Frederic Weisbecker fweis...@gmail.com Cc: Stanislaw Gruszka sgrus...@redhat.com Cc: Thomas Gleixner

Re: [PATCH 0/4] Alter steal-time reporting in the guest

2013-03-06 Thread Frederic Weisbecker
2013/2/19 Marcelo Tosatti mtosa...@redhat.com: On Mon, Feb 18, 2013 at 05:43:47PM +0100, Frederic Weisbecker wrote: 2013/2/5 Michael Wolf m...@linux.vnet.ibm.com: In the case of where you have a system that is running in a capped or overcommitted environment the user may see steal time

Re: [PATCH 0/4] Alter steal-time reporting in the guest

2013-03-06 Thread Frederic Weisbecker
2013/3/5 Michael Wolf m...@linux.vnet.ibm.com: Sorry for the delay in the response. I did not see the email right away. On Mon, 2013-02-18 at 22:11 -0300, Marcelo Tosatti wrote: On Mon, Feb 18, 2013 at 05:43:47PM +0100, Frederic Weisbecker wrote: 2013/2/5 Michael Wolf m

Re: [PATCHv2] perf: Fix vmalloc ring buffer free function

2013-03-06 Thread Frederic Weisbecker
cjash...@linux.vnet.ibm.com Cc: Frederic Weisbecker fweis...@gmail.com Cc: Ingo Molnar mi...@elte.hu Cc: Namhyung Kim namhy...@kernel.org Cc: Paul Mackerras pau...@samba.org Cc: Peter Zijlstra a.p.zijls...@chello.nl Cc: Arnaldo Carvalho de Melo a...@redhat.com --- kernel/events/ring_buffer.c

Re: [PATCHv2] perf: Fix vmalloc ring buffer free function

2013-03-06 Thread Frederic Weisbecker
2013/3/6 Jiri Olsa jo...@redhat.com: nope, because CONFIG_PERF_USE_VMALLOC rb uses only 1st slot of rg-data_pages[], so rb-nr_page is either 0 or 1 the actuall number of pages is counted via rb-page_order (which is -1 for case with no data pages) Ah right. -- To unsubscribe from this list:

[RFC PATCH 0/2] sched: Lower chances of cputime scaling overflow v2

2013-03-06 Thread Frederic Weisbecker
Hi, This new set handles the div64_u64_rem() implementation in 32 bits. If no comment arise I'll test further the 32 bits case then send a pull request to Ingo. Thanks. Frederic Weisbecker (2): math64: New div64_u64_rem helper sched: Lower chances of cputime scaling overflow include/linux

[PATCH 1/2] math64: New div64_u64_rem helper

2013-03-06 Thread Frederic Weisbecker
Provide an extended version of div64_u64() that also returns the remainder of the division. We are going to need this to refine the cputime scaling code. Signed-off-by: Frederic Weisbecker fweis...@gmail.com Cc: Stanislaw Gruszka sgrus...@redhat.com Cc: Steven Rostedt rost...@goodmis.org Cc

[PATCH 2/2] sched: Lower chances of cputime scaling overflow

2013-03-06 Thread Frederic Weisbecker
to the signal struct. And then we'll need to scale one-by-one the live threads cputime in thread_group_cputime(). The drawback may be a slightly slower code on exit time. Signed-off-by: Frederic Weisbecker fweis...@gmail.com Cc: Stanislaw Gruszka sgrus...@redhat.com Cc: Steven Rostedt rost...@goodmis.org Cc

[GIT PULL] context tracking updates for 3.10

2013-03-07 Thread Frederic Weisbecker
there). Thanks. --- Changes include: * Generalize exception handling * Fix race in context tracking state restore on return from exception and irq exit kernel preemption * Fix cputime scaling in full dynticks accounting dynamic off-case * Fix default Kconfig value --- Frederic Weisbecker (5

Re: [PATCH 07/33] nohz: Basic full dynticks interface

2013-03-07 Thread Frederic Weisbecker
2013/2/11 Borislav Petkov b...@alien8.de: On Tue, Jan 08, 2013 at 03:08:07AM +0100, Frederic Weisbecker wrote: [ … ] diff --git a/kernel/time/Kconfig b/kernel/time/Kconfig index 8601f0d..dc6381d 100644 --- a/kernel/time/Kconfig +++ b/kernel/time/Kconfig @@ -70,6 +70,15 @@ config NO_HZ

Re: [PATCH 07/33] nohz: Basic full dynticks interface

2013-03-07 Thread Frederic Weisbecker
2013/2/20 Borislav Petkov b...@alien8.de: On Mon, Feb 11, 2013 at 03:35:29PM +0100, Borislav Petkov wrote: +/* Parse the boot-time nohz CPU list from the kernel parameters. */ +static int __init tick_nohz_full_setup(char *str) +{ + alloc_bootmem_cpumask_var(full_nohz_mask); +

Re: [PATCH 17/33] sched: Update clock of nohz busiest rq before balancing

2013-03-07 Thread Frederic Weisbecker
2013/1/8 Li Zhong zh...@linux.vnet.ibm.com: On Tue, 2013-01-08 at 03:08 +0100, Frederic Weisbecker wrote: move_tasks() and active_load_balance_cpu_stop() both need to have the busiest rq clock uptodate because they may end up calling can_migrate_task() that uses rq-clock_task to determine

Re: [ANNOUNCE] 3.8-rc4-nohz3

2013-03-07 Thread Frederic Weisbecker
2013/1/23 Hakan Akkan hakanak...@gmail.com: Hi, This WARN_ON is triggered for every full nohz CPU in the system during AP boot in a 16 core machine: Yeah it happens because we are enqueuing a timer to an offline CPU. I'm trying to fix it, tell me if you still see the warning on the next

Re: [PATCH] context_tracking: New context tracking susbsystem

2012-11-29 Thread Frederic Weisbecker
2012/11/29 Li Zhong zh...@linux.vnet.ibm.com: 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-ignore_user_qs !rdtp-in_user

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 zh...@linux.vnet.ibm.com: 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 page ready. Hmm, why

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 g...@redhat.com: On Wed, Nov 28, 2012 at 03:25:07PM +0100, Frederic Weisbecker wrote: 2012/11/28 Gleb Natapov g...@redhat.com: 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

[GIT PULL] cputime: Cleanups on adjusted cputime code

2012-11-29 Thread Frederic Weisbecker
the adjustement code Signed-off-by: Frederic Weisbecker fweis...@gmail.com Frederic Weisbecker (4): cputime: Move thread_group_cputime() to sched code cputime: Rename thread_group_times to thread_group_cputime_adjusted

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 hakanak...@gmail.com: +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; +

Re: Request for tree inclusion

2012-12-02 Thread Frederic Weisbecker
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 to submit that so late. Those branches are in pending pull

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

2013-02-08 Thread Frederic Weisbecker
2013/2/8 Stephen Rothwell s...@canb.auug.org.au: Hi Frederic, On Fri, 8 Feb 2013 14:07:49 +1100 Stephen Rothwell s...@canb.auug.org.au wrote: This patch has the side effect of changing the default configurations: (This is PowerPC pseries_defconfig before/after this patch) @@ -119,8

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

2013-02-08 Thread Frederic Weisbecker
2013/2/4 Vincent Guittot vincent.guit...@linaro.org: On 1 February 2013 19:03, Frederic Weisbecker fweis...@gmail.com 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,6 +5884,7 @@ static

Re: [ANNOUNCE] 3.8-rc6-nohz4

2013-02-08 Thread Frederic Weisbecker
2013/2/7 Ingo Molnar mi...@kernel.org: * Frederic Weisbecker fweis...@gmail.com wrote: 2013/2/7 Ingo Molnar mi...@kernel.org: * Steven Rostedt rost...@goodmis.org 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

Re: [ANNOUNCE] 3.8-rc6-nohz4

2013-02-08 Thread Frederic Weisbecker
2013/2/7 Christoph Lameter c...@linux.com: 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 too much of a performance

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

2013-02-10 Thread Frederic Weisbecker
-by: Frederic Weisbecker fweis...@gmail.com --- arch/powerpc/include/asm/thread_info.h |7 +-- arch/powerpc/kernel/ptrace.c |5 + 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/include/asm/thread_info.h b/arch/powerpc/include/asm

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

2013-02-10 Thread Frederic Weisbecker
2013/2/1 Li Zhong zh...@linux.vnet.ibm.com: 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

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

2013-02-04 Thread Frederic Weisbecker
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-off-by: Frederic Weisbecker fweis

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

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

2013-02-04 Thread Frederic Weisbecker
2013/2/5 Andrew Morton a...@linux-foundation.org: On Tue, 5 Feb 2013 01:51:18 +0100 Frederic Weisbecker fweis...@gmail.com 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 needed

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

2013-02-04 Thread Frederic Weisbecker
2013/2/5 Steven Rostedt rost...@goodmis.org: 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

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

2013-02-05 Thread Frederic Weisbecker
2013/2/5 Andrew Morton a...@linux-foundation.org: On Mon, 4 Feb 2013 23:17:10 +0100 Jan Kara j...@suse.cz 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

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

2013-02-06 Thread Frederic Weisbecker
2013/2/6 Ingo Molnar mi...@kernel.org: 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

[ANNOUNCE] 3.8-rc6-nohz4

2013-02-06 Thread Frederic Weisbecker
--- 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: Comment on rq-clock

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

2013-02-06 Thread Frederic Weisbecker
2013/2/6 Daniel Baluta dbal...@ixiacom.com: Obviously this is a typo and could result in memory leaks if kzalloc fails on a given cpu. Signed-off-by: Daniel Baluta dbal...@ixiacom.com Good catch! Acked-by: Frederic Weisbecker fweis...@gmail.com --- kernel/events/hw_breakpoint.c |2

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

2013-02-06 Thread Frederic Weisbecker
2013/2/1 Li Zhong zh...@linux.vnet.ibm.com: 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

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

2013-02-07 Thread Frederic Weisbecker
2013/2/7 Li Zhong zh...@linux.vnet.ibm.com: 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 POV

Re: [ANNOUNCE] 3.8-rc6-nohz4

2013-02-07 Thread Frederic Weisbecker
2013/2/7 Ingo Molnar mi...@kernel.org: * Steven Rostedt rost...@goodmis.org 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

Re: [ANNOUNCE] 3.8-rc6-nohz4

2013-02-07 Thread Frederic Weisbecker
2013/2/7 Steven Rostedt rost...@goodmis.org: 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

Re: [ANNOUNCE] 3.8-rc6-nohz4

2013-02-07 Thread Frederic Weisbecker
2013/2/7 Steven Rostedt rost...@goodmis.org: 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 believe that Ingo was suggesting

Re: [ANNOUNCE] 3.8-rc6-nohz4

2013-02-07 Thread Frederic Weisbecker
2013/2/7 Steven Rostedt rost...@goodmis.org: 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 the future when more than one task

Re: [ANNOUNCE] 3.8-rc6-nohz4

2013-02-07 Thread Frederic Weisbecker
2013/2/7 Steven Rostedt rost...@goodmis.org: 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 depends on NO_HZ Ok I launched another debate about that single

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

2013-01-29 Thread Frederic Weisbecker
2013/1/29 Steven Rostedt rost...@goodmis.org: 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 wrong on these. See

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

2013-01-29 Thread Frederic Weisbecker
2013/1/29 Steven Rostedt rost...@goodmis.org: 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

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

2013-01-30 Thread Frederic Weisbecker
2013/1/28 Sedat Dilek sedat.di...@gmail.com: On Mon, Jan 28, 2013 at 8:04 PM, Frederic Weisbecker fweis...@gmail.com 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

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

2013-01-31 Thread Frederic Weisbecker
2013/1/31 Sedat Dilek sedat.di...@gmail.com: On Thu, Jan 31, 2013 at 1:38 AM, Frederic Weisbecker fweis...@gmail.com wrote: 2013/1/28 Sedat Dilek sedat.di...@gmail.com: On Mon, Jan 28, 2013 at 8:04 PM, Frederic Weisbecker fweis...@gmail.com wrote: While remotely reading the cputime

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

2013-01-31 Thread Frederic Weisbecker
2013/1/31 Sedat Dilek sedat.di...@gmail.com: 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

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

2013-02-01 Thread Frederic Weisbecker
2013/1/29 Vincent Guittot vincent.guit...@linaro.org: 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

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

2013-02-01 Thread Frederic Weisbecker
2013/2/2 anish kumar anish198519851...@gmail.com: On Sat, 2013-01-26 at 17:24 +0100, Frederic Weisbecker wrote: 2012/11/3 anish kumar anish198519851...@gmail.com: From: anish kumar anish198519851...@gmail.com As no one is using the return value of irq_work_queue function it is better

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

2013-02-03 Thread Frederic Weisbecker
__irq_work_queue intermediate function] Signed-off-by: Frederic Weisbecker fweis...@gmail.com --- include/linux/irq_work.h |2 +- kernel/irq_work.c| 31 ++- 2 files changed, 11 insertions(+), 22 deletions(-) diff --git a/include/linux/irq_work.h b/include/linux

Re: [PATCH v4] sched: fix init NOHZ_IDLE flag

2013-02-26 Thread Frederic Weisbecker
2013/2/22 Vincent Guittot vincent.guit...@linaro.org: I wanted to avoid having to use the sd pointer for testing NOHZ_IDLE flag because it occurs each time we go into idle but it seems to be not easily feasible. Another solution could be to add a synchronization step between

Re: [PATCH 2/2] irq: Cleanup context state transitions in irq_exit()

2013-02-26 Thread Frederic Weisbecker
2013/2/26 Thomas Gleixner t...@linutronix.de: On Fri, 22 Feb 2013, Linus Torvalds wrote: On Fri, Feb 22, 2013 at 7:06 AM, Thomas Gleixner t...@linutronix.de wrote: I prefer to let you guys have the final word on this patch. Whether you apply it or not, I fear I'll never be entirely happy

Re: [RFC/PATCH 4/5] cputime: use do_div() for nsec resolution conversion helpers

2013-02-26 Thread Frederic Weisbecker
2013/2/21 Kevin Hilman khil...@linaro.org: From a8a0a8b8b12512a7f862ade459cd88d2b48e2bf3 Mon Sep 17 00:00:00 2001 From: Kevin Hilman khil...@linaro.org Date: Thu, 14 Feb 2013 11:27:36 -0800 Subject: [PATCH 4/5] cputime: use do_div() for nsec resolution conversion helpers For the nsec

Re: [PATCH 2/2] irq: Cleanup context state transitions in irq_exit()

2013-02-26 Thread Frederic Weisbecker
2013/2/26 Thomas Gleixner t...@linutronix.de: On Tue, 26 Feb 2013, Frederic Weisbecker wrote: 2013/2/26 Thomas Gleixner t...@linutronix.de: On Fri, 22 Feb 2013, Linus Torvalds wrote: On Fri, Feb 22, 2013 at 7:06 AM, Thomas Gleixner t...@linutronix.de wrote: I prefer to let you

Re: [PATCH v4] sched: fix init NOHZ_IDLE flag

2013-02-26 Thread Frederic Weisbecker
2013/2/26 Vincent Guittot vincent.guit...@linaro.org: On 26 February 2013 14:16, Frederic Weisbecker fweis...@gmail.com wrote: 2013/2/22 Vincent Guittot vincent.guit...@linaro.org: I wanted to avoid having to use the sd pointer for testing NOHZ_IDLE flag because it occurs each time we go

Re: [PATCH] perf: Fix vmalloc ring buffer free function

2013-02-27 Thread Frederic Weisbecker
(because nr_pages is 0). This needs to be recognized in the rb_free_work function and set 'nr' to 0 in this case, so only the user page gets freed. Reported-by: Jan Stancek jstan...@redhat.com Signed-off-by: Jiri Olsa jo...@redhat.com Cc: Corey Ashford cjash...@linux.vnet.ibm.com Cc: Frederic

Re: [RFC/PATCH 1/5] context tracking: conditionalize guest support based on CONFIG_KVM

2013-02-27 Thread Frederic Weisbecker
2013/2/27 Kevin Hilman khil...@linaro.org: From 61e35f069a64c03a2bce348487d41072aeb9f36b Mon Sep 17 00:00:00 2001 From: Kevin Hilman khil...@linaro.org Date: Thu, 14 Feb 2013 10:17:37 -0800 Subject: [PATCH] context tracking: conditionalize guest support based on CONFIG_KVM So that it can

Re: [PATCH v4] sched: fix init NOHZ_IDLE flag

2013-02-27 Thread Frederic Weisbecker
On Wed, Feb 27, 2013 at 09:28:26AM +0100, Vincent Guittot wrote: Ok I don't like having a per cpu state in struct sched domain but for now I can't find anything better. So my suggestion is that we do this and describe well the race, define the issue in the changelog and code comments and

[GIT PULL] irq: cleanups

2013-02-28 Thread Frederic Weisbecker
Hi, Until everyone agrees on https://patchwork.kernel.org/patch/2174211/ , here are two commits that seem quite uncontroversial to me. Please pull from: git://git.kernel.org/pub/scm/linux/kernel/git/frederic/linux-dynticks.git irq/urgent-for-tip Thanks. Frederic Weisbecker (2): irq

[PATCH 1/2] irq: Remove IRQ_EXIT_OFFSET workaround

2013-02-28 Thread Frederic Weisbecker
in the end of this function that is not covered by the HARDIRQ_OFFSET but want to stay non-preemptible. Now that irq are always disabled in irq_exit(), the whole code is guaranteed not to be preempted. We can thus remove this hack. Signed-off-by: Frederic Weisbecker fweis...@gmail.com Cc: Linus Torvalds

[PATCH 2/2] irq: Don't re-enable interrupts at the end of irq_exit

2013-02-28 Thread Frederic Weisbecker
not be a problem for these archs. Prior to this commit this was already happening anytime we processed pending softirqs anyway. Suggested-by: Linus Torvalds torva...@linux-foundation.org Signed-off-by: Frederic Weisbecker fweis...@gmail.com Cc: Linus Torvalds torva...@linux-foundation.org Cc: Thomas

[PATCH 0/5] context_tracking: Fixes and improvements

2013-03-01 Thread Frederic Weisbecker
Hi, Here is a bunch of patches preview for 3.10 Thanks. Frederic Weisbecker (5): context_tracking: Move exception handling to generic code context_tracking: Restore correct previous context state on exception exit context_tracking: Restore preempted context state after

[PATCH 1/5] context_tracking: Move exception handling to generic code

2013-03-01 Thread Frederic Weisbecker
Exceptions handling on context tracking should share common treatment: on entry we exit user mode if the exception triggered in that context. Then on exception exit we return to that previous context. Generalize this to avoid duplication across archs. Signed-off-by: Frederic Weisbecker fweis

[PATCH 2/5] context_tracking: Restore correct previous context state on exception exit

2013-03-01 Thread Frederic Weisbecker
exactly. If so, sorry for the missing credit). Signed-off-by: Frederic Weisbecker fweis...@gmail.com Cc: Li Zhong zh...@linux.vnet.ibm.com Cc: Kevin Hilman khil...@linaro.org Cc: Mats Liljegren mats.liljeg...@enea.com Cc: Peter Zijlstra pet...@infradead.org Cc: Ingo Molnar mi...@kernel.org Cc

[PATCH 4/5] cputime: Dynamically scale cputime for full dynticks accounting

2013-03-01 Thread Frederic Weisbecker
accounting to improve its result. We are doing this for CONFIG_TICK_CPU_ACCOUNTING, now we also need to expand it to full dynticks accounting dynamic off-case as well. Signed-off-by: Frederic Weisbecker fweis...@gmail.com Cc: Li Zhong zh...@linux.vnet.ibm.com Cc: Kevin Hilman khil...@linaro.org Cc

[PATCH 5/5] context_tracking: Enable probes by default for selftesting

2013-03-01 Thread Frederic Weisbecker
dynticks cputime accounting. Let's enable these probes selftests by default for now. Suggested: Steven Rostedt rost...@goodmis.org Signed-off-by: Frederic Weisbecker fweis...@gmail.com Cc: Li Zhong zh...@linux.vnet.ibm.com Cc: Kevin Hilman khil...@linaro.org Cc: Mats Liljegren mats.liljeg...@enea.com

[PATCH 3/5] context_tracking: Restore preempted context state after preempt_schedule_irq()

2013-03-01 Thread Frederic Weisbecker
, if preempt_schedule_irq() is called in the tiny frame between user_enter() and the actual return to userspace, we resume userspace with the wrong context tracking state. Fix this by using exception_enter/exit() which are a perfect fit for this kind of issue. Signed-off-by: Frederic Weisbecker fweis...@gmail.com Cc: Li

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

2013-01-24 Thread Frederic Weisbecker
2012/12/3 Vincent Guittot vincent.guit...@linaro.org: 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

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

2013-01-24 Thread Frederic Weisbecker
2013/1/24 Xiaotian Feng xtf...@gmail.com: On Thu, Jan 10, 2013 at 2:33 AM, Frederic Weisbecker fweis...@gmail.com 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_to_jiffies

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

2013-01-25 Thread Frederic Weisbecker
2013/1/25 Vincent Guittot vincent.guit...@linaro.org: 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

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

2013-01-25 Thread Frederic Weisbecker
2013/1/25 Vincent Guittot vincent.guit...@linaro.org: Le 25 janv. 2013 13:00, Frederic Weisbecker fweis...@gmail.com a écrit : 2013/1/25 Vincent Guittot vincent.guit...@linaro.org: This sequence is not the right one I'm going to look for the saved trace to check the sequence above

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

2013-01-25 Thread Frederic Weisbecker
2013/1/26 Paul E. McKenney paul...@linux.vnet.ibm.com: 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

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

2013-01-25 Thread Frederic Weisbecker
2012/11/16 liguang lig.f...@cn.fujitsu.com: Signed-off-by: liguang lig.f...@cn.fujitsu.com --- 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 ---

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

2013-01-26 Thread Frederic Weisbecker
2013/1/26 Joe Perches j...@perches.com: 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) [] - return st

[PATCH] cputime: Avoid multiplication overflow on utime scaling

2013-01-26 Thread Frederic Weisbecker
sgrus...@redhat.com Signed-off-by: Frederic Weisbecker fweis...@gmail.com Cc: Andrew Morton a...@linux-foundation.org Cc: Ingo Molnar mi...@kernel.org Cc: Oleg Nesterov o...@redhat.com Cc: Peter Zijlstra pet...@infradead.org --- kernel/sched/cputime.c | 18 +- 1 files changed, 9

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

2013-01-26 Thread Frederic Weisbecker
2012/11/3 anish kumar anish198519851...@gmail.com: From: anish kumar anish198519851...@gmail.com 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 rost...@goodmis.org Signed-off-by: anish kumar

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

2013-01-28 Thread Frederic Weisbecker
result to the user. Signed-off-by: Frederic Weisbecker fweis...@gmail.com --- 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

[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 fweis...@gmail.com Cc

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

2013-01-28 Thread Frederic Weisbecker
tick and vtime based accounting anytime in order to minimize the overhead associated to user hooks. Signed-off-by: Frederic Weisbecker fweis...@gmail.com Cc: Andrew Morton a...@linux-foundation.org Cc: Ingo Molnar mi...@kernel.org Cc: Li Zhong zh...@linux.vnet.ibm.com Cc: Namhyung Kim namhyung

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

2013-01-28 Thread Frederic Weisbecker
. 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 fweis...@gmail.com Cc

[PATCH 7/8] kvm: Prepare to add generic guest entry/exit callbacks

2013-01-28 Thread Frederic Weisbecker
Do some ground preparatory work before adding guest_enter() and guest_exit() context tracking callbacks. Those will be later used to read the guest cputime safely when we run in full dynticks mode. Signed-off-by: Frederic Weisbecker fweis...@gmail.com Cc: Andrew Morton a...@linux-foundation.org

[PATCH 2/8] cputime: Librarize per nsecs resolution cputime definitions

2013-01-28 Thread Frederic Weisbecker
so all we need is to librarize its implementation in the asm generic headers. Also librarize the default per jiffy granularity cputime_t as well so that we can easily pick either implementation depending on the cputime accounting config we choose. Signed-off-by: Frederic Weisbecker fweis

[PATCH 6/8] cputime: Use accessors to read task cputime stats

2013-01-28 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: Frederic

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

2013-01-28 Thread Frederic Weisbecker
-by: Frederic Weisbecker fweis...@gmail.com Cc: Andrew Morton a...@linux-foundation.org Cc: Ingo Molnar mi...@kernel.org Cc: Li Zhong zh...@linux.vnet.ibm.com Cc: Namhyung Kim namhyung@lge.com Cc: Paul E. McKenney paul...@linux.vnet.ibm.com Cc: Paul Gortmaker paul.gortma...@windriver.com Cc: Peter

[PATCH 3/8] cputime: Move default nsecs_to_cputime() to jiffies based cputime file

2013-01-28 Thread Frederic Weisbecker
this definition to the jiffies based cputime headers as it is the only place where it belongs to. Signed-off-by: Frederic Weisbecker fweis...@gmail.com Cc: Andrew Morton a...@linux-foundation.org Cc: Ingo Molnar mi...@kernel.org Cc: Li Zhong zh...@linux.vnet.ibm.com Cc: Namhyung Kim namhyung

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

2013-01-28 Thread Frederic Weisbecker
2013/1/28 Christoph Lameter c...@linux.com: On Mon, 28 Jan 2013, Frederic Weisbecker wrote: My last concern is the dependency on CONFIG_64BIT. We rely on cputime_t being u64 for reasonable nanosec granularity implementation. And therefore we need a single instruction fetch to read kernel

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

2013-01-28 Thread Frederic Weisbecker
2013/1/29 Steven Rostedt rost...@goodmis.org: 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-dynticks.git tags/full

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

2013-01-28 Thread Frederic Weisbecker
2013/1/28 Christoph Lameter c...@linux.com: On Mon, 28 Jan 2013, Frederic Weisbecker wrote: 2013/1/28 Christoph Lameter c...@linux.com: On Mon, 28 Jan 2013, Frederic Weisbecker wrote: My last concern is the dependency on CONFIG_64BIT. We rely on cputime_t being u64 for reasonable

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

2013-01-28 Thread Frederic Weisbecker
2013/1/29 Steven Rostedt rost...@goodmis.org: 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 rost...@goodmis.org I'm sorry

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

2013-01-28 Thread Frederic Weisbecker
2013/1/29 Steven Rostedt rost...@goodmis.org: 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 results with vtime

[PATCH 0/8] cputime: Full dynticks task/cputime accounting v6

2013-01-22 Thread Frederic Weisbecker
archs to make kern_cpustat reading to be atomic Thanks. --- Frederic Weisbecker (8): context_tracking: Export context state for generic vtime cputime: Librarize per nsecs resolution cputime definitions cputime: Move default nsecs_to_cputime() to jiffies based cputime file cputime

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

2013-01-22 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 fweis...@gmail.com Cc

[PATCH 3/8] cputime: Move default nsecs_to_cputime() to jiffies based cputime file

2013-01-22 Thread Frederic Weisbecker
this definition to the jiffies based cputime headers as it is the only place where it belongs to. Signed-off-by: Frederic Weisbecker fweis...@gmail.com Cc: Andrew Morton a...@linux-foundation.org Cc: Ingo Molnar mi...@kernel.org Cc: Li Zhong zh...@linux.vnet.ibm.com Cc: Namhyung Kim namhyung

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

2013-01-22 Thread Frederic Weisbecker
tick and vtime based accounting anytime in order to minimize the overhead associated to user hooks. Signed-off-by: Frederic Weisbecker fweis...@gmail.com Cc: Andrew Morton a...@linux-foundation.org Cc: Ingo Molnar mi...@kernel.org Cc: Li Zhong zh...@linux.vnet.ibm.com Cc: Namhyung Kim namhyung

[PATCH 6/8] cputime: Use accessors to read task cputime stats

2013-01-22 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: Frederic

[PATCH 2/8] cputime: Librarize per nsecs resolution cputime definitions

2013-01-22 Thread Frederic Weisbecker
so all we need is to librarize its implementation in the asm generic headers. Also librarize the default per jiffy granularity cputime_t as well so that we can easily pick either implementation depending on the cputime accounting config we choose. Signed-off-by: Frederic Weisbecker fweis

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

2013-01-22 Thread Frederic Weisbecker
. 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 fweis...@gmail.com Cc

[PATCH 7/8] kvm: Prepare to add generic guest entry/exit callbacks

2013-01-22 Thread Frederic Weisbecker
Do some ground preparatory work before adding guest_enter() and guest_exit() context tracking callbacks. Those will be later used to read the guest cputime safely when we run in full dynticks mode. Signed-off-by: Frederic Weisbecker fweis...@gmail.com Cc: Andrew Morton a...@linux-foundation.org

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

2013-01-22 Thread Frederic Weisbecker
-by: Frederic Weisbecker fweis...@gmail.com Cc: Andrew Morton a...@linux-foundation.org Cc: Ingo Molnar mi...@kernel.org Cc: Li Zhong zh...@linux.vnet.ibm.com Cc: Namhyung Kim namhyung@lge.com Cc: Paul E. McKenney paul...@linux.vnet.ibm.com Cc: Paul Gortmaker paul.gortma...@windriver.com Cc: Peter

[ANNOUNCE] 3.8-rc4-nohz3

2013-01-22 Thread Frederic Weisbecker
error with CONFIG_IRQ_TIME_ACCOUNTING (thanks Wu Fenguang) - Depend on 64 bits archs to make kernel_cpustat reading to be atomic Thanks. --- Frederic Weisbecker (44): irq_work: Fix racy IRQ_WORK_BUSY flag setting irq_work: Fix racy check on work pending flag irq_work: Remove

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