Re: [PATCH v4 13/18] x86/intel_rdt: Add mkdir to resctrl file system

2016-10-18 Thread Thomas Gleixner
On Mon, 17 Oct 2016, Luck, Tony wrote: > On Tue, Oct 18, 2016 at 01:20:36AM +0200, Thomas Gleixner wrote: > > It's certainly not perfect (missing L2 etc.), but clearly avoids exactly > > the above issues. And it would allow you to utilize the 256 groups in an > > understandable way. > > If you hea

Re: [PATCH v4 13/18] x86/intel_rdt: Add mkdir to resctrl file system

2016-10-17 Thread Fenghua Yu
On Mon, Oct 17, 2016 at 04:37:30PM -0700, Luck, Tony wrote: > On Tue, Oct 18, 2016 at 01:20:36AM +0200, Thomas Gleixner wrote: > > On Mon, 17 Oct 2016, Fenghua Yu wrote: > > > part0: L3:0=1;1=1 closid0/cbm=1 on cache0 and closid0/cbm=1 on > > > cache1 > > > (closid 15 on cache0 combined with

Re: [PATCH v4 13/18] x86/intel_rdt: Add mkdir to resctrl file system

2016-10-17 Thread Luck, Tony
On Tue, Oct 18, 2016 at 01:20:36AM +0200, Thomas Gleixner wrote: > On Mon, 17 Oct 2016, Fenghua Yu wrote: > > part0: L3:0=1;1=1 closid0/cbm=1 on cache0 and closid0/cbm=1 on cache1 > > (closid 15 on cache0 combined with 16 different closids on cache1) > > ... > > part254: L3:0=;1=7fff cl

RE: [PATCH v4 13/18] x86/intel_rdt: Add mkdir to resctrl file system

2016-10-17 Thread Thomas Gleixner
On Mon, 17 Oct 2016, Luck, Tony wrote: > > How so? CLOSID 9 is using CLOSID 1 L2 settings. Are we just keeping the L2 > > setting of CLOSID 1 around and do not reset it to default? > > No. When CLOSID 9 arrives at the L2 h/w, it doesn't just take the bits it > likes an discard the high bits to ma

Re: [PATCH v4 13/18] x86/intel_rdt: Add mkdir to resctrl file system

2016-10-17 Thread Thomas Gleixner
On Mon, 17 Oct 2016, Fenghua Yu wrote: > part0: L3:0=1;1=1 closid0/cbm=1 on cache0 and closid0/cbm=1 on cache1 > (closid 15 on cache0 combined with 16 different closids on cache1) > ... > part254: L3:0=;1=7fff closid15/cbm= on cache0 and closid14/cbm=7fff > on cache1 > part255: L3:

RE: [PATCH v4 13/18] x86/intel_rdt: Add mkdir to resctrl file system

2016-10-17 Thread Luck, Tony
> How so? CLOSID 9 is using CLOSID 1 L2 settings. Are we just keeping the L2 > setting of CLOSID 1 around and do not reset it to default? No. When CLOSID 9 arrives at the L2 h/w, it doesn't just take the bits it likes an discard the high bits to map to L2_CBM[1]. It just turns into into the maxim

RE: [PATCH v4 13/18] x86/intel_rdt: Add mkdir to resctrl file system

2016-10-17 Thread Thomas Gleixner
On Mon, 17 Oct 2016, Luck, Tony wrote: > > So how are we going to deal with that in the schematas? Assume the L3=16 > > and L2=8 case(no CDP). So effectively any write of L2 to CLOSID=0 will > > affect the setting of L2 in CLOSID=8. > > > > Will the code tell the user that L2 cannot be set for CLOS

RE: [PATCH v4 13/18] x86/intel_rdt: Add mkdir to resctrl file system

2016-10-17 Thread Luck, Tony
> So how are we going to deal with that in the schematas? Assume the L3=16 > and L2=8 case(no CDP). So effectively any write of L2 to CLOSID=0 will > affect the setting of L2 in CLOSID=8. > > Will the code tell the user that L2 cannot be set for CLOSID >= 8? > > Will it print the setting of CLOSID

Re: [PATCH v4 13/18] x86/intel_rdt: Add mkdir to resctrl file system

2016-10-17 Thread Thomas Gleixner
On Mon, 17 Oct 2016, Luck, Tony wrote: > On Mon, Oct 17, 2016 at 11:14:55PM +0200, Thomas Gleixner wrote: > > > + /* Compute rdt_max_closid across all resources */ > > > + rdt_max_closid = 0; > > > + for_each_rdt_resource(r) > > > + rdt_max_closid = max(rdt_max_closid, r->num_closid); > >

Re: [PATCH v4 13/18] x86/intel_rdt: Add mkdir to resctrl file system

2016-10-17 Thread Fenghua Yu
On Mon, Oct 17, 2016 at 11:14:55PM +0200, Thomas Gleixner wrote: > On Fri, 14 Oct 2016, Fenghua Yu wrote: > > +/* > > + * Trivial allocator for CLOSIDs. Since h/w only supports a small number, > > + * we can keep a bitmap of free CLOSIDs in a single integer. > > + * > > + * Please note: This only s

Re: [PATCH v4 13/18] x86/intel_rdt: Add mkdir to resctrl file system

2016-10-17 Thread Luck, Tony
On Mon, Oct 17, 2016 at 11:14:55PM +0200, Thomas Gleixner wrote: > > + /* Compute rdt_max_closid across all resources */ > > + rdt_max_closid = 0; > > + for_each_rdt_resource(r) > > + rdt_max_closid = max(rdt_max_closid, r->num_closid); > > Oh no! This needs to be min(). > > Assum

Re: [PATCH v4 13/18] x86/intel_rdt: Add mkdir to resctrl file system

2016-10-17 Thread Thomas Gleixner
On Fri, 14 Oct 2016, Fenghua Yu wrote: > +/* > + * Trivial allocator for CLOSIDs. Since h/w only supports a small number, > + * we can keep a bitmap of free CLOSIDs in a single integer. > + * > + * Please note: This only supports global CLOSID across multiple > + * resources and multiple sockets. U