Re: [PATCH 1/7] Simple Performance Counters: Core Piece

2007-08-17 Thread Mathieu Desnoyers
release, > +}; > + > +static int perf_reset_write(struct file *file, const char __user *buffer, > + unsigned long count, void *data) > +{ > + perfcount_reset(); > + return count; > +} > + > +static __init int init_perfcounter(void) { > + int cpu;

Re: [patch] sched: schedstat needs a diet

2007-10-18 Thread Mathieu Desnoyers
* Ken Chen ([EMAIL PROTECTED]) wrote: > On 10/18/07, Mathieu Desnoyers <[EMAIL PROTECTED]> wrote: > > Good question indeed. How large is this memory footprint exactly ? If it > > is as small as you say, I suspect that the real issue could be that > > these variable ar

Re: [patch] sched: schedstat needs a diet

2007-10-18 Thread Mathieu Desnoyers
ollection is required ? It could add one pointer to the task struct (NULL by default, set to a memory location used to accumulate per-task stats before we activate system wide stats counting). It could fit well with the immediate values, which could be used to enable/disable the statistic collec

[PATCH] Kconfig.instrumentation sourcing missing on i386 and x86_64

2007-10-20 Thread Mathieu Desnoyers
rch/x86_64/Kconfig 2007-10-20 12:00:18.0 -0400 @@ -801,6 +801,8 @@ source "drivers/firmware/Kconfig" source fs/Kconfig +source "kernel/Kconfig.instrumentation" + source "arch/x86_64/Kconfig.debug" source "security/Kconfig" -- Mathieu Desnoyers C

Re: [patch 4/7] Immediate Values - i386 Optimization

2007-10-20 Thread Mathieu Desnoyers
dramatically for a given immediate value size, it will break. - Second choice is to stick to a particular register, choosing the one with the less side-effect, and encoding the instruction ourselves. I start to think that this second solution might be safer, even though we wouldn't l

Re: [2.6 patch] x86: add instrumentation menu

2007-10-21 Thread Mathieu Desnoyers
g, without fixing the x86 architecture. This patch seems good. Acked-by: Mathieu Desnoyers <[EMAIL PROTECTED]> > --- > > arch/i386/Kconfig |2 ++ > arch/x86/oprofile/Kconfig | 17 - > arch/x86_64/Kconfig |2 ++ > 3

Re: [patch 4/7] Immediate Values - i386 Optimization

2007-10-22 Thread Mathieu Desnoyers
* H. Peter Anvin ([EMAIL PROTECTED]) wrote: > Mathieu Desnoyers wrote: > > > >I have tried generating asm-to-"register" c variables for char, short > >and int on i386 and I do not see this happening. The char opcode is > >always 1 byte, short 2 bytes and int

Re: [RFC/git patch] move samples/ to Documentation/markers/

2007-10-24 Thread Mathieu Desnoyers
Move markers samples and docs to Documentation/markers/ > > diff --git a/Documentation/markers.txt b/Documentation/markers.txt > deleted file mode 100644 > index 295a71b..000 > --- a/Documentation/markers.txt > +++ /dev/null > @@ -1,81 +0,0 @@ > - Using the

[RFC] create instrumentation/ directory

2007-10-24 Thread Mathieu Desnoyers
lso move the kprobes and marker samples under instrumentation/samples/ My main concern is that 15 characters long directory name might be inelegant (however, it only beats Documentation by 2). Mathieu -- Mathieu Desnoyers Computer Engineering Ph.D. Student, Ecole Polytechnique de Montreal OpenP

Re: [patch 1/4] Linux Kernel Markers - Architecture Independent Code

2007-10-25 Thread Mathieu Desnoyers
onding to the markers data structures quite easily. I would rather prefer not to implement superfluous built-time data extraction in the kernel build system just to make userspace simpler. If we can leverage what currently exists, that would be better. Mathieu > > Thanks, > Roland --

Re: 2.6.23-mm1 thread exit_group issue

2007-10-13 Thread Mathieu Desnoyers
* Oleg Nesterov ([EMAIL PROTECTED]) wrote: > On 10/12, Andrew Morton wrote: > > > > On Fri, 12 Oct 2007 15:47:59 -0400 > > Mathieu Desnoyers <[EMAIL PROTECTED]> wrote: > > > > > Hi Andrew, > > > > > > I noticed a regression between 2.

Re: [patch 1/4] Linux Kernel Markers - Architecture Independent Code

2007-10-15 Thread Mathieu Desnoyers
"__markers_strings"); > > and the "markersstringsindex" variable is never used. > Considering that I want to minimize the impact on the system, I put the marker strings in their own memory location rather than clobbering the me

[to-be-posted-soon] Multiple handlers per marker

2007-11-04 Thread Mathieu Desnoyers
* Mathieu Desnoyers ([EMAIL PROTECTED]) wrote: > * Mathieu Desnoyers ([EMAIL PROTECTED]) wrote: > > * Mike Mason ([EMAIL PROTECTED]) wrote: > > > Hi Mathieu, > > > > > > Are you aware of any working being done to allow multiple handlers to be > > &g

Re: [to-be-posted-soon] Multiple handlers per marker

2007-11-05 Thread Mathieu Desnoyers
* Mike Mason ([EMAIL PROTECTED]) wrote: > Mathieu Desnoyers wrote: >> * Mathieu Desnoyers ([EMAIL PROTECTED]) wrote: >>> * Mathieu Desnoyers ([EMAIL PROTECTED]) wrote: >>>> * Mike Mason ([EMAIL PROTECTED]) wrote: >>>>> Hi Mathieu, >>>>

[patch 0/4] Move Instrumentation Support menu to arch/Kconfig

