Re: [PATCH 1/3] jump label: add enabled/disabled state to jumplabel key entries

From: Peter Zijlstra
Date: Wed Nov 24 2010 - 13:39:39 EST


On Wed, 2010-11-24 at 13:24 -0500, Jason Baron wrote:
> By storing the state of the jump label with each key, we make
> sure that when modules are added, they are updated to the correct
> state. For example, if the kmalloc tracepoint is enabled and
> a module is added which has kmalloc, we make sure that the tracepoint
> is properly enabled on module load.
>
> Also, if jump_label_enable(key), is called but the key has not yet
> been added to the hashtable of jump label keys, add 'key' to the table.
> In this way, if key value has its state updated, but we have not
> yet encountered a JUMP_LABEL() definition for it (if its located in
> a module), we ensure that the jump label is set to the correct
> state when it finally is encountered.
>
> When modules are unloaded, we traverse the jump label hashtable,
> and remove any entries that have a key value that is contained
> by that module's text section. In this way key values are properly
> unregistered, and can be re-used.

So why again are we adding all this complexity? Does this really need to
be optimized in the face of how expensive text pokes are?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/