Re: [RFC] perf: a different approach to perf_rotate_context()

2018-03-12 Thread Song Liu
> On Mar 3, 2018, at 7:26 AM, Peter Zijlstra wrote: > > On Thu, Mar 01, 2018 at 11:53:21AM -0800, Song Liu wrote: > >> Second, flexible_groups in cpuctx->ctx and cpuctx->task_ctx now have >> exact same priority and equal chance to run. I am not sure whether this >> will change the behavior in

Re: [RFC] perf: a different approach to perf_rotate_context()

2018-03-05 Thread Alexey Budankov
On 03.03.2018 20:48, Peter Zijlstra wrote: > On Sat, Mar 03, 2018 at 04:43:16PM +, Song Liu wrote: >>> In any case, there's a ton of conflict against the patches here: >>> >>> https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git/log/?h=perf/testing >>> >>> And with those the idea wa

Re: [RFC] perf: a different approach to perf_rotate_context()

2018-03-03 Thread Peter Zijlstra
On Sat, Mar 03, 2018 at 04:43:16PM +, Song Liu wrote: > > In any case, there's a ton of conflict against the patches here: > > > > https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git/log/?h=perf/testing > > > > And with those the idea was to move to a virtual time based scheduler

Re: [RFC] perf: a different approach to perf_rotate_context()

2018-03-03 Thread Song Liu
> On Mar 3, 2018, at 7:26 AM, Peter Zijlstra wrote: > > On Thu, Mar 01, 2018 at 11:53:21AM -0800, Song Liu wrote: >> When there are more perf_event's than hardware PMCs, perf rotate events >> so that all events get chance to run. Currently, the rotation works as: >> sched_out flexible_groups i

Re: [RFC] perf: a different approach to perf_rotate_context()

2018-03-03 Thread Song Liu
> On Mar 3, 2018, at 5:39 AM, Jiri Olsa wrote: > > On Thu, Mar 01, 2018 at 11:53:21AM -0800, Song Liu wrote: >> When there are more perf_event's than hardware PMCs, perf rotate events >> so that all events get chance to run. Currently, the rotation works as: >> sched_out flexible_groups in cpu

Re: [RFC] perf: a different approach to perf_rotate_context()

2018-03-03 Thread Peter Zijlstra
On Thu, Mar 01, 2018 at 11:53:21AM -0800, Song Liu wrote: > When there are more perf_event's than hardware PMCs, perf rotate events > so that all events get chance to run. Currently, the rotation works as: > sched_out flexible_groups in cpuctx->ctx and cpuctx->task_ctx; > rotate_left flexible_g

Re: [RFC] perf: a different approach to perf_rotate_context()

2018-03-03 Thread Jiri Olsa
On Thu, Mar 01, 2018 at 11:53:21AM -0800, Song Liu wrote: > When there are more perf_event's than hardware PMCs, perf rotate events > so that all events get chance to run. Currently, the rotation works as: > sched_out flexible_groups in cpuctx->ctx and cpuctx->task_ctx; > rotate_left flexible_g

[RFC] perf: a different approach to perf_rotate_context()

2018-03-01 Thread Song Liu
When there are more perf_event's than hardware PMCs, perf rotate events so that all events get chance to run. Currently, the rotation works as: sched_out flexible_groups in cpuctx->ctx and cpuctx->task_ctx; rotate_left flexible_groups in cpuctx->ctx and cpuctx->task_ctx; try sched_in flexible