2007-11-06 Thread Mathieu Desnoyers
architecture basis with a Kconfig boolean. I moved the architecture independent instrumentation items to init/Kconfig. Mathieu -- Mathieu Desnoyers Computer Engineering Ph.D. Student, Ecole Polytechnique de Montreal OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F BA06 3F25 A8FE 3BAE 9A68 - To

[patch 3/4] Add ARCH_SUPPORTS_KPROBES

2007-11-06 Thread Mathieu Desnoyers
ou to just use config ARCH_SUPPORTS_KPROBES def_bool y instead, which is a bit denser. We seem to use both kinds of syntax for these things, but this is really what "def_bool" is there for... Signed-off-by: Mathieu Desnoyers <[EMAIL PROTECTED]> CC: Linus

[patch 4/4] Move Kconfig.instrumentation to arch/Kconfig and init/Kconfig

2007-11-06 Thread Mathieu Desnoyers
;. Delete the kernel/Kconfig.instrumentation file. Signed-off-by: Mathieu Desnoyers <[EMAIL PROTECTED]> CC: Linus Torvalds <[EMAIL PROTECTED]> CC: Sam Ravnborg <[EMAIL PROTECTED]> --- arch/Kconfig | 22 ++ arch/alpha/Kconfig |2 -

[patch 2/4] Add ARCH_SUPPORTS_OPROFILE

2007-11-06 Thread Mathieu Desnoyers
ou to just use config ARCH_SUPPORTS_KPROBES def_bool y instead, which is a bit denser. We seem to use both kinds of syntax for these things, but this is really what "def_bool" is there for... Signed-off-by: Mathieu Desnoyers <[EMAIL PROTECTED]> CC: Linus

[patch 1/4] Create arch/Kconfig

2007-11-06 Thread Mathieu Desnoyers
yway equal for all ARCHs. But it should be kept clean - so if we introduce such a file then we should use ARCH_HAS_whatever in the arch specific Kconfig files to enable stuff that is not shared. Signed-off-by: Mathieu Desnoyers <[EMAIL PROTECTED]> CC: Linus Torvalds <[EMAIL PROTECTED]>

Re: [patch 0/4] Add ARCH_SUPPORTS_KPROBES (take 2)

2007-11-06 Thread Mathieu Desnoyers
* Haavard Skinnemoen ([EMAIL PROTECTED]) wrote: > On Tue, 30 Oct 2007 21:03:45 -0400 > Mathieu Desnoyers <[EMAIL PROTECTED]> wrote: > > > take 2, using def_bool this time. > > Currently, avr32 doesn't include kernel/Kconfig.instrumentation, but > defines

Re: [to-be-posted-soon] Multiple handlers per marker

2007-11-07 Thread Mathieu Desnoyers
* Mike Mason ([EMAIL PROTECTED]) wrote: > Mathieu Desnoyers wrote: >> * Mike Mason ([EMAIL PROTECTED]) wrote: >>> Mathieu Desnoyers wrote: >>>> * Mathieu Desnoyers ([EMAIL PROTECTED]) wrote: >>>>> * Mathieu Desnoyers ([EMAIL PROTECTED]) wrote:

Re: 2.6.23.1 NULL pointer dereference in NFS

2007-11-07 Thread Mathieu Desnoyers
* Trond Myklebust ([EMAIL PROTECTED]) wrote: > > On Tue, 2007-11-06 at 15:48 -0500, Mathieu Desnoyers wrote: > > Hi, > > > > I just ran through this OOPS when I was doing a dpkg dist-upgrade on my > > Pentium III. Any idea what could have caused this ? > >

Re: 2.6.23.1 NULL pointer dereference in NFS

2007-11-07 Thread Mathieu Desnoyers
* Mathieu Desnoyers ([EMAIL PROTECTED]) wrote: > * Trond Myklebust ([EMAIL PROTECTED]) wrote: > > > > On Tue, 2007-11-06 at 15:48 -0500, Mathieu Desnoyers wrote: > > > Hi, > > > > > > I just ran through this OOPS when I was doing a dpkg dist-upgrade on

[PATCH] Move Kconfig.instrumentation to arch/Kconfig and init/Kconfig fix

2007-11-07 Thread Mathieu Desnoyers
0 -0400 > +++ linux-2.6-lttng/init/Kconfig 2007-11-02 13:16:55.0 -0400 > @@ -644,6 +644,20 @@ config SLOB > +source "ltt/Kconfig" This one seems to be new, and I can't seem to find ltt/Kconfig anywhere. Wouldn't it be better to move it to a separate

Re: [PATCH] markers: modpost

2007-11-08 Thread Mathieu Desnoyers
* David Smith ([EMAIL PROTECTED]) wrote: > Mathieu Desnoyers wrote: > > * Roland McGrath ([EMAIL PROTECTED]) wrote: > >>> If we want to do it safely, I think we should iterate from > >>> __start___markers to __stop___markers symbols of vmlinux and get the > &g

Re: [PATCH 0/4 update] Linux Kernel Markers - i386 : pIII erratum 49 : XMC

2007-01-16 Thread Mathieu Desnoyers
Hi Richard, * Mathieu Desnoyers ([EMAIL PROTECTED]) wrote: > > You've got the same optimizations for x86 by modifying an instruction's > > immediate operand and thus avoiding a d-cache hit. The only real caveat is > > the need to avoid the unsynchronised cross

[PATCH 1/2] lockdep missing barrier()

2007-01-16 Thread Mathieu Desnoyers
This patch adds a barrier() to lockdep.c lockdep_recursion updates. This variable behaves like the preemption count and should therefore use similar memory barriers. This patch applies on 2.6.20-rc4-git3. Signed-off-by: Mathieu Desnoyers <[EMAIL PROTECTED]> --- a/kernel/lockdep.c +++ b/

[PATCH 2/2] lockdep reentrancy

2007-01-16 Thread Mathieu Desnoyers
Here is a patch to lockdep.c so it behaves correctly when a kprobe breakpoint is put on a marker within hardirq tracing functions as long as the marker is within the lockdep_recursion incremented boundaries. It should apply on 2.6.20-rc4-git3. Mathieu Signed-off-by: Mathieu Desnoyers <[EM

Re: [PATCH 0/4 update] kprobes and traps

2007-01-16 Thread Mathieu Desnoyers
execution. Would it be possible to put these data structures on the stack or on a separate stack accessible through thread_info instead ? Mathieu * Mathieu Desnoyers ([EMAIL PROTECTED]) wrote: > Hi Richard, > > * Mathieu Desnoyers ([EMAIL PROTECTED]) wrote: > > > Y

Re: [PATCH 1/2] lockdep missing barrier()

2007-01-24 Thread Mathieu Desnoyers
* Andrew Morton ([EMAIL PROTECTED]) wrote: > On Tue, 16 Jan 2007 12:56:24 -0500 > Mathieu Desnoyers <[EMAIL PROTECTED]> wrote: > > > This patch adds a barrier() to lockdep.c lockdep_recursion updates. This > > variable behaves like the preemption count and should there

Re: [PATCH 2/2] lockdep reentrancy

2007-01-24 Thread Mathieu Desnoyers
Hi Andrew, * Andrew Morton ([EMAIL PROTECTED]) wrote: > On Tue, 16 Jan 2007 12:56:31 -0500 > Mathieu Desnoyers <[EMAIL PROTECTED]> wrote: > > > Here is a patch to lockdep.c so it behaves correctly when a kprobe > > breakpoint is > > put on a marker within har

Re: [PATCH 7/10] local_t : powerpc

2007-01-24 Thread Mathieu Desnoyers
* Paul Mackerras ([EMAIL PROTECTED]) wrote: > Mathieu Desnoyers writes: > > > +static __inline__ int local_dec_if_positive(local_t *l) > > +{ > > + int t; > > + > > + __asm__ __volatile__( > > +"1:lwarx %0,0,%1 # loca

[PATCH] order of lockdep off/on in vprintk() should be changed

2007-01-24 Thread Mathieu Desnoyers
om the mark_lock() error handing path. We should change the locking so it becomes correct : preempt_disable() lockdep_off() local_irq_save() spin_lock(&logbuf_lock) spin_unlock(&logbuf_lock) if(!down_trylock(&console_sem)) up(&console_sem) local_irq_restore() lockdep_on() preempt_e

Re: [PATCH] minimize lockdep_on/off side-effect

2007-01-24 Thread Mathieu Desnoyers
Minimize lockdep_on/off side-effect on irq tracing in vprintk by using raw_local_irq_save/restore _around_ lockdep_off/on(). It applies on the previous patch. It has the advantage of not losing the IRQ events coming between the lockdep disabling and the irq disabling. Signed-off-by: Mathieu

[PATCH 00/09] atomic.h : standardizing atomic primitives

2007-01-25 Thread Mathieu Desnoyers
apply on 2.6.20-rc5-git4. Signed-off-by : Mathieu Desnoyers <[EMAIL PROTECTED]> - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read

[PATCH 04/09] atomic.h : Add atomic64 cmpxchg, xchg and add_unless to ia64

2007-01-25 Thread Mathieu Desnoyers
atomic.h : Add atomic64 cmpxchg, xchg and add_unless to ia64 Signed-off-by: Mathieu Desnoyers <[EMAIL PROTECTED]> --- a/include/asm-ia64/atomic.h +++ b/include/asm-ia64/atomic.h @@ -88,12 +88,17 @@ ia64_atomic64_sub (__s64 i, atomic64_t *v) return new; } -#define atomic_cmpxchg(

[PATCH 03/10] local_t : i386 extension

2007-01-25 Thread Mathieu Desnoyers
local_t : i386 extension Signed-off-by: Mathieu Desnoyers <[EMAIL PROTECTED]> --- a/include/asm-i386/local.h +++ b/include/asm-i386/local.h @@ -2,47 +2,198 @@ #define _ARCH_I386_LOCAL_H #include +#include +#include typedef struct { - volatile long counter; + atomic_lo

[PATCH 00/10] local_t : adding and standardising local atomic primitives

2007-01-25 Thread Mathieu Desnoyers
ned-off-by : Mathieu Desnoyers <[EMAIL PROTECTED]> - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

[PATCH 02/09] atomic.h : Complete atomic_long operations in asm-generic

2007-01-25 Thread Mathieu Desnoyers
atomic.h : Complete atomic_long operations in asm-generic Signed-off-by: Mathieu Desnoyers <[EMAIL PROTECTED]> --- a/include/asm-generic/atomic.h +++ b/include/asm-generic/atomic.h @@ -66,6 +66,90 @@ static inline void atomic_long_sub(long i, atomic_long_t *l) atomic64_su

[PATCH 06/09] atomic.h : Add atomic64 cmpxchg, xchg and add_unless to parisc

2007-01-25 Thread Mathieu Desnoyers
atomic.h : Add atomic64 cmpxchg, xchg and add_unless to parisc Signed-off-by: Mathieu Desnoyers <[EMAIL PROTECTED]> --- a/include/asm-parisc/atomic.h +++ b/include/asm-parisc/atomic.h @@ -163,7 +163,8 @@ static __inline__ int atomic_read(const atomic_t *v) } /* exported interface */ -#

[PATCH 05/10] local_t : mips extension

2007-01-25 Thread Mathieu Desnoyers
local_t : mips extension Signed-off-by: Mathieu Desnoyers <[EMAIL PROTECTED]> --- a/include/asm-mips/local.h +++ b/include/asm-mips/local.h @@ -1,60 +1,524 @@ -#ifndef _ASM_LOCAL_H -#define _ASM_LOCAL_H +#ifndef _ARCH_POWERPC_LOCAL_H +#define _ARCH_POWERPC_LOCAL_H #include #i

[PATCH 07/10] local_t : powerpc extension

2007-01-25 Thread Mathieu Desnoyers
local_t : powerpc extension Signed-off-by: Mathieu Desnoyers <[EMAIL PROTECTED]> --- a/include/asm-powerpc/local.h +++ b/include/asm-powerpc/local.h @@ -1 +1,342 @@ -#include +#ifndef _ARCH_POWERPC_LOCAL_H +#define _ARCH_POWERPC_LOCAL_H + +#include +#include + +typedef

[PATCH 05/09] atomic.h : Add atomic64 cmpxchg, xchg and add_unless to mips

2007-01-25 Thread Mathieu Desnoyers
atomic.h : Add atomic64 cmpxchg, xchg and add_unless to mips Signed-off-by: Mathieu Desnoyers <[EMAIL PROTECTED]> --- a/include/asm-mips/atomic.h +++ b/include/asm-mips/atomic.h @@ -291,8 +291,9 @@ static __inline__ int atomic_sub_if_positive(int i, atomic_t * v) return

[PATCH 01/10] local_t : architecture independant extension

2007-01-25 Thread Mathieu Desnoyers
local_t : architecture independant extension Signed-off-by: Mathieu Desnoyers <[EMAIL PROTECTED]> --- a/include/asm-generic/local.h +++ b/include/asm-generic/local.h @@ -33,6 +33,19 @@ typedef struct #define local_add(i,l) atomic_long_add((i),(&(l)->a)) #define local_sub(i,l) atomi

[PATCH 01/09] atomic.h : Add atomic64 cmpxchg, xchg and add_unless to alpha

2007-01-25 Thread Mathieu Desnoyers
atomic.h : Add atomic64 cmpxchg, xchg and add_unless to alpha Signed-off-by: Mathieu Desnoyers <[EMAIL PROTECTED]> --- a/include/asm-alpha/atomic.h +++ b/include/asm-alpha/atomic.h @@ -175,19 +175,64 @@ static __inline__ long atomic64_sub_return(long i, atomic64_t * v) return

[PATCH 06/10] local_t : parisc cleanup

2007-01-25 Thread Mathieu Desnoyers
local_t : parisc cleanup parisc architecture local_t cleanup : use asm-generic/local.h. Signed-off-by: Mathieu Desnoyers <[EMAIL PROTECTED]> --- a/include/asm-parisc/local.h +++ b/include/asm-parisc/local.h @@ -1,40 +1 @@ -#ifndef _ARCH_PARISC_LOCAL_H -#define _ARCH_PARISC_LOCAL_H - -#i

[PATCH 10/10] local_t : x86_64 extension

2007-01-25 Thread Mathieu Desnoyers
local_t : x86_64 extension Signed-off-by: Mathieu Desnoyers <[EMAIL PROTECTED]> --- a/include/asm-x86_64/local.h +++ b/include/asm-x86_64/local.h @@ -2,49 +2,183 @@ #define _ARCH_X8664_LOCAL_H #include +#include typedef struct { - volatile long counter; + atomic_lo

[PATCH 09/09] atomic.h : Add atomic64 cmpxchg, xchg and add_unless to x86_64

2007-01-25 Thread Mathieu Desnoyers
atomic.h : Add atomic64 cmpxchg, xchg and add_unless to x86_64 Signed-off-by: Mathieu Desnoyers <[EMAIL PROTECTED]> --- a/include/asm-x86_64/atomic.h +++ b/include/asm-x86_64/atomic.h @@ -375,8 +375,8 @@ static __inline__ long atomic64_add_return(long i, atomic64_t *v) long _

[PATCH 04/10] local_t : ia64 extension

2007-01-25 Thread Mathieu Desnoyers
local_t : ia64 extension Signed-off-by: Mathieu Desnoyers <[EMAIL PROTECTED]> --- a/include/asm-ia64/local.h +++ b/include/asm-ia64/local.h @@ -1,50 +1 @@ -#ifndef _ASM_IA64_LOCAL_H -#define _ASM_IA64_LOCAL_H - -/* - * Copyright (C) 2003 Hewlett-Packard Co - * David Mosberger-Tang &

[PATCH 07/09] atomic.h : Add atomic64 cmpxchg, xchg and add_unless to powerpc

2007-01-25 Thread Mathieu Desnoyers
atomic.h : Add atomic64 cmpxchg, xchg and add_unless to powerpc Signed-off-by: Mathieu Desnoyers <[EMAIL PROTECTED]> --- a/include/asm-powerpc/atomic.h +++ b/include/asm-powerpc/atomic.h @@ -165,7 +165,8 @@ static __inline__ int atomic_dec_return(atomic_t *v) return t; } -#

[PATCH 08/10] local_t : s390 cleanup

2007-01-25 Thread Mathieu Desnoyers
local_t : s390 cleanup s390 architecture local_t cleanup : use asm-generic/local.h. Signed-off-by: Mathieu Desnoyers <[EMAIL PROTECTED]> --- a/include/asm-s390/local.h +++ b/include/asm-s390/local.h @@ -1,58 +1 @@ -#ifndef _ASM_LOCAL_H -#define _ASM_LOCAL_H - -#include -#include - -#

[PATCH 08/09] atomic.h : Add atomic64 cmpxchg, xchg and add_unless to sparc64

2007-01-25 Thread Mathieu Desnoyers
atomic.h : Add atomic64 cmpxchg, xchg and add_unless to sparc64 Signed-off-by: Mathieu Desnoyers <[EMAIL PROTECTED]> --- a/include/asm-sparc64/atomic.h +++ b/include/asm-sparc64/atomic.h @@ -70,12 +70,13 @@ extern int atomic64_sub_ret(int, atomic64_t *); #define atomic_add_negativ

[PATCH 02/10] local_t : alpha extension

2007-01-25 Thread Mathieu Desnoyers
local_t : alpha extension Signed-off-by: Mathieu Desnoyers <[EMAIL PROTECTED]> --- a/include/asm-alpha/local.h +++ b/include/asm-alpha/local.h @@ -4,37 +4,115 @@ #include #include -typedef atomic64_t local_t; +typedef struct +{ + atomic_long_t a; +} local_t; -#define LOCAL_

[PATCH 03/09] atomic.h : i386 type safety fix

2007-01-25 Thread Mathieu Desnoyers
h happened at least for x86_64), it would simply accept passing an atomic64_t value as parameter to cmpxchg, xchg and add_unless, having 64 bits inputs casted to 32 bits. Signed-off-by: Mathieu Desnoyers <[EMAIL PROTECTED]> --- a/include/asm-i386/atomic.h +++ b/include/asm-i386/atomic.h

[PATCH 09/10] local_t : sparc64 cleanup

2007-01-25 Thread Mathieu Desnoyers
local_t : sparc64 cleanup sparc64 local_t cleanup : simply use asm-generic/local.h. Signed-off-by: Mathieu Desnoyers <[EMAIL PROTECTED]> --- a/include/asm-sparc64/local.h +++ b/include/asm-sparc64/local.h @@ -1,40 +1 @@ -#ifndef _ARCH_SPARC64_LOCAL_H -#define _ARCH_SPARC64_LOCAL_H - -#i

[PATCH 1/4] Linux Kernel Markers : Architecture agnostic code.

2006-12-20 Thread Mathieu Desnoyers
Linux Kernel Markers, architecture independant code. This patch also includes non-optimized default behavior from asm-generic in each architecture where the optimised support is not implemented. Signed-off-by: Mathieu Desnoyers <[EMAIL PROTECTED]> --- a/include/asm-generic/vmlinux.lds.h

[PATCH 2/4] Linux Kernel Markers : kconfig menus

2006-12-20 Thread Mathieu Desnoyers
Linux Kernel Markers : kconfig menus Signed-off-by: Mathieu Desnoyers <[EMAIL PROTECTED]> --- a/Makefile +++ b/Makefile @@ -308,7 +308,8 @@ # Use LINUXINCLUDE when you must referen # Needed to be compatible with the O= option LINUXINCLUDE:= -Iinclude \ $(if $(KBUI

[PATCH 3/4] Linux Kernel Markers : i386 optimisation

2006-12-20 Thread Mathieu Desnoyers
This is the i386 optimisation for the Linux Kernel Markers. Signed-off-by: Mathieu Desnoyers <[EMAIL PROTECTED]> --- /dev/null +++ b/include/asm-i386/marker.h @@ -0,0 +1,54 @@ +/* + * marker.h + * + * Code markup for dynamic and static tracing. i386 architecture optimisations. + *

[PATCH 4/4] Linux Kernel Markers : powerpc optimisation

2006-12-20 Thread Mathieu Desnoyers
This is the powerpc Linux Kernel Markers optimised version. Signed-off-by: Mathieu Desnoyers <[EMAIL PROTECTED]> --- /dev/null +++ b/include/asm-powerpc/marker.h @@ -0,0 +1,58 @@ +/* + * marker.h + * + * Code markup for dynamic and static tracing. PowerPC architecture + * optimis

[PATCH 0/9] atomic.h : standardising atomic primitives

2006-12-20 Thread Mathieu Desnoyers
: Mathieu Desnoyers <[EMAIL PROTECTED]> OpenPGP public key: http://krystal.dyndns.org:8080/key/compudj.gpg Key fingerprint: 8CD5 52C3 8E3C 4140 715F BA06 3F25 A8FE 3BAE 9A68 - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a m

[PATCH 1/9] atomic.h : alpha architecture

2006-12-20 Thread Mathieu Desnoyers
This patch adds atomic64_cmpxchg, atomic64_xchg and atomic64_add_unless to alpha. Signed-off-by: Mathieu Desnoyers <[EMAIL PROTECTED]> --- a/include/asm-alpha/atomic.h +++ b/include/asm-alpha/atomic.h @@ -175,19 +175,64 @@ static __inline__ long atomic64_sub_retu return

[PATCH 2/9] atomic.h : generic atomic_long

2006-12-20 Thread Mathieu Desnoyers
This patch completes the atomic_long operations in asm-generic. Signed-off-by: Mathieu Desnoyers <[EMAIL PROTECTED]> --- a/include/asm-generic/atomic.h +++ b/include/asm-generic/atomic.h @@ -66,6 +66,90 @@ static inline void atomic_long_sub(long atomic64_sub(i, v); } +static

[PATCH 3/9] atomic.h : i386 "64 bits" ready fix.

2006-12-20 Thread Mathieu Desnoyers
s safer to put this kind of automatic typing instead of using an integer. Signed-off-by: Mathieu Desnoyers <[EMAIL PROTECTED]> --- a/include/asm-i386/atomic.h +++ b/include/asm-i386/atomic.h @@ -207,8 +207,9 @@ static __inline__ int atomic_sub_return( return atomic_add_return(-i,v

[PATCH 4/9] atomic.h : ia64

2006-12-20 Thread Mathieu Desnoyers
64 bits cmpxchg, xchg and add_unless for ia64. Signed-off-by: Mathieu Desnoyers <[EMAIL PROTECTED]> --- a/include/asm-ia64/atomic.h +++ b/include/asm-ia64/atomic.h @@ -88,12 +88,17 @@ ia64_atomic64_sub (__s64 i, atomic64_t * return new; } -#define atomic_cmpxchg(v, old, new)

[PATCH 5/9] atomic.h : standardising atomic primitives

2006-12-20 Thread Mathieu Desnoyers
64 bits cmpxchg, xchg and add_unless for MIPS. Signed-off-by: Mathieu Desnoyers <[EMAIL PROTECTED]> --- a/include/asm-mips/atomic.h +++ b/include/asm-mips/atomic.h @@ -291,8 +291,9 @@ static __inline__ int atomic_sub_if_posi return result; } -#define atomic_cmpxchg(v, o, n)

[PATCH 6/9] atomic.h : parisc

2006-12-20 Thread Mathieu Desnoyers
64 bits cmpxchg, xchg, add_unless operations for parisc. Signed-off-by: Mathieu Desnoyers <[EMAIL PROTECTED]> --- a/include/asm-parisc/atomic.h +++ b/include/asm-parisc/atomic.h @@ -163,7 +163,8 @@ static __inline__ int atomic_read(const } /* exported interface */ -#define atomic_cmp

