diff options
author | Vikas Shivappa <vikas.shivappa@linux.intel.com> | 2018-04-20 15:36:17 -0700 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2018-05-19 13:16:43 +0200 |
commit | 19c635ab24a1e94a759e82bfb34554a6a0db215e (patch) | |
tree | 8309c7eb590909e3b6028167906f3b80c56da3b0 /arch/x86/kernel/cpu/intel_rdt.c | |
parent | d6c64a4f49fdea0ae79addc3282ae8eb8581bdfc (diff) | |
download | linux-19c635ab24a1e94a759e82bfb34554a6a0db215e.tar.gz linux-19c635ab24a1e94a759e82bfb34554a6a0db215e.tar.bz2 linux-19c635ab24a1e94a759e82bfb34554a6a0db215e.zip |
x86/intel_rdt/mba_sc: Enable/disable MBA software controller
Currently user does memory bandwidth allocation(MBA) by specifying the
bandwidth in percentage via the resctrl schemata file:
"/sys/fs/resctrl/schemata"
Add a new mount option "mba_MBps" to enable the user to specify MBA
in MBps:
$mount -t resctrl resctrl [-o cdp[,cdpl2][mba_MBps]] /sys/fs/resctrl
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: vikas.shivappa@intel.com
Cc: ak@linux.intel.com
Cc: hpa@zytor.com
Link: https://lkml.kernel.org/r/1524263781-14267-3-git-send-email-vikas.shivappa@linux.intel.com
Diffstat (limited to 'arch/x86/kernel/cpu/intel_rdt.c')
-rw-r--r-- | arch/x86/kernel/cpu/intel_rdt.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/x86/kernel/cpu/intel_rdt.c b/arch/x86/kernel/cpu/intel_rdt.c index 589b948e6e01..53ee6838c496 100644 --- a/arch/x86/kernel/cpu/intel_rdt.c +++ b/arch/x86/kernel/cpu/intel_rdt.c @@ -230,6 +230,14 @@ static inline void cache_alloc_hsw_probe(void) rdt_alloc_capable = true; } +bool is_mba_sc(struct rdt_resource *r) +{ + if (!r) + return rdt_resources_all[RDT_RESOURCE_MBA].membw.mba_sc; + + return r->membw.mba_sc; +} + /* * rdt_get_mb_table() - get a mapping of bandwidth(b/w) percentage values * exposed to user interface and the h/w understandable delay values. |