public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Matt Fleming <matt@console-pimps.org>
Cc: Vikas Shivappa <vikas.shivappa@linux.intel.com>,
	linux-kernel@vger.kernel.org,
	Matt Fleming <matt.fleming@intel.com>,
	Will Auld <will.auld@intel.com>, Tejun Heo <tj@kernel.org>,
	Vikas Shivappa <vikas.shivappa@intel.com>
Subject: Re: Cache Allocation Technology Design
Date: Wed, 29 Oct 2014 14:45:26 +0100	[thread overview]
Message-ID: <20141029134526.GC3337@twins.programming.kicks-ass.net> (raw)
In-Reply-To: <20141029124834.GQ12020@console-pimps.org>

On Wed, Oct 29, 2014 at 12:48:34PM +0000, Matt Fleming wrote:
> On Wed, 29 Oct, at 09:16:40AM, Peter Zijlstra wrote:
> > 
> > Ah, so one way around that is to only assign a (whats the CQE equivalent
> > of RMIDs again?) once you stick a task in.
>  
> I think you're after "Class of Service" (CLOS) ID.
> 
> Yeah we can do the CLOS ID assignment on-demand but what we can't do
> on-demand is the cache bitmask assignment, i.e. how we carve up the LLC.
> These need to persist irrespective of which task is running. And it's
> the cache bitmask that I'm specifically talking about not allowing
> arbitrarly deep nesting.
> 
> So if I create a cgroup directory with a mask of 0x3 in the root cgroup
> directory for CAT (meow).

All we now need is a DOG to go woof :-) and they can have a party.

> Then, create two sub-directories, and split my
> 0x3 bitmask into 0x2 and 0x1, it's impossible to nest any further, i.e.
> 
>                     /sys/fs/cgroup/cacheqe           0xffffffff
>                               |
>                               |
>                             meow                     0x3
>                            /    \
>                           /      \
>                         sub1    sub2                 0x1, 0x2
> 
> Of course the pathological case is creating a cgroup directory with
> bitmask 0x1, so you can't have sub-directories because you can't split
> the cache allocation at all.
> 
> Does this fly in the face of "full hierarchies"? Or is this a reasonable
> limitation?

I don't see a reason why we should not allow further children of sub1,
they'll all have to have 0x1, but that should be fine, pointless
perhaps, but perfectly consistent.

> > But basically it means you need to allow things like:
> > 
> > root/virt/more/crap/hostA
> >                    /hostB
> >     /sanityA
> >     /random/other/yunk
> > 
> > Now, the root will have the entire bitmask set, any child, say
> > virt/more/crap can also have them all set, and you can maybe only start
> > differentiating in the /host[AB] bits.
> > 
> > Whether or not it makes sense, libvirt likes to create these pointless
> > deep hierarchies, as do a lot of other people for that matter.
> 
> OK, this is something I hadn't considered; that you may *not* want to
> split the cache bitmask as you move down the hierarchy.
> 
> I think that's something we could do without too much pain, though
> actually programming that from a user perspective makes my head hurt.

Right, also note that in the libvirt case, most of the intermediate
groups are empty (of tasks) and would thus not actually instantiate a
CLOS thingy.

  reply	other threads:[~2014-10-29 13:45 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-16 18:44 Cache Allocation Technology Design vikas
2014-10-20 16:18 ` Matt Fleming
2014-10-24 10:53   ` Peter Zijlstra
2014-10-28 23:22     ` Matt Fleming
2014-10-29  8:16       ` Peter Zijlstra
2014-10-29 12:48         ` Matt Fleming
2014-10-29 13:45           ` Peter Zijlstra [this message]
2014-10-29 16:32             ` Auld, Will
2014-10-29 17:28               ` Peter Zijlstra
2014-10-29 17:41                 ` Vikas Shivappa
2014-10-29 18:22                   ` Tejun Heo
2014-10-30  7:07                     ` Peter Zijlstra
2014-10-30  7:14                       ` Peter Zijlstra
2014-10-30 12:44                         ` Tejun Heo
2014-10-30 13:19                           ` Peter Zijlstra
2014-10-30 15:25                             ` Tejun Heo
2014-10-30 12:43                       ` Tejun Heo
2014-10-30 13:18                         ` Peter Zijlstra
2014-10-30 17:03                           ` Tejun Heo
2014-10-30 21:43                             ` Peter Zijlstra
2014-10-30 22:22                               ` Tejun Heo
2014-10-30 22:47                                 ` Peter Zijlstra
2014-11-06 16:27                                   ` Matt Fleming
2014-11-06 17:20                                     ` Vikas Shivappa
2014-10-31 13:07                                 ` Peter Zijlstra
2014-10-31 15:58                                   ` Tejun Heo
2014-11-04 13:13                                     ` Peter Zijlstra
2014-11-05 20:41                                       ` Tejun Heo
2014-10-30 14:14                         ` Matt Fleming
     [not found]                         ` <CAAAKZwvJOKsrj_yczDGaNLaNYo+_=HzsTLwDdcaTJqO2VMy8uA@mail.gmail.com>
2014-10-30 17:12                           ` Tejun Heo
2014-10-30 22:35                             ` Tim Hockin
2014-10-31 16:57                               ` Tejun Heo
2014-10-30 23:18                         ` Vikas Shivappa
2014-11-04 13:17                           ` Peter Zijlstra
2014-11-06 17:03                             ` Matt Fleming
2014-11-10 15:50                               ` Peter Zijlstra
2014-10-29 17:26     ` Vikas Shivappa
2014-10-29 18:16       ` Peter Zijlstra
2014-11-03 23:29 ` Vikas Shivappa

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20141029134526.GC3337@twins.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=matt.fleming@intel.com \
    --cc=matt@console-pimps.org \
    --cc=tj@kernel.org \
    --cc=vikas.shivappa@intel.com \
    --cc=vikas.shivappa@linux.intel.com \
    --cc=will.auld@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox