Re: [PATCH V15 00/11] x86: Intel Cache Allocation Technology Support

From: Marcelo Tosatti
Date: Mon Oct 19 2015 - 19:49:41 EST


On Fri, Oct 16, 2015 at 05:24:42PM -0300, Marcelo Tosatti wrote:
> On Fri, Oct 16, 2015 at 11:44:52AM +0200, Peter Zijlstra wrote:
> > On Thu, Oct 15, 2015 at 09:17:16PM -0300, Marcelo Tosatti wrote:
> > > On Thu, Oct 15, 2015 at 01:37:02PM +0200, Peter Zijlstra wrote:
> > > > On Tue, Oct 13, 2015 at 07:40:58PM -0300, Marcelo Tosatti wrote:
> > > > > How can you fix the issue of sockets with different reserved cache
> > > > > regions with hw in the cgroup interface?
> > > >
> > > > No idea what you're referring to. But IOCTLs blow.
> > >
> > > Tejun brought up syscalls. Syscalls seem too generic.
> > > So ioctls were chosen instead.
> > >
> > > It is necessary to perform the following operations:
> > >
> > > 1) create cache reservation (params = size, type).
> >
> > mkdir

You need to specify type and size. So could be:

cd ../cgroups/intel_cat_cgroup/
mkdir reservation-a
cd reservation-a
echo 1000 > size
echo code > type
echo $pid > tasks

So each directory in the intel cat cgroup specifies a reservation, which
contains:
* size.
* type.
* tasks which the reservation is attached to.

> > > 2) delete cache reservation.
> >
> > rmdir

Detach would simply work when removing tasks from "tasks" field.

> > > 3) attach cache reservation (params = cache reservation id, pid).
> > > 4) detach cache reservation (params = cache reservation id, pid).
> >
> > echo $pid > tasks
> >
> > > Can it done via cgroups? If so, works for me.
> >
> > Trivially.
>
> Fine.
>
> Tejun brought the problem of locking: how do you coordinate locking
> between different users? (on the mkdir / rmdir scenario above).

Can't see locking issue with "reservation" based interface (that is each
directory is a cache reservation).

Tejun, any comments on this non hierarchical cgroup interface?

(still waiting on you to reply the other emails on this thread, Peter).

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/