Re: [patch 1/8] Immediate Values - Global Modules List and Module Mutex

2007-09-22 Thread Rusty Russell
On Fri, 2007-09-21 at 09:37 -0400, Mathieu Desnoyers wrote: > > Good points. Well I'd say hiding it all behind a friendly > > "immediate_set()" interface is the best option then. > > Then we can't benefit of the __init section to have the code removed > after boot. I don't see the point in doing

Re: [patch 1/8] Immediate Values - Global Modules List and Module Mutex

2007-09-22 Thread Rusty Russell
On Fri, 2007-09-21 at 09:37 -0400, Mathieu Desnoyers wrote: Good points. Well I'd say hiding it all behind a friendly immediate_set() interface is the best option then. Then we can't benefit of the __init section to have the code removed after boot. I don't see the point in doing so.

Re: [patch 1/8] Immediate Values - Global Modules List and Module Mutex

2007-09-21 Thread Mathieu Desnoyers
* Rusty Russell ([EMAIL PROTECTED]) wrote: > On Tue, 2007-09-18 at 09:41 -0400, Mathieu Desnoyers wrote: > > * Rusty Russell ([EMAIL PROTECTED]) wrote: > > > On Fri, 2007-09-14 at 11:32 -0400, Mathieu Desnoyers wrote: > > > > * Rusty Russell ([EMAIL PROTECTED]) wrote: > > > > > Alternatively, if

Re: [patch 1/8] Immediate Values - Global Modules List and Module Mutex

2007-09-21 Thread Mathieu Desnoyers
* Rusty Russell ([EMAIL PROTECTED]) wrote: On Tue, 2007-09-18 at 09:41 -0400, Mathieu Desnoyers wrote: * Rusty Russell ([EMAIL PROTECTED]) wrote: On Fri, 2007-09-14 at 11:32 -0400, Mathieu Desnoyers wrote: * Rusty Russell ([EMAIL PROTECTED]) wrote: Alternatively, if you called it

Re: [patch 1/8] Immediate Values - Global Modules List and Module Mutex

2007-09-20 Thread Rusty Russell
On Tue, 2007-09-18 at 09:41 -0400, Mathieu Desnoyers wrote: > * Rusty Russell ([EMAIL PROTECTED]) wrote: > > On Fri, 2007-09-14 at 11:32 -0400, Mathieu Desnoyers wrote: > > > * Rusty Russell ([EMAIL PROTECTED]) wrote: > > > > Alternatively, if you called it "immediate_init" then the semantics > >

Re: [patch 1/8] Immediate Values - Global Modules List and Module Mutex

2007-09-20 Thread Rusty Russell
On Tue, 2007-09-18 at 09:41 -0400, Mathieu Desnoyers wrote: * Rusty Russell ([EMAIL PROTECTED]) wrote: On Fri, 2007-09-14 at 11:32 -0400, Mathieu Desnoyers wrote: * Rusty Russell ([EMAIL PROTECTED]) wrote: Alternatively, if you called it immediate_init then the semantics change

Re: [patch 1/8] Immediate Values - Global Modules List and Module Mutex

