From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751822AbbJSXti (ORCPT ); Mon, 19 Oct 2015 19:49:38 -0400 Received: from mx1.redhat.com ([209.132.183.28]:42125 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750814AbbJSXth (ORCPT ); Mon, 19 Oct 2015 19:49:37 -0400 Date: Mon, 19 Oct 2015 21:49:10 -0200 From: Marcelo Tosatti To: Peter Zijlstra Cc: "Yu, Fenghua" , Thomas Gleixner , H Peter Anvin , Ingo Molnar , linux-kernel , x86 , Vikas Shivappa Subject: Re: [PATCH V15 00/11] x86: Intel Cache Allocation Technology Support Message-ID: <20151019234908.GA4211@amt.cnet> References: <1443766185-61618-1-git-send-email-fenghua.yu@intel.com> <3E5A0FA7E9CA944F9D5414FEC6C712205DE5C9EE@ORSMSX106.amr.corp.intel.com> <20151013224058.GA19373@amt.cnet> <20151015113702.GM3816@twins.programming.kicks-ass.net> <20151016001715.GB31794@amt.cnet> <20151016094452.GO3816@twins.programming.kicks-ass.net> <20151016202439.GA27055@amt.cnet> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20151016202439.GA27055@amt.cnet> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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).