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

From: Thomas Gleixner
Date: Tue Jul 19 2016 - 08:34:51 EST


On Thu, 14 Jul 2016, Luck, Tony wrote:
> 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;
> }

That can be done simpler. The default cpu_rdtgroup should be root_rdtgroup. So
you spare one conditional.

Thanks

tglx