Re: [PATCH] perf/core: fix corner case in perf_rotate_context()

2019-10-08 Thread Song Liu
> On Oct 8, 2019, at 2:35 AM, Peter Zijlstra wrote: > > On Wed, Oct 02, 2019 at 11:43:17PM -0700, Song Liu wrote: >> This is a rare corner case, but it does happen: >> >> In perf_rotate_context(), when the first cpu flexible event fail to >> schedule, cpu_rotate is 1, while cpu_event is NULL.

Re: [PATCH] perf/core: fix corner case in perf_rotate_context()

2019-10-08 Thread Peter Zijlstra
On Wed, Oct 02, 2019 at 11:43:17PM -0700, Song Liu wrote: > This is a rare corner case, but it does happen: > > In perf_rotate_context(), when the first cpu flexible event fail to > schedule, cpu_rotate is 1, while cpu_event is NULL. You're failing to explain how we get here in the first place.

Re: [PATCH] perf/core: fix corner case in perf_rotate_context()

2019-10-05 Thread Song Liu
> On Oct 2, 2019, at 11:43 PM, Song Liu wrote: > > This is a rare corner case, but it does happen: > > In perf_rotate_context(), when the first cpu flexible event fail to > schedule, cpu_rotate is 1, while cpu_event is NULL. Since cpu_event is > NULL, perf_rotate_context will _NOT_ call cpu_c