2007-09-18 Thread Mathieu Desnoyers
* Rusty Russell ([EMAIL PROTECTED]) wrote: > On Fri, 2007-09-14 at 11:32 -0400, Mathieu Desnoyers wrote: > > * Rusty Russell ([EMAIL PROTECTED]) wrote: > > > Alternatively, if you called it "immediate_init" then the semantics > > > change slightly, but are more obvious (ie. only use this when the

Re: [patch 1/8] Immediate Values - Global Modules List and Module Mutex

2007-09-18 Thread Mathieu Desnoyers
* Rusty Russell ([EMAIL PROTECTED]) wrote: On Fri, 2007-09-14 at 11:32 -0400, Mathieu Desnoyers wrote: * Rusty Russell ([EMAIL PROTECTED]) wrote: Alternatively, if you called it immediate_init then the semantics change slightly, but are more obvious (ie. only use this when the value

Re: [patch 1/8] Immediate Values - Global Modules List and Module Mutex

2007-09-17 Thread Rusty Russell
On Fri, 2007-09-14 at 11:32 -0400, Mathieu Desnoyers wrote: > * Rusty Russell ([EMAIL PROTECTED]) wrote: > > Alternatively, if you called it "immediate_init" then the semantics > > change slightly, but are more obvious (ie. only use this when the value > > isn't being accessed yet). But it can't

Re: [patch 1/8] Immediate Values - Global Modules List and Module Mutex

2007-09-17 Thread Rusty Russell
On Fri, 2007-09-14 at 11:32 -0400, Mathieu Desnoyers wrote: * Rusty Russell ([EMAIL PROTECTED]) wrote: Alternatively, if you called it immediate_init then the semantics change slightly, but are more obvious (ie. only use this when the value isn't being accessed yet). But it can't be __init

Re: [patch 1/8] Immediate Values - Global Modules List and Module Mutex

2007-09-14 Thread Mathieu Desnoyers
* Rusty Russell ([EMAIL PROTECTED]) wrote: > On Thu, 2007-09-13 at 17:21 -0400, Mathieu Desnoyers wrote: > > * Rusty Russell ([EMAIL PROTECTED]) wrote: > > > Sure, but why is that the caller's problem? immediate_set() isn't > > > fastpath, so why not make it do an "if (early_boot)" internally? >

Re: [patch 1/8] Immediate Values - Global Modules List and Module Mutex

2007-09-14 Thread Mathieu Desnoyers
* Rusty Russell ([EMAIL PROTECTED]) wrote: On Thu, 2007-09-13 at 17:21 -0400, Mathieu Desnoyers wrote: * Rusty Russell ([EMAIL PROTECTED]) wrote: Sure, but why is that the caller's problem? immediate_set() isn't fastpath, so why not make it do an if (early_boot) internally? I see

Re: [patch 1/8] Immediate Values - Global Modules List and Module Mutex

2007-09-13 Thread Rusty Russell
On Thu, 2007-09-13 at 17:21 -0400, Mathieu Desnoyers wrote: > * Rusty Russell ([EMAIL PROTECTED]) wrote: > > Sure, but why is that the caller's problem? immediate_set() isn't > > fastpath, so why not make it do an "if (early_boot)" internally? > > I see two reasons: > 1 - early_boot, or anything

Re: [patch 1/8] Immediate Values - Global Modules List and Module Mutex

2007-09-13 Thread Mathieu Desnoyers
* Rusty Russell ([EMAIL PROTECTED]) wrote: > On Tue, 2007-09-11 at 10:27 -0400, Mathieu Desnoyers wrote: > > * Rusty Russell ([EMAIL PROTECTED]) wrote: > > > On Mon, 2007-09-10 at 20:45 -0400, Mathieu Desnoyers wrote: > > > > Code patching of _live_ SMP code is allowed. This is why I went through

Re: [patch 1/8] Immediate Values - Global Modules List and Module Mutex

2007-09-13 Thread Mathieu Desnoyers
* Rusty Russell ([EMAIL PROTECTED]) wrote: On Tue, 2007-09-11 at 10:27 -0400, Mathieu Desnoyers wrote: * Rusty Russell ([EMAIL PROTECTED]) wrote: On Mon, 2007-09-10 at 20:45 -0400, Mathieu Desnoyers wrote: Code patching of _live_ SMP code is allowed. This is why I went through all

Re: [patch 1/8] Immediate Values - Global Modules List and Module Mutex

2007-09-13 Thread Rusty Russell
On Thu, 2007-09-13 at 17:21 -0400, Mathieu Desnoyers wrote: * Rusty Russell ([EMAIL PROTECTED]) wrote: Sure, but why is that the caller's problem? immediate_set() isn't fastpath, so why not make it do an if (early_boot) internally? I see two reasons: 1 - early_boot, or anything that

Re: [patch 1/8] Immediate Values - Global Modules List and Module Mutex

2007-09-12 Thread Rusty Russell
On Tue, 2007-09-11 at 10:27 -0400, Mathieu Desnoyers wrote: > * Rusty Russell ([EMAIL PROTECTED]) wrote: > > On Mon, 2007-09-10 at 20:45 -0400, Mathieu Desnoyers wrote: > > > Code patching of _live_ SMP code is allowed. This is why I went through > > > all this trouble on i386. > > > > Oh, I was

Re: [patch 1/8] Immediate Values - Global Modules List and Module Mutex

2007-09-12 Thread Rusty Russell
On Tue, 2007-09-11 at 10:27 -0400, Mathieu Desnoyers wrote: * Rusty Russell ([EMAIL PROTECTED]) wrote: On Mon, 2007-09-10 at 20:45 -0400, Mathieu Desnoyers wrote: Code patching of _live_ SMP code is allowed. This is why I went through all this trouble on i386. Oh, I was pretty sure

Re: [patch 1/8] Immediate Values - Global Modules List and Module Mutex

2007-09-11 Thread Mathieu Desnoyers
* Rusty Russell ([EMAIL PROTECTED]) wrote: > On Mon, 2007-09-10 at 20:45 -0400, Mathieu Desnoyers wrote: > > Code patching of _live_ SMP code is allowed. This is why I went through > > all this trouble on i386. > > Oh, I was pretty sure it wasn't. OK. > > So now why three versions of

Re: [patch 1/8] Immediate Values - Global Modules List and Module Mutex

2007-09-11 Thread Mathieu Desnoyers
* Rusty Russell ([EMAIL PROTECTED]) wrote: On Mon, 2007-09-10 at 20:45 -0400, Mathieu Desnoyers wrote: Code patching of _live_ SMP code is allowed. This is why I went through all this trouble on i386. Oh, I was pretty sure it wasn't. OK. So now why three versions of immediate_set()?

Re: [patch 1/8] Immediate Values - Global Modules List and Module Mutex

2007-09-10 Thread Rusty Russell
On Mon, 2007-09-10 at 20:45 -0400, Mathieu Desnoyers wrote: > Code patching of _live_ SMP code is allowed. This is why I went through > all this trouble on i386. Oh, I was pretty sure it wasn't. OK. So now why three versions of immediate_set()? And why are you using my lock for exclusion?

Re: [patch 1/8] Immediate Values - Global Modules List and Module Mutex

2007-09-10 Thread Mathieu Desnoyers
* Rusty Russell ([EMAIL PROTECTED]) wrote: > On Sat, 2007-09-08 at 11:28 +0400, Alexey Dobriyan wrote: > > On Thu, Sep 06, 2007 at 04:02:29PM -0400, Mathieu Desnoyers wrote: > > > Remove "static" from module_mutex and the modules list so it can be used > > > by > > > other builtin objects in the

Re: [patch 1/8] Immediate Values - Global Modules List and Module Mutex

2007-09-10 Thread Rusty Russell
On Sat, 2007-09-08 at 11:28 +0400, Alexey Dobriyan wrote: > On Thu, Sep 06, 2007 at 04:02:29PM -0400, Mathieu Desnoyers wrote: > > Remove "static" from module_mutex and the modules list so it can be used by > > other builtin objects in the kernel. Otherwise, every code depending on the > > module

Re: [patch 1/8] Immediate Values - Global Modules List and Module Mutex

2007-09-10 Thread Rusty Russell
On Sat, 2007-09-08 at 11:28 +0400, Alexey Dobriyan wrote: On Thu, Sep 06, 2007 at 04:02:29PM -0400, Mathieu Desnoyers wrote: Remove static from module_mutex and the modules list so it can be used by other builtin objects in the kernel. Otherwise, every code depending on the module list

Re: [patch 1/8] Immediate Values - Global Modules List and Module Mutex

2007-09-10 Thread Mathieu Desnoyers
* Rusty Russell ([EMAIL PROTECTED]) wrote: On Sat, 2007-09-08 at 11:28 +0400, Alexey Dobriyan wrote: On Thu, Sep 06, 2007 at 04:02:29PM -0400, Mathieu Desnoyers wrote: Remove static from module_mutex and the modules list so it can be used by other builtin objects in the kernel.

Re: [patch 1/8] Immediate Values - Global Modules List and Module Mutex

2007-09-10 Thread Rusty Russell
On Mon, 2007-09-10 at 20:45 -0400, Mathieu Desnoyers wrote: Code patching of _live_ SMP code is allowed. This is why I went through all this trouble on i386. Oh, I was pretty sure it wasn't. OK. So now why three versions of immediate_set()? And why are you using my lock for exclusion?

Re: [patch 1/8] Immediate Values - Global Modules List and Module Mutex

2007-09-08 Thread Alexey Dobriyan
On Thu, Sep 06, 2007 at 04:02:29PM -0400, Mathieu Desnoyers wrote: > Remove "static" from module_mutex and the modules list so it can be used by > other builtin objects in the kernel. Otherwise, every code depending on the > module list would have to be put in kernel/module.c. Since the immediate

Re: [patch 1/8] Immediate Values - Global Modules List and Module Mutex

2007-09-08 Thread Alexey Dobriyan
On Thu, Sep 06, 2007 at 04:02:29PM -0400, Mathieu Desnoyers wrote: Remove static from module_mutex and the modules list so it can be used by other builtin objects in the kernel. Otherwise, every code depending on the module list would have to be put in kernel/module.c. Since the immediate

[patch 1/8] Immediate Values - Global Modules List and Module Mutex

2007-09-06 Thread Mathieu Desnoyers
Remove "static" from module_mutex and the modules list so it can be used by other builtin objects in the kernel. Otherwise, every code depending on the module list would have to be put in kernel/module.c. Since the immediate values depends on the module list but can be considered as logically

[patch 1/8] Immediate Values - Global Modules List and Module Mutex

2007-09-06 Thread Mathieu Desnoyers
Remove static from module_mutex and the modules list so it can be used by other builtin objects in the kernel. Otherwise, every code depending on the module list would have to be put in kernel/module.c. Since the immediate values depends on the module list but can be considered as logically

[patch 1/8] Immediate Values - Global Modules List and Module Mutex

2007-08-27 Thread Mathieu Desnoyers
Remove "static" from module_mutex and the modules list so it can be used by other builtin objects in the kernel. Otherwise, every code depending on the module list would have to be put in kernel/module.c. Since the immediate values depends on the module list but can be considered as logically

[patch 1/8] Immediate Values - Global Modules List and Module Mutex

2007-08-27 Thread Mathieu Desnoyers
Remove static from module_mutex and the modules list so it can be used by other builtin objects in the kernel. Otherwise, every code depending on the module list would have to be put in kernel/module.c. Since the immediate values depends on the module list but can be considered as logically

[patch 1/8] Immediate Values - Global Modules List and Module Mutex

2007-08-20 Thread Mathieu Desnoyers
Remove "static" from module_mutex and the modules list so it can be used by other builtin objects in the kernel. Otherwise, every code depending on the module list would have to be put in kernel/module.c. Since the immediate values depends on the module list but can be considered as logically

[patch 1/8] Immediate Values - Global Modules List and Module Mutex

2007-08-20 Thread Mathieu Desnoyers
Remove static from module_mutex and the modules list so it can be used by other builtin objects in the kernel. Otherwise, every code depending on the module list would have to be put in kernel/module.c. Since the immediate values depends on the module list but can be considered as logically

[patch 1/8] Immediate Values - Global Modules List and Module Mutex

2007-08-12 Thread Mathieu Desnoyers
Remove "static" from module_mutex and the modules list so it can be used by other builtin objects in the kernel. Otherwise, every code depending on the module list would have to be put in kernel/module.c. Since the immediate values depends on the module list but can be considered as logically

[patch 1/8] Immediate Values - Global Modules List and Module Mutex

2007-08-12 Thread Mathieu Desnoyers
Remove static from module_mutex and the modules list so it can be used by other builtin objects in the kernel. Otherwise, every code depending on the module list would have to be put in kernel/module.c. Since the immediate values depends on the module list but can be considered as logically

[patch 1/8] Immediate values - Global modules list and module mutex

2007-07-13 Thread Mathieu Desnoyers
Remove "static" from module_mutex and the modules list so it can be used by other builtin objects in the kernel. Otherwise, every code depending on the module list would have to be put in kernel/module.c. Since the immediate values depends on the module list but can be considered as logically

[patch 1/8] Immediate values - Global modules list and module mutex

2007-07-13 Thread Mathieu Desnoyers
Remove static from module_mutex and the modules list so it can be used by other builtin objects in the kernel. Otherwise, every code depending on the module list would have to be put in kernel/module.c. Since the immediate values depends on the module list but can be considered as logically