Re: livepatch: why not use only one tracer for all the changed functions?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 10 Dec 2015 12:49:33 +0100
Petr Mladek <pmladek@xxxxxxxx> wrote:

> On Thu 2015-12-10 10:48:04, zhouchengming wrote:
> > Now the livepatch register one tracer for each changed function.
> > So ftrace will iterates the whole tracers list when each changed
> > function be called. And when there are many changed functions, this
> > solution can cause performance degradation obviously.
> > 
> > So I think we can register only one tracer for all the changed
> > functions. And in this tracer handler we can find the right new
> > function list easily using the hash value of the old function
> > address.  
> 
> I haven't studied this in detail but I believe that ftrace
> is more effective these days. It could call the handler
> directly if only one is registered.
> 
> I think that it is related to the FTRACE_FL_TRAMP flag and
> ftrace_update_trampoline(). I am not sure if it works out of box.
> Anyway, the trampoline stuff looks like the most effective
> way to go.
> 

Correct, it now supports creating a trampoline specifically for a
callback. If there's only one callback hooked to a specific function,
it calls the trampoline for that function directly, and not the
iterator, even if there's other callbacks for other functions.

Now I may need to finally user rcu_task, to free the trampolines for it.

-- Steve
--
To unsubscribe from this list: send the line "unsubscribe live-patching" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux Kernel]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux