summaryrefslogtreecommitdiffstats
path: root/kernel/posix-cpu-timers.c
diff options
context:
space:
mode:
authorFrederic Weisbecker <fweisbec@gmail.com>2010-04-05 15:35:57 +0200
committerFrederic Weisbecker <fweisbec@gmail.com>2010-04-14 18:20:33 +0200
commit76e1d9047e4edefb8ada20aa90d5762306082bd6 (patch)
tree60384bd206878d2c440e07b33d97b1bb00a103dc /kernel/posix-cpu-timers.c
parentc05556421742eb47f80301767653a4bcb19de9de (diff)
downloadop-kernel-dev-76e1d9047e4edefb8ada20aa90d5762306082bd6.zip
op-kernel-dev-76e1d9047e4edefb8ada20aa90d5762306082bd6.tar.gz
perf: Store active software events in a hashlist
Each time a software event triggers, we need to walk through the entire list of events from the current cpu and task contexts to retrieve a running perf event that matches. We also need to check a matching perf event is actually counting. This walk is wasteful and makes the event fast path scaling down with a growing number of events running on the same contexts. To solve this, we store the running perf events in a hashlist to get an immediate access to them against their type:event_id when they trigger. v2: - Fix SWEVENT_HLIST_SIZE definition (and re-learn some basic maths along the way) - Only allocate hlist for online cpus, but keep track of the refcount on offline possible cpus too, so that we allocate it if needed when it becomes online. - Drop the kref use as it's not adapted to our tricks anymore. v3: - Fix bad refcount check (address instead of value). Thanks to Eric Dumazet who spotted this. - While exiting cpu, move the hlist release out of the IPI path to lock the hlist mutex sanely. Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Paul Mackerras <paulus@samba.org> Cc: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/posix-cpu-timers.c')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud