login
Header Space

 
 

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

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Rusty Russell <rusty@...>
Cc: Alexey Dobriyan <adobriyan@...>, <akpm@...>, <linux-kernel@...>, H. Peter Anvin <hpa@...>
Date: Friday, September 14, 2007 - 11:32 am

* Rusty Russell (rusty@rustcorp.com.au) wrote:

I think your idea is good. immediate_init() could be used to update the
immediate values at boot time _and_ at module load time, and we could
use an architecture specific arch_immediate_update_init() to support it.

As for "when" to use this, it should be used at boot time when
interrupts are still disabled, still running in UP. It can also be used
at module load time before any of the module code is executed, as long
as the module code pages are writable (which they always are, for
now..). Therefore, the flag seems inappropriate for module load
arch_immediate_update_init. It cannot be put in __init section neither
though if we use it like this.



Yes, I thought about this, but since I use immediate values in the
kernel markers, which can be put in exception handlers (including nmi,
mce handler), which cannot be disabled without important side-effects, I
don't think trying to stop the CPUs is a workable solution.



GCC support is required if we want to embed inline functions inside
unlikely branches depending on immediate values (no function call
there). It also permits passing local variables as arguments to the
function call (stack setup), which would be tricky, instrumentation site
specific and non portable if done in assembly.

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
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [patch 1/8] Immediate Values - Global Modules List and M..., Mathieu Desnoyers, (Mon Sep 10, 8:45 pm)
Re: [patch 1/8] Immediate Values - Global Modules List and M..., Mathieu Desnoyers, (Tue Sep 11, 10:27 am)
Re: [patch 1/8] Immediate Values - Global Modules List and M..., Mathieu Desnoyers, (Thu Sep 13, 5:21 pm)
Re: [patch 1/8] Immediate Values - Global Modules List and M..., Mathieu Desnoyers, (Fri Sep 14, 11:32 am)
Re: [patch 1/8] Immediate Values - Global Modules List and M..., Mathieu Desnoyers, (Tue Sep 18, 9:41 am)
Re: [patch 1/8] Immediate Values - Global Modules List and M..., Mathieu Desnoyers, (Fri Sep 21, 9:37 am)
speck-geostationary