From: alison.schofield@intel.com
To: Dan Williams <dan.j.williams@intel.com>,
Ira Weiny <ira.weiny@intel.com>,
Vishal Verma <vishal.l.verma@intel.com>,
Dave Jiang <dave.jiang@intel.com>,
Ben Widawsky <bwidawsk@kernel.org>,
Steven Rostedt <rostedt@goodmis.org>,
Ingo Molnar <mingo@redhat.com>
Cc: Alison Schofield <alison.schofield@intel.com>,
linux-cxl@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH v2 0/4] CXL Poison List Retrieval & Tracing
Date: Wed, 12 Oct 2022 14:28:16 -0700 [thread overview]
Message-ID: <cover.1665606782.git.alison.schofield@intel.com> (raw)
From: Alison Schofield <alison.schofield@intel.com>
Adds support for retrieving device poison lists and
store the returned error records as kernel trace events.
The handling of the poison list is guided by the CXL 3.0 Spec
Section 8.2.9.8.4.1. [1]
Example command line usage:
Triggered by memdev:
$ echo 1 > /sys/bus/cxl/devices/mem1/trigger_poison_list
cxl_poison: pid:981 region: memdev:mem1 pcidev:cxl_mem.1 hpa:0x0 dpa:0xc0 length:0xc0 source:Internal flags: overflow_time:0
cxl_poison: pid:981 region: memdev:mem1 pcidev:cxl_mem.1 hpa:0x0 dpa:0x180 length:0x100 source:Injected flags: overflow_time:0
Triggered by region: (region name is included in the trace)
$ echo 1 > /sys/bus/cxl/devices/region5/trigger_poison_list
cxl_poison: pid:1132 region:region5 memdev:mem2 pcidev:cxl_mem.2 hpa:0x0 dpa:0x0 length:0x40 source:Unknown flags: overflow_time:0
cxl_poison: pid:1132 region:region5 memdev:mem2 pcidev:cxl_mem.2 hpa:0x0 dpa:0x40 length:0x80 source:External flags: overflow_time:0
Changes v1->v2
- Added per region poison collection
- Protect poison list w mutex
- Replace range usage w resource
- S/poison_max_mer/poison_max in cxl_dev_state kdoc (Ira)
- Renamed sysfs attribute to 'trigger_poison_list'
- _store() rm chatty dev_err() msgs (Jonathan, Dan)
- _store() use kstrtobool (Jonathan, Dan)
- _store() simplify return (Jonathan)
- cxl_memdev_visible() skip local vars on way enabled_cmds (Jonathan)
- cxl_memdev_visible() use kobj_to_dev() helper (Dan)
- Misc name shortenings and cleanups.
- Replace goto w break in cxl_mem_get_poison() do-while loop.
- Don't error out on FLAGS, record in trace event.
- Add kernel CXL_POISON__LIST_MAX (64) and guard against exceeding (Dan)
- Add current->pid to trace (Dan)
- Return the poison length as multiple of 64 per spec (Jonathan)
- Mask starting address from record->address (Jonathan)
- Move range selection to sysfs_store and make cxl_mem_get_poison() accept it.
- Get both the volatile & persistent ranges per memdev.
- Add pci device name to trace (Dan)
[1]: https://www.computeexpresslink.org/download-the-specification
Alison Schofield (4):
trace, cxl: Introduce a TRACE_EVENT for CXL poison records
cxl/mbox: Add GET_POISON_LIST mailbox command
cxl/memdev: Add trigger_poison_list sysfs attribute
cxl/region: Add trigger_poison_list sysfs attribute
Documentation/ABI/testing/sysfs-bus-cxl | 28 ++++++++
drivers/cxl/core/mbox.c | 69 +++++++++++++++++++
drivers/cxl/core/memdev.c | 41 ++++++++++++
drivers/cxl/core/region.c | 34 ++++++++++
drivers/cxl/cxlmem.h | 42 ++++++++++++
include/trace/events/cxl.h | 88 +++++++++++++++++++++++++
6 files changed, 302 insertions(+)
create mode 100644 include/trace/events/cxl.h
base-commit: 1985cf58850562e4b960e19d46f0d8f19d6c7cbd
--
2.37.3
next reply other threads:[~2022-10-12 21:28 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-12 21:28 alison.schofield [this message]
2022-10-12 21:28 ` [PATCH v2 1/4] trace, cxl: Introduce a TRACE_EVENT for CXL poison records alison.schofield
2022-10-12 21:46 ` Steven Rostedt
2022-10-14 4:39 ` Alison Schofield
2022-10-12 21:28 ` [PATCH v2 2/4] cxl/mbox: Add GET_POISON_LIST mailbox command alison.schofield
2022-10-12 21:28 ` [PATCH v2 3/4] cxl/memdev: Add trigger_poison_list sysfs attribute alison.schofield
2022-10-12 21:28 ` [PATCH v2 4/4] cxl/region: " alison.schofield
2022-10-17 13:43 ` Jonathan Cameron
2022-10-17 18:01 ` Alison Schofield
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.1665606782.git.alison.schofield@intel.com \
--to=alison.schofield@intel.com \
--cc=bwidawsk@kernel.org \
--cc=dan.j.williams@intel.com \
--cc=dave.jiang@intel.com \
--cc=ira.weiny@intel.com \
--cc=linux-cxl@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=rostedt@goodmis.org \
--cc=vishal.l.verma@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;
as well as URLs for NNTP newsgroup(s).