Re: [PATCH/RFC 1/2] jump label: make enable/disable o(1)

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Mathieu Desnoyers
Date: Thursday, December 16, 2010 - 1:36 pm

* Jason Baron (jbaron@redhat.com) wrote:

volatiles are also ordered one with respect to another by the compiler,
so I'd like to avoid doing the volatile read on the fast path unless
utterly necessary for architectures not supporting static jump patching
yet.

Tracepoints keep their own reference counts for enable/disable, so a
simple "enable/disable" is fine as far as tracepoints are concerned. Why
does perf need that refcounting done by the static jumps ?

I'd be tempted to use a "char" instead of a int/atomic_t for the key,
and keep the reference counter out of the picture (and leave that to the
caller). A single byte can be updated and read atomically. This should
save memory for the jump label tables.

Thoughts ?

Thanks,

Mathieu


-- 
Mathieu Desnoyers
Operating System Efficiency R&D Consultant
EfficiOS Inc.
http://www.efficios.com
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH/RFC 0/2] jump label: simplify API, Jason Baron, (Thu Dec 16, 11:25 am)
[PATCH/RFC 1/2] jump label: make enable/disable o(1), Jason Baron, (Thu Dec 16, 11:25 am)
[PATCH/RFC 2/2] jump label: introduce unlikely_switch(), Jason Baron, (Thu Dec 16, 11:25 am)
Re: [PATCH/RFC 1/2] jump label: make enable/disable o(1), Peter Zijlstra, (Thu Dec 16, 12:10 pm)
Re: [PATCH/RFC 0/2] jump label: simplify API, Mathieu Desnoyers, (Thu Dec 16, 12:22 pm)
Re: [PATCH/RFC 1/2] jump label: make enable/disable o(1), Peter Zijlstra, (Thu Dec 16, 12:33 pm)
Re: [PATCH/RFC 1/2] jump label: make enable/disable o(1), Peter Zijlstra, (Thu Dec 16, 12:41 pm)
Re: [PATCH/RFC 1/2] jump label: make enable/disable o(1), Steven Rostedt, (Thu Dec 16, 1:09 pm)
Re: [PATCH/RFC 0/2] jump label: simplify API, Steven Rostedt, (Thu Dec 16, 1:18 pm)
Re: [PATCH/RFC 1/2] jump label: make enable/disable o(1), Mathieu Desnoyers, (Thu Dec 16, 1:36 pm)
Re: [PATCH/RFC 1/2] jump label: make enable/disable o(1), Peter Zijlstra, (Thu Dec 16, 1:43 pm)
Re: [PATCH/RFC 1/2] jump label: make enable/disable o(1), Mathieu Desnoyers, (Thu Dec 16, 1:45 pm)
Re: [PATCH/RFC 1/2] jump label: make enable/disable o(1), Mathieu Desnoyers, (Thu Dec 16, 1:50 pm)
Re: [PATCH/RFC 1/2] jump label: make enable/disable o(1), Peter Zijlstra, (Thu Dec 16, 1:56 pm)
Re: [PATCH/RFC 1/2] jump label: make enable/disable o(1), Steven Rostedt, (Fri Dec 17, 2:12 pm)