Re: [PATCH 21/21] x86/intel_rdt/mbm: Handle counter overflow

2017-07-11 Thread Thomas Gleixner
On Mon, 10 Jul 2017, Luck, Tony wrote: > On Fri, Jul 07, 2017 at 08:50:40AM +0200, Thomas Gleixner wrote: > > Aside of that, are you really serious about serializing the world and > > everything on a single global mutex? > > It would be nice to not do that, but there are challenges. At > any

Re: [PATCH 21/21] x86/intel_rdt/mbm: Handle counter overflow

2017-07-11 Thread Thomas Gleixner
On Mon, 10 Jul 2017, Luck, Tony wrote: > On Fri, Jul 07, 2017 at 08:50:40AM +0200, Thomas Gleixner wrote: > > Aside of that, are you really serious about serializing the world and > > everything on a single global mutex? > > It would be nice to not do that, but there are challenges. At > any

Re: [PATCH 21/21] x86/intel_rdt/mbm: Handle counter overflow

2017-07-10 Thread Luck, Tony
On Fri, Jul 07, 2017 at 08:50:40AM +0200, Thomas Gleixner wrote: > Aside of that, are you really serious about serializing the world and > everything on a single global mutex? It would be nice to not do that, but there are challenges. At any instant someone else might run: # rmdir

Re: [PATCH 21/21] x86/intel_rdt/mbm: Handle counter overflow

2017-07-10 Thread Luck, Tony
On Fri, Jul 07, 2017 at 08:50:40AM +0200, Thomas Gleixner wrote: > Aside of that, are you really serious about serializing the world and > everything on a single global mutex? It would be nice to not do that, but there are challenges. At any instant someone else might run: # rmdir

Re: [PATCH 21/21] x86/intel_rdt/mbm: Handle counter overflow

2017-07-07 Thread Thomas Gleixner
On Thu, 6 Jul 2017, Shivappa Vikas wrote: > On Sun, 2 Jul 2017, Thomas Gleixner wrote: > > On Mon, 26 Jun 2017, Vikas Shivappa wrote: > > > +static void mbm_update(struct rdt_domain *d, int rmid) > > > +{ > > > + struct rmid_read rr; > > > + > > > + rr.first = false; > > > + rr.d = d; > > > + > >

Re: [PATCH 21/21] x86/intel_rdt/mbm: Handle counter overflow

2017-07-07 Thread Thomas Gleixner
On Thu, 6 Jul 2017, Shivappa Vikas wrote: > On Sun, 2 Jul 2017, Thomas Gleixner wrote: > > On Mon, 26 Jun 2017, Vikas Shivappa wrote: > > > +static void mbm_update(struct rdt_domain *d, int rmid) > > > +{ > > > + struct rmid_read rr; > > > + > > > + rr.first = false; > > > + rr.d = d; > > > + > >

Re: [PATCH 21/21] x86/intel_rdt/mbm: Handle counter overflow

2017-07-06 Thread Shivappa Vikas
On Sun, 2 Jul 2017, Thomas Gleixner wrote: On Mon, 26 Jun 2017, Vikas Shivappa wrote: +static void mbm_update(struct rdt_domain *d, int rmid) +{ + struct rmid_read rr; + + rr.first = false; + rr.d = d; + + if (is_mbm_total_enabled()) { + rr.evtid =

Re: [PATCH 21/21] x86/intel_rdt/mbm: Handle counter overflow

2017-07-06 Thread Shivappa Vikas
On Sun, 2 Jul 2017, Thomas Gleixner wrote: On Mon, 26 Jun 2017, Vikas Shivappa wrote: +static void mbm_update(struct rdt_domain *d, int rmid) +{ + struct rmid_read rr; + + rr.first = false; + rr.d = d; + + if (is_mbm_total_enabled()) { + rr.evtid =

Re: [PATCH 21/21] x86/intel_rdt/mbm: Handle counter overflow

2017-07-02 Thread Thomas Gleixner
On Mon, 26 Jun 2017, Vikas Shivappa wrote: > +static void mbm_update(struct rdt_domain *d, int rmid) > +{ > + struct rmid_read rr; > + > + rr.first = false; > + rr.d = d; > + > + if (is_mbm_total_enabled()) { > + rr.evtid = QOS_L3_MBM_TOTAL_EVENT_ID; > +

Re: [PATCH 21/21] x86/intel_rdt/mbm: Handle counter overflow

2017-07-02 Thread Thomas Gleixner
On Mon, 26 Jun 2017, Vikas Shivappa wrote: > +static void mbm_update(struct rdt_domain *d, int rmid) > +{ > + struct rmid_read rr; > + > + rr.first = false; > + rr.d = d; > + > + if (is_mbm_total_enabled()) { > + rr.evtid = QOS_L3_MBM_TOTAL_EVENT_ID; > +

[PATCH 21/21] x86/intel_rdt/mbm: Handle counter overflow

2017-06-26 Thread Vikas Shivappa
Set up a delayed work queue for each domain that will read all the MBM counters of active RMIDs once per second to make sure that they don't wrap around between reads from users. [Tony: Added the initializations for the work structure and completed the patch] Signed-off-by: Tony Luck

[PATCH 21/21] x86/intel_rdt/mbm: Handle counter overflow

2017-06-26 Thread Vikas Shivappa
Set up a delayed work queue for each domain that will read all the MBM counters of active RMIDs once per second to make sure that they don't wrap around between reads from users. [Tony: Added the initializations for the work structure and completed the patch] Signed-off-by: Tony Luck