lkml.org 
[lkml]   [2010]   [Apr]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v2] perf: Store active software events in a hashlist
From
Date
Le jeudi 08 avril 2010 à 21:39 +0200, Frederic Weisbecker a écrit :

...

> @@ -5401,6 +5507,16 @@ static void __cpuinit perf_event_init_cpu(int cpu)
> spin_lock(&perf_resource_lock);
> cpuctx->max_pertask = perf_max_events - perf_reserved_percpu;
> spin_unlock(&perf_resource_lock);
> +
> + mutex_lock(&cpuctx->hlist_mutex);
> + if (&cpuctx->hlist_refcount > 0) {


if (cpuctx->hlist_refcount > 0)

> + struct swevent_hlist *hlist;
> +
> + hlist = kzalloc(sizeof(*hlist), GFP_KERNEL);
> + WARN_ON_ONCE(!hlist);
> + rcu_assign_pointer(cpuctx->swevent_hlist, hlist);
> + }
> + mutex_unlock(&cpuctx->hlist_mutex);
> }



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2010-04-08 22:07    [W:0.813 / U:0.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site