public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Luck, Tony" <tony.luck@intel.com>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: Tony Luck <tony.luck@intel.com>,
	linux-kernel@vger.kernel.org, Boris Petkov <bp@suse.de>,
	Fenghua Yu <fenghua.yu@intel.com>,
	Reinette Chatre <reinette.chatre@intel.com>,
	Steven Rostedt <rostedt@goodmis.org>,
	Vikas Shivappa <vikas.shivappa@intel.com>
Subject: [PATCH v2 0/6] x86/intel_rdt: Better diagnostics
Date: Mon, 25 Sep 2017 16:39:32 -0700	[thread overview]
Message-ID: <cover.1506382469.git.tony.luck@intel.com> (raw)

From: Tony Luck <tony.luck@intel.com>

Chatting online with Boris to diagnose why his test cases for RDT
weren't working, we came up with either a good idea (in which case
I credit Boris) or a dumb one (in which case this is all my fault).

The basic problem is that there aren't many good error codes for
a file system interface to pass back to the user.  I'd resisted
adding printk() calls because it is a pain to parse the console
log, doubly so if you want to do it from a shell script that is
actually issuing the commands to RDT.

The answer is to add new file in the "info" directory that gives
the status of the last "command" to RDT (either a mkdir, or a
write to one of the control files).

I used the seq_buf* framework because I initially thought a single
command might result in multiple messages. But currently that isn't
true and we could potentially just use "strcpy()/sprintf()" to a
fixed buffer.  I didn't switch to that because the seq_buf* seems
very lightweight and allows for future extra messages while including
checking for exceeding the length of the buffer.

V1->V2: tglx: Add wrappers around functions that clear and append
	      to the seq_buf to assert that we hold the rdtgroup_mutex
	      [and drop the diagnostic from the place where we didn't]

Tony Luck (6):
  x86/intel_rdt: Add framework for better RDT UI diagnostics
  x86/intel_rdt: Add diagnostics when writing the schemata file
  x86/intel_rdt: Add diagnostics when writing the tasks file
  x86/intel_rdt: Add diagnostics when writing the cpus file
  x86/intel_rdt: Add diagnostics when making directories
  x86/intel_rdt: Add documentation for "info/last_cmd_status"

 Documentation/x86/intel_rdt_ui.txt          |  11 +++
 arch/x86/kernel/cpu/intel_rdt.h             |   7 ++
 arch/x86/kernel/cpu/intel_rdt_ctrlmondata.c |  45 ++++++++---
 arch/x86/kernel/cpu/intel_rdt_rdtgroup.c    | 112 +++++++++++++++++++++++++---
 4 files changed, 153 insertions(+), 22 deletions(-)

-- 
2.11.0

             reply	other threads:[~2017-09-25 23:39 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-25 23:39 Luck, Tony [this message]
2017-09-25 23:39 ` [PATCH v2 1/6] x86/intel_rdt: Add framework for better RDT UI diagnostics Luck, Tony
2017-09-25 23:39 ` [PATCH v2 2/6] x86/intel_rdt: Add diagnostics when writing the schemata file Luck, Tony
2017-09-25 23:39 ` [PATCH v2 3/6] x86/intel_rdt: Add diagnostics when writing the tasks file Luck, Tony
2017-09-25 23:39 ` [PATCH v2 4/6] x86/intel_rdt: Add diagnostics when writing the cpus file Luck, Tony
2017-09-25 23:39 ` [PATCH v2 5/6] x86/intel_rdt: Add diagnostics when making directories Luck, Tony
2017-09-25 23:39 ` [PATCH v2 6/6] x86/intel_rdt: Add documentation for "info/last_cmd_status" Luck, Tony

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cover.1506382469.git.tony.luck@intel.com \
    --to=tony.luck@intel.com \
    --cc=bp@suse.de \
    --cc=fenghua.yu@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=reinette.chatre@intel.com \
    --cc=rostedt@goodmis.org \
    --cc=tglx@linutronix.de \
    --cc=vikas.shivappa@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox