x86/intel_rdt: Add framework for better RDT UI diagnostics
authorTony Luck <tony.luck@intel.com>
Mon, 25 Sep 2017 23:39:33 +0000 (16:39 -0700)
committerThomas Gleixner <tglx@linutronix.de>
Wed, 27 Sep 2017 10:10:10 +0000 (12:10 +0200)
commit9b3a7fd0f5fb583a8fdda678e8a87dff1717f7f3
tree21157e2dc7f1d2e0c8eda0f349b77e7b24ddaa1f
parente19b205be43d11bff638cad4487008c48d21c103
x86/intel_rdt: Add framework for better RDT UI diagnostics

Commands are given to the resctrl file system by making/removing
directories, or by writing to files.  When something goes wrong
the user is generally left wondering why they got:

   bash: echo: write error: Invalid argument

Add a new file "last_cmd_status" to the "info" directory that
will give the user some better clues on what went wrong.

Provide functions to clear and update last_cmd_status which
check that we hold the rdtgroup_mutex.

[ tglx: Made last_cmd_status static and folded back the hunk from patch 3
   which replaces the open coded access to last_cmd_status with the
   accessor function ]

Signed-off-by: Tony Luck <tony.luck@intel.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Vikas Shivappa <vikas.shivappa@intel.com>
Cc: Boris Petkov <bp@suse.de>
Cc: Reinette Chatre <reinette.chatre@intel.com>
Link: https://lkml.kernel.org/r/edc4e0e9741eee89bba569f0021b1b2662fd9508.1506382469.git.tony.luck@intel.com
arch/x86/kernel/cpu/intel_rdt.h
arch/x86/kernel/cpu/intel_rdt_rdtgroup.c