Skip to content

Commit

Permalink
x86/intel_rdt: Add check to determine if monitoring in progress
Browse files Browse the repository at this point in the history
When a resource group is pseudo-locked it is orphaned without a class of
service associated with it. We thus do not want any monitoring in progress
on a resource group that will be used for pseudo-locking.

Introduce a test that can be used to determine if pseudo-locking in
progress on a resource group. Temporarily mark it as unused to avoid
compile warnings until it is used.

Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: fenghua.yu@intel.com
Cc: tony.luck@intel.com
Cc: vikas.shivappa@linux.intel.com
Cc: gavin.hindman@intel.com
Cc: jithu.joseph@intel.com
Cc: dave.hansen@intel.com
Cc: hpa@zytor.com
Link: https://lkml.kernel.org/r/14fd9494f87ca72a213b3a197d1172d4e66ae196.1529706536.git.reinette.chatre@intel.com
  • Loading branch information
Reinette Chatre authored and Thomas Gleixner committed Jun 23, 2018
1 parent 2a5d76a commit bbcee99
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions arch/x86/kernel/cpu/intel_rdt_pseudo_lock.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,19 @@

#include "intel_rdt.h"

/**
* rdtgroup_monitor_in_progress - Test if monitoring in progress
* @r: resource group being queried
*
* Return: 1 if monitor groups have been created for this resource
* group, 0 otherwise.
*/
static int __attribute__ ((unused))
rdtgroup_monitor_in_progress(struct rdtgroup *rdtgrp)
{
return !list_empty(&rdtgrp->mon.crdtgrp_list);
}

/**
* rdtgroup_locksetup_user_restrict - Restrict user access to group
* @rdtgrp: resource group needing access restricted
Expand Down

0 comments on commit bbcee99

Please sign in to comment.