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

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Mathieu Desnoyers
Date: Friday, August 24, 2007 - 9:26 am

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

Hi Rusty,


Ok, will fix.


Declaring variables with __attribute__((section("__markers_strings")))
will likely put them in an allocated section, you are right. Will fix.

The same applies to immediate values with .section __immediate, \"a\",
@progbits, which is explicitely allocated.


Ok. Will apply to immediate values too.


Just they are internal functiona meant to be called with markers_mutex
held. But I guess having a static prefix and not being exported is
enough. Will remove. I'll just keep
_marker_update_probes/marker_update_probes to differentiate between
locked/non-locked version.


Let's say we have abc\0 for marker name as name input.

len = 3 + 1 = 4 (including \0)
hash is done only on the 3 first chars, excluding the \0 (therefore the
                                                          len-1 there)

Actually, it's like this only for a matter of consistency between
add_marker and remove_marker, which are quite similar, but add_marker
needs name_len to include the \0 value. It would be odd to change the
logic between the two functions to one including the \0 and the other
excluding it.


Since this function is only meant to be called upon module load, before
the module is added to the module list, this marker range cannot be seen
by other calls to marker_update_probe_range. But you are right. It also
protects the hash table, so I should take the mutex there.  Fixing.

Thanks for the review,

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:
[patch 1/4] Linux Kernel Markers - Architecture Independen ..., Mathieu Desnoyers, (Mon Aug 20, 1:27 pm)
Re: [patch 1/4] Linux Kernel Markers - Architecture Indepe ..., Mathieu Desnoyers, (Fri Aug 24, 9:26 am)
Re: [patch 1/4] Linux Kernel Markers - Architecture Indepe ..., Mathieu Desnoyers, (Sat Aug 25, 2:26 pm)