[PATCH 7/9] atomic.h : powerpc

2006-12-20 Thread Mathieu Desnoyers
64 bits cmpxchg, xchg and add_unless for powerpc. Signed-off-by: Mathieu Desnoyers <[EMAIL PROTECTED]> --- a/include/asm-powerpc/atomic.h +++ b/include/asm-powerpc/atomic.h @@ -165,7 +165,8 @@ static __inline__ int atomic_dec_return( return t; } -#define atomic_cmpxchg(v, o, n)

[PATCH 8/9] atomic.h : sparc

2006-12-20 Thread Mathieu Desnoyers
64 bits cmpxchg, xchg and add_unless for sparc. Signed-off-by: Mathieu Desnoyers <[EMAIL PROTECTED]> --- a/include/asm-sparc64/atomic.h +++ b/include/asm-sparc64/atomic.h @@ -70,12 +70,13 @@ #define atomic64_dec(v) atomic64_sub(1, #define atomic_add_negative(i, v) (atomic_add_ret(i,

[PATCH 9/9] atomic.h : x86_64

2006-12-20 Thread Mathieu Desnoyers
64 bits cmpxchg, xchg and add_less for x86_64. Signed-off-by: Mathieu Desnoyers <[EMAIL PROTECTED]> --- a/include/asm-x86_64/atomic.h +++ b/include/asm-x86_64/atomic.h @@ -388,7 +388,12 @@ static __inline__ long atomic64_sub_retu #define atomic64_inc_return(v) (atomic64_add_retu

[PATCH 0/10] local_t : adding and standardising atomic primitives

2006-12-20 Thread Mathieu Desnoyers
LOCking), local.h simply includes asm-generic/local.h, which removes duplicated code. These patches applies on 2.6.20-rc1-git7. It depends on the patch "atomic.h : standardising atomic primitives" Signed-off-by : Mathieu Desnoyers <[EMAIL PROTECTED]> OpenPGP public key:

[PATCH 1/10] local_t : architecture agnostic

2006-12-20 Thread Mathieu Desnoyers
This is the architecture agnostic local_t extension. Signed-off-by: Mathieu Desnoyers <[EMAIL PROTECTED]> --- a/include/asm-generic/local.h +++ b/include/asm-generic/local.h @@ -33,6 +33,19 @@ #define local_dec(l) atomic_long_dec(&(l #define local_add(i,l) atomic_long_add((i

[PATCH 2/10] local_t : alpha

2006-12-20 Thread Mathieu Desnoyers
Alpha architecture local_t extension. Signed-off-by: Mathieu Desnoyers <[EMAIL PROTECTED]> --- a/include/asm-alpha/system.h +++ b/include/asm-alpha/system.h @@ -443,6 +443,111 @@ #define xchg(ptr,x) \ (__typeof__(*(ptr)))

[PATCH 3/10] local_t : i386

2006-12-20 Thread Mathieu Desnoyers
i386 architecture local_t extension. Signed-off-by: Mathieu Desnoyers <[EMAIL PROTECTED]> --- a/include/asm-i386/system.h +++ b/include/asm-i386/system.h @@ -274,6 +274,9 @@ #define cmpxchg(ptr,o,n)\ #define sync_cmpxchg(ptr,o,n)\ ((__typeof__(*(ptr)))__sync_cmpxchg((ptr),(unsigne

[PATCH 4/10] local_t : ia64

2006-12-20 Thread Mathieu Desnoyers
ia64 architecture local_t cleanup : use asm-generic/local.h. Signed-off-by: Mathieu Desnoyers <[EMAIL PROTECTED]> --- a/include/asm-ia64/local.h +++ b/include/asm-ia64/local.h @@ -1,50 +1 @@ -#ifndef _ASM_IA64_LOCAL_H -#define _ASM_IA64_LOCAL_H - -/* - * Copyright (C) 2003 Hewlett-Pack

[PATCH 5/10] local_t : ia64

2006-12-20 Thread Mathieu Desnoyers
ia64 architecture local_t extension. Signed-off-by: Mathieu Desnoyers <[EMAIL PROTECTED]> --- a/include/asm-mips/system.h +++ b/include/asm-mips/system.h @@ -253,6 +253,58 @@ static inline unsigned long __cmpxchg_u3 return retval; } +static inline unsigned long __cmpxchg_u32

[PATCH 6/10] local_t : parisc

2006-12-20 Thread Mathieu Desnoyers
parisc architecture local_t cleanup : use asm-generic/local.h. Signed-off-by: Mathieu Desnoyers <[EMAIL PROTECTED]> --- a/include/asm-parisc/local.h +++ b/include/asm-parisc/local.h @@ -1,40 +1 @@ -#ifndef _ARCH_PARISC_LOCAL_H -#define _ARCH_PARISC_LOCAL_H - -#include -#include - -t

[PATCH 7/10] local_t : powerpc

2006-12-20 Thread Mathieu Desnoyers
PowerPC local_t extension. Signed-off-by: Mathieu Desnoyers <[EMAIL PROTECTED]> --- a/include/asm-powerpc/system.h +++ b/include/asm-powerpc/system.h @@ -226,6 +226,29 @@ __xchg_u32(volatile void *p, unsigned lo return prev; } +/* + * Atomic exchange + * + * Changes the

[PATCH 8/10] local_t : s390

2006-12-20 Thread Mathieu Desnoyers
s390 architecture local_t cleanup : use asm-generic/local.h. Signed-off-by: Mathieu Desnoyers <[EMAIL PROTECTED]> --- a/include/asm-s390/local.h +++ b/include/asm-s390/local.h @@ -1,58 +1 @@ -#ifndef _ASM_LOCAL_H -#define _ASM_LOCAL_H - -#include -#include - -#ifndef __s390x__ - -t

[PATCH 9/10] local_t : sparc64

2006-12-20 Thread Mathieu Desnoyers
sparc64 local_t cleanup : simply use asm-generic/local.h. Signed-off-by: Mathieu Desnoyers <[EMAIL PROTECTED]> --- a/include/asm-sparc64/local.h +++ b/include/asm-sparc64/local.h @@ -1,40 +1 @@ -#ifndef _ARCH_SPARC64_LOCAL_H -#define _ARCH_SPARC64_LOCAL_H - -#include -#include - -t

[PATCH 10/10] local_t : x86_64

2006-12-20 Thread Mathieu Desnoyers
x86_64 architecture local_t extension. Signed-off-by: Mathieu Desnoyers <[EMAIL PROTECTED]> --- a/include/asm-x86_64/system.h +++ b/include/asm-x86_64/system.h @@ -209,9 +209,45 @@ static inline unsigned long __cmpxchg(vo return old; } +static inline unsigned long __cmpxchg

[PATCH] Relay CPU Hotplug support

2006-12-20 Thread Mathieu Desnoyers
Hi, Here is a patch, result of the combined work of Tom Zanussi and myself, to add CPU hotplug support to Relay. This patch applies on 2.6.20-rc1-git7. Signed-off-by : Mathieu Desnoyers <[EMAIL PROTECTED]> --- a/include/linux/relay.h +++ b/include/linux/relay.h @@ -24,7 +24,7 @@ #

[PATCH 0/4] Linux Kernel Markers

2006-12-20 Thread Mathieu Desnoyers
-off-by : Mathieu Desnoyers <[EMAIL PROTECTED]> OpenPGP public key: http://krystal.dyndns.org:8080/key/compudj.gpg Key fingerprint: 8CD5 52C3 8E3C 4140 715F BA06 3F25 A8FE 3BAE 9A68 - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body

Re: [PATCH] Relay CPU Hotplug support

2006-12-20 Thread Mathieu Desnoyers
* Tom Zanussi ([EMAIL PROTECTED]) wrote: > Mathieu Desnoyers writes: > > Hi, > > > > Here is a patch, result of the combined work of Tom Zanussi and myself, to > add > > CPU hotplug support to Relay. > > > > This patch applies on 2.6.20-rc

Re: [PATCH 7/9] atomic.h : powerpc

2006-12-20 Thread Mathieu Desnoyers
* Benjamin Herrenschmidt ([EMAIL PROTECTED]) wrote: > > > + > > +/** > > + * atomic64_add_unless - add unless the number is a given value > > + * @v: pointer of type atomic64_t > > + * @a: the amount to add to v... > > + * @u: ...unless v is equal to u. > > + * > > + * Atomically adds @a to @v, so

Re: [Ltt-dev] [PATCH 7/10] local_t : powerpc

2006-12-20 Thread Mathieu Desnoyers
* Mathieu Desnoyers ([EMAIL PROTECTED]) wrote: > --- a/include/asm-powerpc/local.h > +++ b/include/asm-powerpc/local.h > +/** > + * local_add_unless - add unless the number is a given value > + * @l: pointer of type local_t > + * @a: the amount to add to l... > + * @u: ...u

Re: [Ltt-dev] [PATCH 5/10] local_t : MIPS

2006-12-21 Thread Mathieu Desnoyers
Sorry, I meant MIPS. * Mathieu Desnoyers ([EMAIL PROTECTED]) wrote: > ia64 architecture local_t extension. > > Signed-off-by: Mathieu Desnoyers <[EMAIL PROTECTED]> > > --- a/include/asm-mips/system.h > +++ b/include/asm-mips/system.h > @@ -253,6 +253,58 @@

[PATCH] atomic.h : x86_64 atomic64_add_return

2006-12-21 Thread Mathieu Desnoyers
read. Signed-off-by: Mathieu Desnoyers <[EMAIL PROTECTED]> diff --git a/include/asm-x86_64/atomic.h b/include/asm-x86_64/atomic.h index e9922ae..3e9f838 100644 --- a/include/asm-x86_64/atomic.h +++ b/include/asm-x86_64/atomic.h @@ -375,8 +375,8 @@ static __inline__ long atomic64_add

Re: [Ltt-dev] [PATCH 3/10] local_t : i386, local_add_return fix

2006-12-21 Thread Mathieu Desnoyers
local_add_return fix for non volatile local_t on i386. local_add_return should act like the new atomic_add_return considering the removal of volatile from atomic_t. Signed-off-by: Mathieu Desnoyers <[EMAIL PROTECTED]> --- a/include/asm-i386/local.h +++ b/include/asm-i386/local.h @@

Re: [Ltt-dev] [PATCH 10/10] local_t : x86_64 : local_add_return

2006-12-21 Thread Mathieu Desnoyers
local_add_return should also deal with the removed volatile from local_t. Inspired from atomic_t modifications : it must use the local_t both as input and output. Signed-off-by: Mathieu Desnoyers <[EMAIL PROTECTED]> --- a/include/asm-x86_64/local.h +++ b/include/asm-x86_64/local.h @@

Re: [PATCH 05/05] Linux Kernel Markers, non optimized architectures

2007-02-21 Thread Mathieu Desnoyers
* Karim Yaghmour ([EMAIL PROTECTED]) wrote: > - KRYPTIVA PACKAGED MESSAGE - > PACKAGING TYPE: SIGNED > > Hello Mathieu, > > Mathieu Desnoyers wrote: > > Yes, that was indeed the first way I implemented it, as a "disable" > option. One of the main

[PATCH] Linux Kernel Markers - cleanup

2007-02-21 Thread Mathieu Desnoyers
mips mipsel powerpc 405 powerpc 970 s390 sparc (except link error not related to markers) sparc64 x86_64 Signed-off-by: Mathieu Desnoyers <[EMAIL PROTECTED]> --- a/arch/i386/kernel/marker.c +++ b/arch/i386/kernel/marker.c @@ -56,7 +56,7 @@ static struct notifier_block mark_notify = {

[RFC] Fast assurate clock readable from user space and NMI handler

2007-02-24 Thread Mathieu Desnoyers
/* Userspace */ /* Export all this data to user space through the vsyscall page. Use a function * like read_time to read the walltime. This function can be implemented as-is * because it doesn't need to disable preemption. */ -- Mathieu Desnoyers Computer Engineering Ph.D. Candidate, E

Thread flags modified without set_thread_flag() (non atomically)

2007-02-26 Thread Mathieu Desnoyers
Hi, Looking into the thread flags, I found out that some architecture specific kernel functions (in 2.6.20) sets the thread flags with non atomic operation. A good way to list the most trivial : grep -r TIF_ * | grep = Some examples follows. If, for instance, x86_64/kernel/process.c:flush_t

Re: [RFC] Fast assurate clock readable from user space and NMI handler

2007-02-26 Thread Mathieu Desnoyers
* Daniel Walker ([EMAIL PROTECTED]) wrote: > On Sat, 2007-02-24 at 11:19 -0500, Mathieu Desnoyers wrote: > > Hi, > > > > I am trying to improve the Linux kernel time source so it can be read > > without seqlock from NMI handlers. I have also seen some interest for >

Re: [RFC] Fast assurate clock readable from user space and NMI handler

2007-02-26 Thread Mathieu Desnoyers
* Daniel Walker ([EMAIL PROTECTED]) wrote: > On Mon, 2007-02-26 at 15:53 -0500, Mathieu Desnoyers wrote: > > > > > /* On frequency change event */ > > > > /* In irq context */ > > > > void freq_change_cb(unsigned int new_freq) > > > > { > &

Re: [RFC] Fast assurate clock readable from user space and NMI handler

2007-02-26 Thread Mathieu Desnoyers
* Daniel Walker ([EMAIL PROTECTED]) wrote: > On Mon, 2007-02-26 at 17:14 -0500, Mathieu Desnoyers wrote: > > > > For kernel and user space tracing, those small jumps are very annoying : > > it can show, in a trace, that a fork() appears on a CPU after the first > >

Re: [RFC] Fast assurate clock readable from user space and NMI handler

2007-02-26 Thread Mathieu Desnoyers
* Daniel Walker ([EMAIL PROTECTED]) wrote: > On Mon, 2007-02-26 at 22:54 -0500, Mathieu Desnoyers wrote: > > If an NMI nests over the spinlock, we have a deadlock. > > Maybe not completely safe ... > > > In addition, clock->cycle_last is a cycle_t, defined as

Re: [RFC] Fast assurate clock readable from user space and NMI handler

2007-02-26 Thread Mathieu Desnoyers
t clocksource read issue. Another, slower and non NMI safe way to do this would be with a read seqlock and with IRQ disabling. Mathieu -- Mathieu Desnoyers Computer Engineering Ph.D. Student, Ecole Polytechnique de Montreal OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F BA06 3F25 A8FE 3BAE 9A6

Re: [RFC] Fast assurate clock readable from user space and NMI handler

2007-02-27 Thread Mathieu Desnoyers
* Daniel Walker ([EMAIL PROTECTED]) wrote: > On Tue, 2007-02-27 at 02:38 -0500, Mathieu Desnoyers wrote: > > > > > I am concerned about the automatic fallback to the PIT when no other > > clock source is available. A clocksource read would be atomic when TSC > > or

Re: [RFC] Fast assurate clock readable from user space and NMI handler

2007-02-27 Thread Mathieu Desnoyers
* Daniel Walker ([EMAIL PROTECTED]) wrote: > On Tue, 2007-02-27 at 11:02 -0500, Mathieu Desnoyers wrote: > > * Daniel Walker ([EMAIL PROTECTED]) wrote: > > > On Tue, 2007-02-27 at 02:38 -0500, Mathieu Desnoyers wrote: > > > > > > > > > > > I a

<    5   6   7   8   9   10   11   12   13   14   >