Messages in this thread | | | Date | Wed, 24 Nov 2010 14:07:07 -0500 | From | Jason Baron <> | Subject | Re: [PATCH 1/3] jump label: add enabled/disabled state to jump label key entries |
| |
On Wed, Nov 24, 2010 at 07:39:30PM +0100, Peter Zijlstra wrote: > 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?
perhaps, not. But I would like to better understand how expensive text pokes are on some other arches such as powerpc first.
Obviously, I want the best implementation - the last posted version of binary search, had a deadlock with the module_mutex, which I saw no resolution for...
So, with this 1 additinal patch, we have a complete working implemenation of jump labels within the current framework. We can iterate from there if ppl want to simpify/optimize various parts. That's how I envision proceeding.
thanks,
-Jason
| |