Re: [RFC PATCH V2 13/22] x86/intel_rdt: Support schemata write - pseudo-locking core

2018-02-28 Thread Thomas Gleixner
On Wed, 28 Feb 2018, Reinette Chatre wrote: > On 2/28/2018 10:39 AM, Thomas Gleixner wrote: > > I came up with this under the assumptions: > > > > 1) One locked region per resource group > > 2) Drop closid after locking > > I am also now working under these assumptions ... > > > Then the

Re: [RFC PATCH V2 13/22] x86/intel_rdt: Support schemata write - pseudo-locking core

2018-02-28 Thread Thomas Gleixner
On Wed, 28 Feb 2018, Reinette Chatre wrote: > On 2/28/2018 10:39 AM, Thomas Gleixner wrote: > > I came up with this under the assumptions: > > > > 1) One locked region per resource group > > 2) Drop closid after locking > > I am also now working under these assumptions ... > > > Then the

Re: [RFC PATCH V2 13/22] x86/intel_rdt: Support schemata write - pseudo-locking core

2018-02-28 Thread Reinette Chatre
Hi Thomas, On 2/28/2018 10:39 AM, Thomas Gleixner wrote: > On Tue, 27 Feb 2018, Reinette Chatre wrote: >> On 2/27/2018 2:36 AM, Thomas Gleixner wrote: >>> On Mon, 26 Feb 2018, Reinette Chatre wrote: Moving to "exclusive" mode it appears that, when enabled for a resource group, all

Re: [RFC PATCH V2 13/22] x86/intel_rdt: Support schemata write - pseudo-locking core

2018-02-28 Thread Reinette Chatre
Hi Thomas, On 2/28/2018 10:39 AM, Thomas Gleixner wrote: > On Tue, 27 Feb 2018, Reinette Chatre wrote: >> On 2/27/2018 2:36 AM, Thomas Gleixner wrote: >>> On Mon, 26 Feb 2018, Reinette Chatre wrote: Moving to "exclusive" mode it appears that, when enabled for a resource group, all

Re: [RFC PATCH V2 13/22] x86/intel_rdt: Support schemata write - pseudo-locking core

2018-02-28 Thread Thomas Gleixner
On Wed, 28 Feb 2018, Reinette Chatre wrote: > On 2/28/2018 9:59 AM, Thomas Gleixner wrote: > I hesitated doing something like this because during the review of this > series there was resistance to using sysfs files for multiple values. I > will proceed with your suggestion noting that it is tied

Re: [RFC PATCH V2 13/22] x86/intel_rdt: Support schemata write - pseudo-locking core

2018-02-28 Thread Thomas Gleixner
On Wed, 28 Feb 2018, Reinette Chatre wrote: > On 2/28/2018 9:59 AM, Thomas Gleixner wrote: > I hesitated doing something like this because during the review of this > series there was resistance to using sysfs files for multiple values. I > will proceed with your suggestion noting that it is tied

Re: [RFC PATCH V2 13/22] x86/intel_rdt: Support schemata write - pseudo-locking core

2018-02-28 Thread Thomas Gleixner
Reinette, On Tue, 27 Feb 2018, Reinette Chatre wrote: > On 2/27/2018 2:36 AM, Thomas Gleixner wrote: > > On Mon, 26 Feb 2018, Reinette Chatre wrote: > >> A change to start us off with could be to initialize the schemata with > >> all the shareable and unused bits set for all domains when a new >

Re: [RFC PATCH V2 13/22] x86/intel_rdt: Support schemata write - pseudo-locking core

2018-02-28 Thread Thomas Gleixner
Reinette, On Tue, 27 Feb 2018, Reinette Chatre wrote: > On 2/27/2018 2:36 AM, Thomas Gleixner wrote: > > On Mon, 26 Feb 2018, Reinette Chatre wrote: > >> A change to start us off with could be to initialize the schemata with > >> all the shareable and unused bits set for all domains when a new >

Re: [RFC PATCH V2 13/22] x86/intel_rdt: Support schemata write - pseudo-locking core

2018-02-28 Thread Reinette Chatre
Hi Thomas, On 2/28/2018 9:59 AM, Thomas Gleixner wrote: > On Wed, 28 Feb 2018, Thomas Gleixner wrote: >> On Tue, 27 Feb 2018, Reinette Chatre wrote: >>> On 2/20/2018 9:15 AM, Thomas Gleixner wrote: Let's look at the existing crtl/mon groups which are each represented by a directory

Re: [RFC PATCH V2 13/22] x86/intel_rdt: Support schemata write - pseudo-locking core

2018-02-28 Thread Reinette Chatre
Hi Thomas, On 2/28/2018 9:59 AM, Thomas Gleixner wrote: > On Wed, 28 Feb 2018, Thomas Gleixner wrote: >> On Tue, 27 Feb 2018, Reinette Chatre wrote: >>> On 2/20/2018 9:15 AM, Thomas Gleixner wrote: Let's look at the existing crtl/mon groups which are each represented by a directory

Re: [RFC PATCH V2 13/22] x86/intel_rdt: Support schemata write - pseudo-locking core

2018-02-28 Thread Thomas Gleixner
On Wed, 28 Feb 2018, Thomas Gleixner wrote: > On Tue, 27 Feb 2018, Reinette Chatre wrote: > > On 2/20/2018 9:15 AM, Thomas Gleixner wrote: > > > Let's look at the existing crtl/mon groups which are each represented by a > > > directory already. > > > > > > - Adding a 'size' file to the ctrl

Re: [RFC PATCH V2 13/22] x86/intel_rdt: Support schemata write - pseudo-locking core

2018-02-28 Thread Thomas Gleixner
On Wed, 28 Feb 2018, Thomas Gleixner wrote: > On Tue, 27 Feb 2018, Reinette Chatre wrote: > > On 2/20/2018 9:15 AM, Thomas Gleixner wrote: > > > Let's look at the existing crtl/mon groups which are each represented by a > > > directory already. > > > > > > - Adding a 'size' file to the ctrl

Re: [RFC PATCH V2 13/22] x86/intel_rdt: Support schemata write - pseudo-locking core

2018-02-28 Thread Thomas Gleixner
On Tue, 27 Feb 2018, Reinette Chatre wrote: > On 2/20/2018 9:15 AM, Thomas Gleixner wrote: > > Let's look at the existing crtl/mon groups which are each represented by a > > directory already. > > > > - Adding a 'size' file to the ctrl groups would be a natural extension > >which makes sense

Re: [RFC PATCH V2 13/22] x86/intel_rdt: Support schemata write - pseudo-locking core

2018-02-28 Thread Thomas Gleixner
On Tue, 27 Feb 2018, Reinette Chatre wrote: > On 2/20/2018 9:15 AM, Thomas Gleixner wrote: > > Let's look at the existing crtl/mon groups which are each represented by a > > directory already. > > > > - Adding a 'size' file to the ctrl groups would be a natural extension > >which makes sense

Re: [RFC PATCH V2 13/22] x86/intel_rdt: Support schemata write - pseudo-locking core

2018-02-27 Thread Reinette Chatre
Hi Thomas, On 2/27/2018 11:52 AM, Reinette Chatre wrote: > On 2/27/2018 2:36 AM, Thomas Gleixner wrote: >> Let's assume its real, >> so you could do the following: >> >> mkdir group <- acquires closid >> echo locksetup > mode<- Creates 'lockarea' file >> echo L2:0 > lockarea >>

Re: [RFC PATCH V2 13/22] x86/intel_rdt: Support schemata write - pseudo-locking core

2018-02-27 Thread Reinette Chatre
Hi Thomas, On 2/27/2018 11:52 AM, Reinette Chatre wrote: > On 2/27/2018 2:36 AM, Thomas Gleixner wrote: >> Let's assume its real, >> so you could do the following: >> >> mkdir group <- acquires closid >> echo locksetup > mode<- Creates 'lockarea' file >> echo L2:0 > lockarea >>

Re: [RFC PATCH V2 13/22] x86/intel_rdt: Support schemata write - pseudo-locking core

2018-02-27 Thread Reinette Chatre
Hi Thomas, On 2/20/2018 9:15 AM, Thomas Gleixner wrote: > Let's look at the existing crtl/mon groups which are each represented by a > directory already. > > - Adding a 'size' file to the ctrl groups would be a natural extension >which makes sense for regular cache allocations as well. >

Re: [RFC PATCH V2 13/22] x86/intel_rdt: Support schemata write - pseudo-locking core

2018-02-27 Thread Reinette Chatre
Hi Thomas, On 2/20/2018 9:15 AM, Thomas Gleixner wrote: > Let's look at the existing crtl/mon groups which are each represented by a > directory already. > > - Adding a 'size' file to the ctrl groups would be a natural extension >which makes sense for regular cache allocations as well. >

Re: [RFC PATCH V2 13/22] x86/intel_rdt: Support schemata write - pseudo-locking core

2018-02-27 Thread Reinette Chatre
Hi Thomas, On 2/27/2018 2:36 AM, Thomas Gleixner wrote: > On Mon, 26 Feb 2018, Reinette Chatre wrote: >> A change to start us off with could be to initialize the schemata with >> all the shareable and unused bits set for all domains when a new >> resource group is created. > > The new resource

Re: [RFC PATCH V2 13/22] x86/intel_rdt: Support schemata write - pseudo-locking core

2018-02-27 Thread Reinette Chatre
Hi Thomas, On 2/27/2018 2:36 AM, Thomas Gleixner wrote: > On Mon, 26 Feb 2018, Reinette Chatre wrote: >> A change to start us off with could be to initialize the schemata with >> all the shareable and unused bits set for all domains when a new >> resource group is created. > > The new resource

Re: [RFC PATCH V2 13/22] x86/intel_rdt: Support schemata write - pseudo-locking core

2018-02-27 Thread Thomas Gleixner
On Tue, 27 Feb 2018, Thomas Gleixner wrote: > On Mon, 26 Feb 2018, Reinette Chatre wrote: > > Moving to "exclusive" mode it appears that, when enabled for a resource > > group, all domains of all resources are forced to have an "exclusive" > > region associated with this resource group (closid).

Re: [RFC PATCH V2 13/22] x86/intel_rdt: Support schemata write - pseudo-locking core

2018-02-27 Thread Thomas Gleixner
On Tue, 27 Feb 2018, Thomas Gleixner wrote: > On Mon, 26 Feb 2018, Reinette Chatre wrote: > > Moving to "exclusive" mode it appears that, when enabled for a resource > > group, all domains of all resources are forced to have an "exclusive" > > region associated with this resource group (closid).

Re: [RFC PATCH V2 13/22] x86/intel_rdt: Support schemata write - pseudo-locking core

2018-02-27 Thread Thomas Gleixner
Reinette, On Mon, 26 Feb 2018, Reinette Chatre wrote: > I started looking at how this implementation may look and would like to > confirm with you that your intentions behind the new "exclusive" and > "locked" modes can be maintained. I also have a few questions. Phew :) > Focusing on CAT a

Re: [RFC PATCH V2 13/22] x86/intel_rdt: Support schemata write - pseudo-locking core

2018-02-27 Thread Thomas Gleixner
Reinette, On Mon, 26 Feb 2018, Reinette Chatre wrote: > I started looking at how this implementation may look and would like to > confirm with you that your intentions behind the new "exclusive" and > "locked" modes can be maintained. I also have a few questions. Phew :) > Focusing on CAT a

Re: [RFC PATCH V2 13/22] x86/intel_rdt: Support schemata write - pseudo-locking core

2018-02-26 Thread Reinette Chatre
Hi Thomas, On 2/20/2018 9:15 AM, Thomas Gleixner wrote: > Let's look at the existing crtl/mon groups which are each represented by a > directory already. > > - Adding a 'size' file to the ctrl groups would be a natural extension >which makes sense for regular cache allocations as well. > >

Re: [RFC PATCH V2 13/22] x86/intel_rdt: Support schemata write - pseudo-locking core

2018-02-26 Thread Reinette Chatre
Hi Thomas, On 2/20/2018 9:15 AM, Thomas Gleixner wrote: > Let's look at the existing crtl/mon groups which are each represented by a > directory already. > > - Adding a 'size' file to the ctrl groups would be a natural extension >which makes sense for regular cache allocations as well. > >

