Re: [PATCH 08/21] x86/intel_rdt/cqm: Add RMID(Resource monitoring ID) management

2017-07-12 Thread Thomas Gleixner
On Tue, 11 Jul 2017, Shivappa Vikas wrote: > On Mon, 3 Jul 2017, Thomas Gleixner wrote: > > That means, the free list is used as the primary source. One of my boxes > > has 143 RMIDs. So it only takes 142 mkdir/rmdir invocations to move all > > RMIDs to the limbo list. On the next mkdir invocation

Re: [PATCH 08/21] x86/intel_rdt/cqm: Add RMID(Resource monitoring ID) management

2017-07-11 Thread Shivappa Vikas
On Mon, 3 Jul 2017, Thomas Gleixner wrote: On Sun, 2 Jul 2017, Thomas Gleixner wrote: Thinking a bit more about that limbo mechanics. In case that a RMID was never used on a particular package, the state check forces an IPI on all packages unconditionally. That's suboptimal at least. We kno

Re: [PATCH 08/21] x86/intel_rdt/cqm: Add RMID(Resource monitoring ID) management

2017-07-05 Thread Thomas Gleixner
On Wed, 5 Jul 2017, Tony Luck wrote: > > In case that a RMID was never used on a particular package, the state check > > forces an IPI on all packages unconditionally. That's suboptimal at least. > > > > We know on which package a given RMID was used, so we could restrict the > > checks to exactly

Re: [PATCH 08/21] x86/intel_rdt/cqm: Add RMID(Resource monitoring ID) management

2017-07-05 Thread Tony Luck
> In case that a RMID was never used on a particular package, the state check > forces an IPI on all packages unconditionally. That's suboptimal at least. > > We know on which package a given RMID was used, so we could restrict the > checks to exactly these packages, but I'm not sure it's worth the

Re: [PATCH 08/21] x86/intel_rdt/cqm: Add RMID(Resource monitoring ID) management

2017-07-05 Thread Thomas Gleixner
On Wed, 5 Jul 2017, Peter Zijlstra wrote: > On Mon, Jul 03, 2017 at 11:55:37AM +0200, Thomas Gleixner wrote: > > > > > if (static_branch_likely(&rdt_mon_enable_key)) { > > if (unlikely(current->rmid)) { > > newstate.rmid = current->rmid; > >

Re: [PATCH 08/21] x86/intel_rdt/cqm: Add RMID(Resource monitoring ID) management

2017-07-05 Thread Peter Zijlstra
On Mon, Jul 03, 2017 at 11:55:37AM +0200, Thomas Gleixner wrote: > > if (static_branch_likely(&rdt_mon_enable_key)) { > if (unlikely(current->rmid)) { > newstate.rmid = current->rmid; > __set_bit(newstate.rmid, this_cpu_ptr(rmid_bitm

Re: [PATCH 08/21] x86/intel_rdt/cqm: Add RMID(Resource monitoring ID) management

2017-07-03 Thread Thomas Gleixner
On Sun, 2 Jul 2017, Thomas Gleixner wrote: > Thinking a bit more about that limbo mechanics. > > In case that a RMID was never used on a particular package, the state check > forces an IPI on all packages unconditionally. That's suboptimal at least. > > We know on which package a given RMID was u

Re: [PATCH 08/21] x86/intel_rdt/cqm: Add RMID(Resource monitoring ID) management

2017-07-02 Thread Thomas Gleixner
On Mon, 26 Jun 2017, Vikas Shivappa wrote: > +static u64 __rmid_read(u32 rmid, u32 eventid) > +{ > + u64 val; > + > + wrmsr(MSR_IA32_QM_EVTSEL, eventid, rmid); > + rdmsrl(MSR_IA32_QM_CTR, val); The calling convention of this function needs to be documented. It's obvious that it needs t

[PATCH 08/21] x86/intel_rdt/cqm: Add RMID(Resource monitoring ID) management

2017-06-26 Thread Vikas Shivappa
Hardware uses RMID(Resource monitoring ID) to keep track of each of the RDT events associated with tasks. The number of RMIDs is dependent on the SKU and is enumerated via CPUID. We add support to manage the RMIDs which include managing the RMID allocation and reading LLC occupancy for an RMID. RM