From: eranian@google.com Date: Thu, 11 Mar 2010 06:26:05 +0000 (-0800) Subject: perf_events: Improve task_sched_in() X-Git-Tag: v2.6.35-rc1~522^2~211 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9b33fa6ba0e2f90fdf407501db801c2511121564;p=pandora-kernel.git perf_events: Improve task_sched_in() This patch is an optimization in perf_event_task_sched_in() to avoid scheduling the events twice in a row. Without it, the perf_disable()/perf_enable() pair is invoked twice, thereby pinned events counts while scheduling flexible events and we go throuh hw_perf_enable() twice. By encapsulating, the whole sequence into perf_disable()/perf_enable() we ensure, hw_perf_enable() is going to be invoked only once because of the refcount protection. Signed-off-by: Stephane Eranian Signed-off-by: Peter Zijlstra LKML-Reference: <1268288765-5326-1-git-send-email-eranian@google.com> Signed-off-by: Ingo Molnar --- Reading git-diff-tree failed