x86/intel_rdt/cqm: Add sched_in support
authorVikas Shivappa <vikas.shivappa@linux.intel.com>
Tue, 25 Jul 2017 21:14:43 +0000 (14:14 -0700)
committerThomas Gleixner <tglx@linutronix.de>
Tue, 1 Aug 2017 20:41:28 +0000 (22:41 +0200)
commit748b6b881ccdda8f0663c68605f431279e06f49a
tree57480342052d0f96215581be325b3d42fd6a7b83
parent4be6c078428b08d1a948cc09faca8f1326231866
x86/intel_rdt/cqm: Add sched_in support

OS associates an RMID/CLOSid to a task by writing the per CPU
IA32_PQR_ASSOC MSR when a task is scheduled in.

The sched_in code will stay as no-op unless we are running on Intel SKU
which supports either resource control or monitoring and we also enable
them by mounting the resctrl fs.  The per cpu CLOSid/RMID values are
cached and the write is performed only when a task with a different
CLOSid/RMID is scheduled in.

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-25-git-send-email-vikas.shivappa@linux.intel.com
arch/x86/include/asm/intel_rdt_sched.h
arch/x86/kernel/cpu/intel_rdt.h