Re: [PATCH 13/32] Documentation, x86: Documentation for Intel resource allocation user interface

From: Luck, Tony
Date: Thu Jul 14 2016 - 13:16:52 EST

On Thu, Jul 14, 2016 at 08:53:17AM +0200, Thomas Gleixner wrote:
> > Happy to take suggestions for something in between those
> > extremes :-)
> I'd suggest "resctrl" and the abbreviation dictionaries tell me that the most
> common ones for resource are: R, RESORC, RES

OK. "resctrl" it is.

> As a side effect that avoids the whole 'find all tasks' on mount machinery
> simply because the CPU defaults do not change at all.

That's a very good side effect.

It just means that the "tasks" file in the root of the hierachy will
need different read/write functions from those in sub-directories.

read: scan all tasks, print pid for ones with task->rdtgroup == NULL

write: remove task from the rdtgroup list that it was on; set task->rdtgroup = NULL;

> It covers almost everything except the case I outlined before:
> Isolated CPU Important Task runs on isolated CPU
> 5% exclusive cache 10% exclusive cache
> That's impossible with your scheme, but it's something which matters. You want
> to make sure that the system services on that isolated CPU stay cache hot
> without hurting the cache locality of your isolated task.

So the core part of __intel_rdt_sched_in() will look like:

* Precedence rules:
* Processes assigned to an rdtgroup use that group
* wherever they run. If they don't have an rdtgroup
* we see if the current cpu has one and use it.
* If no specific rdtgroup was provided, we use the
* root_rdtgroup
rdtgrp = current->rdtgroup;
if (!rdtgrp) {
rdtgrp = per_cpu(cpu_rdtgroup, cpu);
if (!rdtgrp)
rdtgrp = root_rdtgroup;

> > Otherwise we can revise the documentation to explain all this better.
> That needs to be done in any case. The existing one does not really qualify as
> proper documentation. It's closer to a fairy tale :)

Yes. We will re-write.