* perf and cgroup event scheduling
@ 2011-03-31 13:27 Peter Zijlstra
2011-03-31 17:06 ` Stephane Eranian
0 siblings, 1 reply; 3+ messages in thread
From: Peter Zijlstra @ 2011-03-31 13:27 UTC (permalink / raw)
To: Stephane Eranian; +Cc: Ingo Molnar, linux-kernel, Oleg Nesterov
Hi Stephane,
while trying to make sense of various other fun event scheduling issues,
I noticed that perf_cgroup_switch() isn't always doing the right thing.
So we typically want to schedule: CPU-pinned, TASK-pinned, CPU-flexible
TASK-flexible, however the current code doesn't respect that.
In particular perf_cgroup_sched_in() is placed wrong, it should be
_before_ we schedule in the task contexts.
There's further complications with things like perf_install_in_context()
and perf_cgroup_move(), but those are either rare or 'interesting' to
fix.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: perf and cgroup event scheduling
2011-03-31 13:27 perf and cgroup event scheduling Peter Zijlstra
@ 2011-03-31 17:06 ` Stephane Eranian
2011-03-31 17:12 ` Peter Zijlstra
0 siblings, 1 reply; 3+ messages in thread
From: Stephane Eranian @ 2011-03-31 17:06 UTC (permalink / raw)
To: Peter Zijlstra; +Cc: Ingo Molnar, linux-kernel, Oleg Nesterov
Peter,
On Thu, Mar 31, 2011 at 6:27 AM, Peter Zijlstra <peterz@infradead.org> wrote:
> Hi Stephane,
>
> while trying to make sense of various other fun event scheduling issues,
> I noticed that perf_cgroup_switch() isn't always doing the right thing.
>
> So we typically want to schedule: CPU-pinned, TASK-pinned, CPU-flexible
> TASK-flexible, however the current code doesn't respect that.
>
Unfortunately, you are right ;-). I think we should try to centralize
the scheduling
of per-cpu and per-thread event in a single function that goes through
the priority
list. In certain cases, we would sched out and back in per-thread
events, but that
would be the only to maintain the priority scheme. I will look into that.
In the meantime, yesterday, I found and fixed one potential kernel crash problem
related to mixing cgroup + per-thread events. I will be posting the
patch shortly.
> In particular perf_cgroup_sched_in() is placed wrong, it should be
> _before_ we schedule in the task contexts.
>
> There's further complications with things like perf_install_in_context()
> and perf_cgroup_move(), but those are either rare or 'interesting' to
> fix.
>
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: perf and cgroup event scheduling
2011-03-31 17:06 ` Stephane Eranian
@ 2011-03-31 17:12 ` Peter Zijlstra
0 siblings, 0 replies; 3+ messages in thread
From: Peter Zijlstra @ 2011-03-31 17:12 UTC (permalink / raw)
To: Stephane Eranian; +Cc: Ingo Molnar, linux-kernel, Oleg Nesterov
On Thu, 2011-03-31 at 10:06 -0700, Stephane Eranian wrote:
> Peter,
>
> On Thu, Mar 31, 2011 at 6:27 AM, Peter Zijlstra <peterz@infradead.org> wrote:
> > Hi Stephane,
> >
> > while trying to make sense of various other fun event scheduling issues,
> > I noticed that perf_cgroup_switch() isn't always doing the right thing.
> >
> > So we typically want to schedule: CPU-pinned, TASK-pinned, CPU-flexible
> > TASK-flexible, however the current code doesn't respect that.
> >
> Unfortunately, you are right ;-). I think we should try to centralize
> the scheduling
> of per-cpu and per-thread event in a single function that goes through
> the priority
> list. In certain cases, we would sched out and back in per-thread
> events, but that
> would be the only to maintain the priority scheme. I will look into that.
I've done something near to that here:
https://lkml.org/lkml/2011/3/31/232
but that patch is very fresh and not tested at all.
>
> In the meantime, yesterday, I found and fixed one potential kernel crash problem
> related to mixing cgroup + per-thread events. I will be posting the
> patch shortly.
Looking fwd to that, Thanks!
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-03-31 17:10 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-31 13:27 perf and cgroup event scheduling Peter Zijlstra
2011-03-31 17:06 ` Stephane Eranian
2011-03-31 17:12 ` Peter Zijlstra
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox