]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit - include/linux/sched.h
x86/intel_rdt/cqm: Add tasks file support
authorVikas Shivappa <vikas.shivappa@linux.intel.com>
Tue, 25 Jul 2017 21:14:34 +0000 (14:14 -0700)
committerSeth Forshee <seth.forshee@canonical.com>
Thu, 28 Sep 2017 20:54:05 +0000 (16:54 -0400)
commit5ba6b74521cf15e1e399c61fde9178209da2d2ef
treef64802e959a4f0da4867ebfaa5ac1d9ec4a5e68e
parent703c3837470cbb80a4cd1acdf7e16d8afa0d13c9
x86/intel_rdt/cqm: Add tasks file support

BugLink: http://bugs.launchpad.net/bugs/1591609
The root directory, ctrl_mon and monitor groups are populated
with a read/write file named "tasks". When read, it shows all the task
IDs assigned to the resource group.

Tasks can be added to groups by writing the PID to the file. A task can
be present in one "ctrl_mon" group "and" one "monitor" group. IOW a
PID_x can be seen in a ctrl_mon group and a monitor group at the same
time. When a task is added to a ctrl_mon group, it is automatically
removed from the previous ctrl_mon group where it belonged. Similarly if
a task is moved to a monitor group it is removed from the previous
monitor group . Also since the monitor groups can only have subset of
tasks of parent ctrl_mon group, a task can be moved to a monitor group
only if its already present in the parent ctrl_mon group.

Task membership is indicated by a new field in the task_struct "u32
rmid" which holds the RMID for the task. RMID=0 is reserved for the
default root group where the tasks belong to at mount.

[tony: zero the rmid if rdtgroup was deleted when task was being moved]

Signed-off-by: Tony Luck <tony.luck@linux.intel.com>
Signed-off-by: Vikas Shivappa <vikas.shivappa@linux.intel.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: ravi.v.shankar@intel.com
Cc: tony.luck@intel.com
Cc: fenghua.yu@intel.com
Cc: peterz@infradead.org
Cc: eranian@google.com
Cc: vikas.shivappa@intel.com
Cc: ak@linux.intel.com
Cc: davidcc@google.com
Cc: reinette.chatre@intel.com
Link: http://lkml.kernel.org/r/1501017287-28083-16-git-send-email-vikas.shivappa@linux.intel.com
(cherry picked from commit d6aaba615a482ce7d3ec218cf7b8d02d0d5753b8)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
arch/x86/kernel/cpu/intel_rdt_rdtgroup.c
include/linux/sched.h