Re: [GIT pull] x86/cache: Updates for 4.10

From: Thomas Gleixner
Date: Tue Dec 13 2016 - 04:04:13 EST


On Mon, 12 Dec 2016, Linus Torvalds wrote:

> On Mon, Dec 12, 2016 at 1:53 AM, Thomas Gleixner <tglx@xxxxxxxxxxxxx> wrote:
> >
> > This update provides the support for Intel Cache Allocation Technology, a
> > cache partitioning mechanism.

Sorry for being terse in the pull request.

> Ugh, this is some funky stuff. And it's entirely x86-specific, with a
> rather odd special filesystem interface.

Yes. The interface is odd, but the hardware interface of that CAT stuff is
odd as well.

We tried hard to come up with an abstraction, but that only allows rather
simple partitioning, but no way of sharing and dealing with the per package
nature of this mechanism.

In the end we decided to expose the allocation bitmaps directly so all
combinations of the hardware can be utilized.

There are two ways of associating a cache partition:

- Task

A task can be added to a resource group. It uses the cache partition
associated to the group.

- CPU

All tasks which are not member of a resource group use the group to
which the CPU they are running on is associated with.

That allows for simple CPU based partitioning schemes.

> It looks pretty self-contained (good), but it also looks majorly
> strange. I will have to think about this. What are the main/expected
> users?

- Virtualization so a VM can only trash only the associated part of the
cash w/o disturbing others

- Real-Time systems to seperate RT and general workloads.

- Latency sensitive enterprise workloads

- In theory this also can be used to protect against cache side channel
attacks.

Thanks,

tglx