1. 03 Jul, 2018 4 commits
    • Reinette Chatre's avatar
      x86/intel_rdt: Make CPU information accessible for pseudo-locked regions · 33dc3e41
      Reinette Chatre authored
      When a resource group enters pseudo-locksetup mode it reflects that the
      platform supports cache pseudo-locking and the resource group is unused,
      ready to be used for a pseudo-locked region. Until it is set up as a
      pseudo-locked region the resource group is "locked down" such that no new
      tasks or cpus can be assigned to it. This is accomplished in a user visible
      way by making the cpus, cpus_list, and tasks resctrl files inaccassible
      (user cannot read from or write to these files).
      
      When the resource group changes to pseudo-locked mode it represents a cache
      pseudo-locked region. While not appropriate to make any changes to the cpus
      assigned to this region it is useful to make it easy for the user to see
      which cpus are associated with the pseudo-locked region.
      
      Modify the permissions of the cpus/cpus_list file when the resource group
      changes to pseudo-locked mode to support reading (not writing).  The
      information presented to the user when reading the file are the cpus
      associated with the pseudo-locked region.
      Signed-off-by: default avatarReinette Chatre <reinette.chatre@intel.com>
      Signed-off-by: default avatarThomas 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/12756b7963b6abc1bffe8fb560b87b75da827bd1.1530421961.git.reinette.chatre@intel.com
      33dc3e41
    • Reinette Chatre's avatar
      x86/intel_rdt: Support restoration of subset of permissions · 392487de
      Reinette Chatre authored
      As the mode of a resource group changes, the operations it can support may
      also change. One way in which the supported operations are managed is to
      modify the permissions of the files within the resource group's resctrl
      directory.
      
      At the moment only two possible permissions are supported: the default
      permissions or no permissions in support for when the operation is "locked
      down". It is possible where an operation on a resource group may have more
      possibilities. For example, if by default changes can be made to the
      resource group by writing to a resctrl file while the current settings can
      be obtained by reading from the file, then it may be possible that in
      another mode it is only possible to read the current settings, and not
      change them.
      
      Make it possible to modify some of the permissions of a resctrl file in
      support of a more flexible way to manage the operations on a resource
      group. In this preparation work the original behavior is maintained where
      all permissions are restored.
      Signed-off-by: default avatarReinette Chatre <reinette.chatre@intel.com>
      Signed-off-by: default avatarThomas 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/8773aadfade7bcb2c48a45fa294a04d2c03bb0a1.1530421961.git.reinette.chatre@intel.com
      392487de
    • Reinette Chatre's avatar
      x86/intel_rdt: Fix cleanup of plr structure on error · 546d3c74
      Reinette Chatre authored
      When a resource group enters pseudo-locksetup mode a pseudo_lock_region is
      associated with it. When the user writes to the resource group's schemata
      file the CBM of the requested pseudo-locked region is entered into the
      pseudo_lock_region struct. If any part of pseudo-lock region creation fails
      the resource group will remain in pseudo-locksetup mode with the
      pseudo_lock_region associated with it.
      
      In case of failure during pseudo-lock region creation care needs to be
      taken to ensure that the pseudo_lock_region struct associated with the
      resource group is cleared from any pseudo-locking data - especially the
      CBM. This is because the existence of a pseudo_lock_region struct with a
      CBM is significant in other areas of the code, for example, the display of
      bit_usage and initialization of a new resource group.
      
      Fix the error path of pseudo-lock region creation to ensure that the
      pseudo_lock_region struct is cleared at each error exit.
      
      Fixes: 018961ae ("x86/intel_rdt: Pseudo-lock region creation/removal core")
      Signed-off-by: default avatarReinette Chatre <reinette.chatre@intel.com>
      Signed-off-by: default avatarThomas 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/49b4782f6d204d122cee3499e642b2772a98d2b4.1530421026.git.reinette.chatre@intel.com
      546d3c74
    • Reinette Chatre's avatar
      x86/intel_rdt: Move pseudo_lock_region_clear() · ce730f1c
      Reinette Chatre authored
      The pseudo_lock_region_clear() function is moved to earlier in the file in
      preparation for its use in functions that currently appear before it. No
      functional change.
      Signed-off-by: default avatarReinette Chatre <reinette.chatre@intel.com>
      Signed-off-by: default avatarThomas 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/ef098ec2a45501e23792289bff80ae3152141e2f.1530421026.git.reinette.chatre@intel.com
      ce730f1c
  2. 24 Jun, 2018 4 commits
  3. 23 Jun, 2018 32 commits