Re: [PATCH RESEND v5] perf/core: Fix installing arbitrary cgroup event into cpu

2018-03-12 Thread Lin Xiulei
2018-03-12 20:24 GMT+08:00 Peter Zijlstra : > On Wed, Mar 07, 2018 at 07:19:15PM +0800, Lin Xiulei wrote: > >> >> + /* >> >> + * if only the cgroup is running on this cpu >> >> + * and cpuctx->cgrp == NULL (otherwise it would've >> >> + * been set with

Re: [PATCH RESEND v5] perf/core: Fix installing arbitrary cgroup event into cpu

2018-03-12 Thread Lin Xiulei
2018-03-12 20:24 GMT+08:00 Peter Zijlstra : > On Wed, Mar 07, 2018 at 07:19:15PM +0800, Lin Xiulei wrote: > >> >> + /* >> >> + * if only the cgroup is running on this cpu >> >> + * and cpuctx->cgrp == NULL (otherwise it would've >> >> + * been set with running cgroup), we put

Re: [PATCH RESEND v5] perf/core: Fix installing arbitrary cgroup event into cpu

2018-03-12 Thread Peter Zijlstra
On Wed, Mar 07, 2018 at 07:19:15PM +0800, Lin Xiulei wrote: > >> + /* > >> + * if only the cgroup is running on this cpu > >> + * and cpuctx->cgrp == NULL (otherwise it would've > >> + * been set with running cgroup), we put this cgroup > >> + * into cpu context. Or it

Re: [PATCH RESEND v5] perf/core: Fix installing arbitrary cgroup event into cpu

2018-03-12 Thread Peter Zijlstra
On Wed, Mar 07, 2018 at 07:19:15PM +0800, Lin Xiulei wrote: > >> + /* > >> + * if only the cgroup is running on this cpu > >> + * and cpuctx->cgrp == NULL (otherwise it would've > >> + * been set with running cgroup), we put this cgroup > >> + * into cpu context. Or it

Re: [PATCH RESEND v5] perf/core: Fix installing arbitrary cgroup event into cpu

2018-03-12 Thread Lin Xiulei
2018-03-12 15:53 GMT+08:00 Ingo Molnar : > > * linxiu...@gmail.com wrote: > >> /* >>* Because cgroup events are always per-cpu events, >>* this will always be called from the right CPU. >>*/ > >> + /* >> + * if only the

Re: [PATCH RESEND v5] perf/core: Fix installing arbitrary cgroup event into cpu

2018-03-12 Thread Lin Xiulei
2018-03-12 15:53 GMT+08:00 Ingo Molnar : > > * linxiu...@gmail.com wrote: > >> /* >>* Because cgroup events are always per-cpu events, >>* this will always be called from the right CPU. >>*/ > >> + /* >> + * if only the cgroup is running on this cpu >> +

Re: [PATCH RESEND v5] perf/core: Fix installing arbitrary cgroup event into cpu

2018-03-12 Thread Ingo Molnar
* linxiu...@gmail.com wrote: > /* >* Because cgroup events are always per-cpu events, >* this will always be called from the right CPU. >*/ > + /* > + * if only the cgroup is running on this cpu > + * and cpuctx->cgrp == NULL

Re: [PATCH RESEND v5] perf/core: Fix installing arbitrary cgroup event into cpu

2018-03-12 Thread Ingo Molnar
* linxiu...@gmail.com wrote: > /* >* Because cgroup events are always per-cpu events, >* this will always be called from the right CPU. >*/ > + /* > + * if only the cgroup is running on this cpu > + * and cpuctx->cgrp == NULL (otherwise it would've >

Re: [PATCH RESEND v5] perf/core: Fix installing arbitrary cgroup event into cpu

2018-03-07 Thread Lin Xiulei
2018-03-06 19:50 GMT+08:00 Peter Zijlstra : > On Tue, Mar 06, 2018 at 05:36:37PM +0800, linxiu...@gmail.com wrote: >> From: "leilei.lin" >> >> Do not install cgroup event into the CPU context and schedule it >> if the cgroup is not running on this

Re: [PATCH RESEND v5] perf/core: Fix installing arbitrary cgroup event into cpu

2018-03-07 Thread Lin Xiulei
2018-03-06 19:50 GMT+08:00 Peter Zijlstra : > On Tue, Mar 06, 2018 at 05:36:37PM +0800, linxiu...@gmail.com wrote: >> From: "leilei.lin" >> >> Do not install cgroup event into the CPU context and schedule it >> if the cgroup is not running on this CPU > > OK, so far so good, this explains the bit

Re: [PATCH RESEND v5] perf/core: Fix installing arbitrary cgroup event into cpu

2018-03-06 Thread Peter Zijlstra
On Tue, Mar 06, 2018 at 05:36:37PM +0800, linxiu...@gmail.com wrote: > From: "leilei.lin" > > Do not install cgroup event into the CPU context and schedule it > if the cgroup is not running on this CPU OK, so far so good, this explains the bit in

Re: [PATCH RESEND v5] perf/core: Fix installing arbitrary cgroup event into cpu

2018-03-06 Thread Peter Zijlstra
On Tue, Mar 06, 2018 at 05:36:37PM +0800, linxiu...@gmail.com wrote: > From: "leilei.lin" > > Do not install cgroup event into the CPU context and schedule it > if the cgroup is not running on this CPU OK, so far so good, this explains the bit in __perf_install_in_context(). > While there is

[PATCH RESEND v5] perf/core: Fix installing arbitrary cgroup event into cpu

2018-03-06 Thread linxiulei
From: "leilei.lin" Do not install cgroup event into the CPU context and schedule it if the cgroup is not running on this CPU While there is no task of cgroup running specified CPU, current kernel still install cgroup event into CPU context that causes another cgroup

[PATCH RESEND v5] perf/core: Fix installing arbitrary cgroup event into cpu

2018-03-06 Thread linxiulei
From: "leilei.lin" Do not install cgroup event into the CPU context and schedule it if the cgroup is not running on this CPU While there is no task of cgroup running specified CPU, current kernel still install cgroup event into CPU context that causes another cgroup event can't be installed