lkml.org 
[lkml]   [2011]   [Jan]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 1/2] perf_events: add cgroup support (v8)
From
Date
On Thu, 2011-01-20 at 15:30 +0200, Stephane Eranian wrote:
> @@ -4259,8 +4261,20 @@ void cgroup_exit(struct task_struct *tsk, int run_callbacks)
>
> /* Reassign the task to the init_css_set. */
> task_lock(tsk);
> + /*
> + * we mask interrupts to prevent:
> + * - timer tick to cause event rotation which
> + * could schedule back in cgroup events after
> + * they were switched out by perf_cgroup_sched_out()
> + *
> + * - preemption which could schedule back in cgroup events
> + */
> + local_irq_save(flags);
> + perf_cgroup_sched_out(tsk);
> cg = tsk->cgroups;
> tsk->cgroups = &init_css_set;
> + perf_cgroup_sched_in(tsk);
> + local_irq_restore(flags);
> task_unlock(tsk);
> if (cg)
> put_css_set_taskexit(cg);

So you too need a callback on cgroup change there.. Li, Paul, any chance
we can fix this cgroup_subsys::exit callback? The scheduler code needs
to do funny thing because its in the wrong place as well.


\
 
 \ /
  Last update: 2011-01-20 15:41    [W:0.121 / U:1.468 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site