Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752836AbbKPOk5 (ORCPT ); Mon, 16 Nov 2015 09:40:57 -0500 Received: from mx1.redhat.com ([209.132.183.28]:50074 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752276AbbKPOhb (ORCPT ); Mon, 16 Nov 2015 09:37:31 -0500 Date: Mon, 16 Nov 2015 12:37:08 -0200 From: Marcelo Tosatti To: Peter Zijlstra Cc: Luiz Capitulino , Thomas Gleixner , Vikas Shivappa , Tejun Heo , Yu Fenghua , linux-kernel@vger.kernel.org Subject: Re: [PATCH RFC] ioctl based CAT interface Message-ID: <20151116143708.GA26877@amt.cnet> References: <20151113163933.GA10222@amt.cnet> <20151113165100.GI17308@twins.programming.kicks-ass.net> <20151113173303.GB13490@amt.cnet> <20151116090756.GM17308@twins.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20151116090756.GM17308@twins.programming.kicks-ass.net> 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 Content-Length: 2473 Lines: 79 On Mon, Nov 16, 2015 at 10:07:56AM +0100, Peter Zijlstra wrote: > On Fri, Nov 13, 2015 at 03:33:04PM -0200, Marcelo Tosatti wrote: > > On Fri, Nov 13, 2015 at 05:51:00PM +0100, Peter Zijlstra wrote: > > > On Fri, Nov 13, 2015 at 02:39:33PM -0200, Marcelo Tosatti wrote: > > > > + * * one tcrid entry can be in different locations > > > > + * in different sockets. > > > > > > NAK on that without cpuset integration. > > > > > > I do not want freely migratable tasks having radically different > > > performance profiles depending on which CPU they land. > > > > Ok, so, configuration: > > > > > > Socket-1 Socket-2 > > > > pinned thread-A with 100% L3 free > > 80% of L3 > > reserved > > > > > > So it is a problem if a thread running on socket-2 is scheduled to > > socket-1 because performance is radically different, fine. > > > > Then one way to avoid that is to not allow freely migratable tasks > > to move to Socket-1. Fine. > > > > Then you want to use cpusets for that. > > > > Can you fill in the blanks what is missing here? > > I'm still not seeing what the problem with CAT-cgroup is. > > /cgroups/cpuset/ > socket-1/cpus = $socket-1 > tasks = $thread-A > > socket-2/cpus = $socket-2 > tasks = $thread-B > > /cgroups/cat/ > group-A/bitmap = 0x3F / 0xFF > group-A/tasks = $thread-A > > group-B/bitmap = 0xFF / 0xFF > group-B/tasks = $thread-B > > > That gets you thread-A on socket-1 with 6/8 of the L3 and thread-B on > socket-2 with 8/8 of the L3. - need bitmasks per socket (optionally). - format kept in kernel is not universal (have to convert every time L3 cache size changes). - need to specify type (i-cache or d-cache, differentiation supported on newer processors), ok can add more bitmaps. - position in bitmask represents nothing other than identification of reservation and size, so: group-A = 0x3F, group-B = 0xFF is the same as group-A = 0xFC, group-B = 0xFF - have to locate a free region every time in the bitmasks. So userspace has to do: # lock write access to /cgroups/cat/ create group-C, taking into account bitmasks of group-A and group-B. # unlock write access to /cgroups/cat. But OK, it works, lets use that. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/