Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752910AbbKPQs6 (ORCPT ); Mon, 16 Nov 2015 11:48:58 -0500 Received: from mx1.redhat.com ([209.132.183.28]:43588 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752399AbbKPQs5 (ORCPT ); Mon, 16 Nov 2015 11:48:57 -0500 Date: Mon, 16 Nov 2015 11:48:55 -0500 From: Luiz Capitulino To: Peter Zijlstra Cc: Marcelo Tosatti , Thomas Gleixner , Vikas Shivappa , Tejun Heo , Yu Fenghua , linux-kernel@vger.kernel.org Subject: Re: [PATCH RFC] ioctl based CAT interface Message-ID: <20151116114855.4f5f79b7@redhat.com> In-Reply-To: <20151116162657.GX17308@twins.programming.kicks-ass.net> References: <20151113163933.GA10222@amt.cnet> <20151113165100.GI17308@twins.programming.kicks-ass.net> <20151113173303.GB13490@amt.cnet> <20151116090756.GM17308@twins.programming.kicks-ass.net> <20151116111842.0c0a30f9@redhat.com> <20151116162657.GX17308@twins.programming.kicks-ass.net> Organization: Red Hat MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2997 Lines: 57 On Mon, 16 Nov 2015 17:26:57 +0100 Peter Zijlstra wrote: > On Mon, Nov 16, 2015 at 11:18:42AM -0500, Luiz Capitulino wrote: > > Peter, I'm giving a serious try on the cgroups patches and would be > > glad to be enlightened if I'm missing something. But I don't see how > > what you're proposing would solve the problem. > > > > My understanding of CAT is that if I want to reserve 80% of the cache > > in socket-1 to $thread-A I also have to: > > > > 1. Create another mask reserving 20% of the cache in socket-1 > > 2. Assign that mask to all other threads that may run in socket-1 > > > > If I'm right about this, then when a task with 20% reservation migrates > > to socket-2 it will only access 20% of the cache there even though there > > should be no restrictions in socket-2's cache. > > Uh what? Task-A was bound to socket-1, it will never get to socket-2. Sure, but you're going to allow other threads besides Task-A to execute in socket-1 too, right? In this case, my understanding of CAT is that those threads will require a mask to restrict them to only 20% of the cache. > Clearly I'm not getting these examples you're throwing around. It's the "Isolated Bitmask" example from the Intel Manual p. 616 (You'll find the excerpt below, but Figure 17-27 is easier to understand). My understanding of this example is that in order to isolate a portion of the cache to Task-A I also have to create a second mask which excludes bits reserved to Task-A. This second mask is assigned to all other tasks that will share the L3 cache with Task-A. """ Figure 17-27 also shows three examples of sets of Cache Capacity Bitmasks. For simplicity these are represented as 8-bit vectors, though this may vary depending on the implementation and how the mask is mapped to the avail- able cache capacity. The first example shows the default case where all 4 Classes of Service (the total number of COS are implementation-dependent) have full access to the cache. The second case shows an overlapped case, which would allow some lower-priority threads share cache space with the highest priority threads. The third case shows various non-overlapped partitioning schemes. As a matter of software policy for extensibility COS0 should typically be considered and configured as the highest priority COS, followed by COS1, and so on, though there is no hardware restriction enforcing this mapping. When the system boots all threads are initialized to COS0, which has full access to the cache by default. """ > Also, I explicitly do not want tasks that can migrate between sockets to > have different performance profiles across those sockets. I think we can solve this problem with the ioctl interface, if that's what you mean. -- 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/