Re: [RFC PATCH V2 13/22] x86/intel_rdt: Support schemata write - pseudo-locking core

2018-02-21 Thread Thomas Gleixner
On Tue, 20 Feb 2018, Mike Kravetz wrote: > On 02/20/2018 03:21 PM, Thomas Gleixner wrote: > > The other problem is that we'd need to have MAP_CONTIG first so you > > actually can allocate physically contigous memory from user space. Mike is > > working on that, but it's not available today. The

Re: [RFC PATCH V2 13/22] x86/intel_rdt: Support schemata write - pseudo-locking core

2018-02-21 Thread Thomas Gleixner
On Tue, 20 Feb 2018, Mike Kravetz wrote: > On 02/20/2018 03:21 PM, Thomas Gleixner wrote: > > The other problem is that we'd need to have MAP_CONTIG first so you > > actually can allocate physically contigous memory from user space. Mike is > > working on that, but it's not available today. The

Re: [RFC PATCH V2 13/22] x86/intel_rdt: Support schemata write - pseudo-locking core

2018-02-20 Thread Reinette Chatre
Hi Mike, On 2/20/2018 5:58 PM, Mike Kravetz wrote: > On 02/20/2018 03:21 PM, Thomas Gleixner wrote: >> On Tue, 20 Feb 2018, Reinette Chatre wrote: >>> On 2/20/2018 9:15 AM, Thomas Gleixner wrote: On Tue, 13 Feb 2018, Reinette Chatre wrote: Now the remaining thing is the memory

Re: [RFC PATCH V2 13/22] x86/intel_rdt: Support schemata write - pseudo-locking core

2018-02-20 Thread Reinette Chatre
Hi Mike, On 2/20/2018 5:58 PM, Mike Kravetz wrote: > On 02/20/2018 03:21 PM, Thomas Gleixner wrote: >> On Tue, 20 Feb 2018, Reinette Chatre wrote: >>> On 2/20/2018 9:15 AM, Thomas Gleixner wrote: On Tue, 13 Feb 2018, Reinette Chatre wrote: Now the remaining thing is the memory

Re: [RFC PATCH V2 13/22] x86/intel_rdt: Support schemata write - pseudo-locking core

2018-02-20 Thread Reinette Chatre
Hi Thomas, On 2/20/2018 3:21 PM, Thomas Gleixner wrote: > On Tue, 20 Feb 2018, Reinette Chatre wrote: >> On 2/20/2018 9:15 AM, Thomas Gleixner wrote: >>> On Tue, 13 Feb 2018, Reinette Chatre wrote: >>> >>> Are you really sure that the life time rules of plr are correct vs. an >>> application

Re: [RFC PATCH V2 13/22] x86/intel_rdt: Support schemata write - pseudo-locking core

2018-02-20 Thread Reinette Chatre
Hi Thomas, On 2/20/2018 3:21 PM, Thomas Gleixner wrote: > On Tue, 20 Feb 2018, Reinette Chatre wrote: >> On 2/20/2018 9:15 AM, Thomas Gleixner wrote: >>> On Tue, 13 Feb 2018, Reinette Chatre wrote: >>> >>> Are you really sure that the life time rules of plr are correct vs. an >>> application

Re: [RFC PATCH V2 13/22] x86/intel_rdt: Support schemata write - pseudo-locking core

2018-02-20 Thread Mike Kravetz
On 02/20/2018 03:21 PM, Thomas Gleixner wrote: > On Tue, 20 Feb 2018, Reinette Chatre wrote: >> On 2/20/2018 9:15 AM, Thomas Gleixner wrote: >>> On Tue, 13 Feb 2018, Reinette Chatre wrote: >>> >>> Now the remaining thing is the memory allocation and the mmap itself. I >>> really dislike the

Re: [RFC PATCH V2 13/22] x86/intel_rdt: Support schemata write - pseudo-locking core

2018-02-20 Thread Mike Kravetz
On 02/20/2018 03:21 PM, Thomas Gleixner wrote: > On Tue, 20 Feb 2018, Reinette Chatre wrote: >> On 2/20/2018 9:15 AM, Thomas Gleixner wrote: >>> On Tue, 13 Feb 2018, Reinette Chatre wrote: >>> >>> Now the remaining thing is the memory allocation and the mmap itself. I >>> really dislike the

Re: [RFC PATCH V2 13/22] x86/intel_rdt: Support schemata write - pseudo-locking core

2018-02-20 Thread Thomas Gleixner
Reinette, On Tue, 20 Feb 2018, Reinette Chatre wrote: > On 2/20/2018 9:15 AM, Thomas Gleixner wrote: > > On Tue, 13 Feb 2018, Reinette Chatre wrote: > > > > Are you really sure that the life time rules of plr are correct vs. an > > application which still has the locked memory mapped? i.e. the

Re: [RFC PATCH V2 13/22] x86/intel_rdt: Support schemata write - pseudo-locking core

2018-02-20 Thread Thomas Gleixner
Reinette, On Tue, 20 Feb 2018, Reinette Chatre wrote: > On 2/20/2018 9:15 AM, Thomas Gleixner wrote: > > On Tue, 13 Feb 2018, Reinette Chatre wrote: > > > > Are you really sure that the life time rules of plr are correct vs. an > > application which still has the locked memory mapped? i.e. the

Re: [RFC PATCH V2 13/22] x86/intel_rdt: Support schemata write - pseudo-locking core

2018-02-20 Thread Reinette Chatre
Hi Thomas, On 2/20/2018 9:15 AM, Thomas Gleixner wrote: > On Tue, 13 Feb 2018, Reinette Chatre wrote: >> static void __pseudo_lock_region_release(struct pseudo_lock_region *plr) >> { >> bool is_new_plr = (plr == new_plr); >> @@ -93,6 +175,23 @@ static void

Re: [RFC PATCH V2 13/22] x86/intel_rdt: Support schemata write - pseudo-locking core

2018-02-20 Thread Reinette Chatre
Hi Thomas, On 2/20/2018 9:15 AM, Thomas Gleixner wrote: > On Tue, 13 Feb 2018, Reinette Chatre wrote: >> static void __pseudo_lock_region_release(struct pseudo_lock_region *plr) >> { >> bool is_new_plr = (plr == new_plr); >> @@ -93,6 +175,23 @@ static void

Re: [RFC PATCH V2 13/22] x86/intel_rdt: Support schemata write - pseudo-locking core

2018-02-20 Thread Thomas Gleixner
On Tue, 13 Feb 2018, Reinette Chatre wrote: > static void __pseudo_lock_region_release(struct pseudo_lock_region *plr) > { > bool is_new_plr = (plr == new_plr); > @@ -93,6 +175,23 @@ static void __pseudo_lock_region_release(struct > pseudo_lock_region *plr) > if (!plr->deleted) >

Re: [RFC PATCH V2 13/22] x86/intel_rdt: Support schemata write - pseudo-locking core

2018-02-20 Thread Thomas Gleixner
On Tue, 13 Feb 2018, Reinette Chatre wrote: > static void __pseudo_lock_region_release(struct pseudo_lock_region *plr) > { > bool is_new_plr = (plr == new_plr); > @@ -93,6 +175,23 @@ static void __pseudo_lock_region_release(struct > pseudo_lock_region *plr) > if (!plr->deleted) >

[RFC PATCH V2 13/22] x86/intel_rdt: Support schemata write - pseudo-locking core

2018-02-13 Thread Reinette Chatre
When a user writes the requested pseudo-locking schemata it will trigger the pseudo-locking of equivalent sized memory. A successful return from this schemata write means that the pseudo-locking succeeded. To support the pseudo-locking we first initialize as much as we can about the region that

[RFC PATCH V2 13/22] x86/intel_rdt: Support schemata write - pseudo-locking core

2018-02-13 Thread Reinette Chatre
When a user writes the requested pseudo-locking schemata it will trigger the pseudo-locking of equivalent sized memory. A successful return from this schemata write means that the pseudo-locking succeeded. To support the pseudo-locking we first initialize as much as we can about the region that