Re: [PATCH] perf/x86/intel/cqm: Make sure the head event of cache_groups always has valid RMID

2017-05-22 Thread Shivappa Vikas
Besides there's another bug that we retry rotating without resetting nr_needed and start in __intel_cqm_rmid_rotate(). Those bugs combined together led to the following oops. WARNING: at arch/x86/kernel/cpu/perf_event_intel_cqm.c:186 __put_rmid+0x28/0x80() ... [] __put_rmid+0x28/0x80 []

Re: [PATCH] perf/x86/intel/cqm: Make sure the head event of cache_groups always has valid RMID

2017-05-22 Thread Shivappa Vikas
Besides there's another bug that we retry rotating without resetting nr_needed and start in __intel_cqm_rmid_rotate(). Those bugs combined together led to the following oops. WARNING: at arch/x86/kernel/cpu/perf_event_intel_cqm.c:186 __put_rmid+0x28/0x80() ... [] __put_rmid+0x28/0x80 []

Re: [PATCH] perf/x86/intel/cqm: Make sure the head event of cache_groups always has valid RMID

2017-05-17 Thread David Carrillo-Cisneros
On Tue, May 16, 2017 at 7:38 AM, Peter Zijlstra wrote: > On Thu, May 04, 2017 at 10:31:43AM +0800, Zefan Li wrote: >> It is assumed that the head of cache_groups always has valid RMID, >> which isn't true. >> >> When we deallocate RMID from conflicting events currently we

Re: [PATCH] perf/x86/intel/cqm: Make sure the head event of cache_groups always has valid RMID

2017-05-17 Thread David Carrillo-Cisneros
On Tue, May 16, 2017 at 7:38 AM, Peter Zijlstra wrote: > On Thu, May 04, 2017 at 10:31:43AM +0800, Zefan Li wrote: >> It is assumed that the head of cache_groups always has valid RMID, >> which isn't true. >> >> When we deallocate RMID from conflicting events currently we don't >> move them to

Re: [PATCH] perf/x86/intel/cqm: Make sure the head event of cache_groups always has valid RMID

2017-05-16 Thread Peter Zijlstra
On Thu, May 04, 2017 at 10:31:43AM +0800, Zefan Li wrote: > It is assumed that the head of cache_groups always has valid RMID, > which isn't true. > > When we deallocate RMID from conflicting events currently we don't > move them to the tail, and one of those events can happen to be in > the

Re: [PATCH] perf/x86/intel/cqm: Make sure the head event of cache_groups always has valid RMID

2017-05-16 Thread Peter Zijlstra
On Thu, May 04, 2017 at 10:31:43AM +0800, Zefan Li wrote: > It is assumed that the head of cache_groups always has valid RMID, > which isn't true. > > When we deallocate RMID from conflicting events currently we don't > move them to the tail, and one of those events can happen to be in > the

Re: [PATCH] perf/x86/intel/cqm: Make sure the head event of cache_groups always has valid RMID

2017-05-15 Thread Zefan Li
any comments? On 2017/5/4 10:31, Zefan Li wrote: > It is assumed that the head of cache_groups always has valid RMID, > which isn't true. > > When we deallocate RMID from conflicting events currently we don't > move them to the tail, and one of those events can happen to be in > the head.

Re: [PATCH] perf/x86/intel/cqm: Make sure the head event of cache_groups always has valid RMID

2017-05-15 Thread Zefan Li
any comments? On 2017/5/4 10:31, Zefan Li wrote: > It is assumed that the head of cache_groups always has valid RMID, > which isn't true. > > When we deallocate RMID from conflicting events currently we don't > move them to the tail, and one of those events can happen to be in > the head.

[PATCH] perf/x86/intel/cqm: Make sure the head event of cache_groups always has valid RMID

2017-05-03 Thread Zefan Li
It is assumed that the head of cache_groups always has valid RMID, which isn't true. When we deallocate RMID from conflicting events currently we don't move them to the tail, and one of those events can happen to be in the head. Another case is we allocate RMIDs for all the events except the head

[PATCH] perf/x86/intel/cqm: Make sure the head event of cache_groups always has valid RMID

2017-05-03 Thread Zefan Li
It is assumed that the head of cache_groups always has valid RMID, which isn't true. When we deallocate RMID from conflicting events currently we don't move them to the tail, and one of those events can happen to be in the head. Another case is we allocate RMIDs for all the events except the head