Linux CXL
 help / color / mirror / Atom feed
From: alison.schofield@intel.com
To: Vishal Verma <vishal.l.verma@intel.com>
Cc: Alison Schofield <alison.schofield@intel.com>,
	nvdimm@lists.linux.dev, linux-cxl@vger.kernel.org
Subject: [ndctl PATCH v9 0/7] Support poison list retrieval
Date: Thu, 29 Feb 2024 17:31:15 -0800	[thread overview]
Message-ID: <cover.1709253898.git.alison.schofield@intel.com> (raw)

From: Alison Schofield <alison.schofield@intel.com>

Changes since v8:
Patch 4/7 cxl/event_trace: add helpers to retrieve tep fields by type
- Add type specific helpers. Avoids the casting in next patch (DaveJ)
- Remove DaveJ tag due to changes

Patch 5/7 cxl/list: collect and parse media_error records
- Avoid goto block by adding helper func find_memdev() (DaveJ)
- Out-dent the success return buried in cxl_decoder_foreach()
- Use updated cxl_get_field_* helpers (DaveJ)
- Add a 'goto put_obj' to unify the put on exit (DaveJ)

- Rebased on latest pending
Link to v8: https://lore.kernel.org/nvdimm/cover.1708653303.git.alison.schofield@intel.com/


Add the option to add a memory devices poison list to the cxl-list
json output. Offer the option by memdev and by region. Sample usage:

# cxl list -m mem1 --media-errors
[
  {
    "memdev":"mem1",
    "pmem_size":1073741824,
    "ram_size":1073741824,
    "serial":1,
    "numa_node":1,
    "host":"cxl_mem.1",
    "media_errors":[
      {
        "dpa":0,
        "length":64,
        "source":"Internal"
      },
      {
        "decoder":"decoder10.0",
        "hpa":1035355557888,
        "dpa":1073741824,
        "length":64,
        "source":"External"
      },
      {
        "decoder":"decoder10.0",
        "hpa":1035355566080,
        "dpa":1073745920,
        "length":64,
        "source":"Injected"
      }
    ]
  }
]

# cxl list -r region5 --media-errors
[
  {
    "region":"region5",
    "resource":1035355553792,
    "size":2147483648,
    "type":"pmem",
    "interleave_ways":2,
    "interleave_granularity":4096,
    "decode_state":"commit",
    "media_errors":[
      {
        "decoder":"decoder10.0",
        "hpa":1035355557888,
        "dpa":1073741824,
        "length":64,
        "source":"External"
      },
      {
        "decoder":"decoder8.1",
        "hpa":1035355566080,
        "dpa":1073745920,
        "length":64,
        "source":"Internal"
      }
    ]
  }
]


Alison Schofield (7):
  libcxl: add interfaces for GET_POISON_LIST mailbox commands
  cxl: add an optional pid check to event parsing
  cxl/event_trace: add a private context for private parsers
  cxl/event_trace: add helpers to retrieve tep fields by type
  cxl/list: collect and parse media_error records
  cxl/list: add --media-errors option to cxl list
  cxl/test: add cxl-poison.sh unit test

 Documentation/cxl/cxl-list.txt |  79 +++++++++-
 cxl/event_trace.c              |  82 +++++++++-
 cxl/event_trace.h              |  14 +-
 cxl/filter.h                   |   3 +
 cxl/json.c                     | 271 +++++++++++++++++++++++++++++++++
 cxl/lib/libcxl.c               |  47 ++++++
 cxl/lib/libcxl.sym             |   2 +
 cxl/libcxl.h                   |   2 +
 cxl/list.c                     |   3 +
 test/cxl-poison.sh             | 137 +++++++++++++++++
 test/meson.build               |   2 +
 11 files changed, 638 insertions(+), 4 deletions(-)
 create mode 100644 test/cxl-poison.sh


base-commit: ffbbb0bc246d967d53821184047f1121e02f8a81
-- 
2.37.3


             reply	other threads:[~2024-03-01  1:31 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-01  1:31 alison.schofield [this message]
2024-03-01  1:31 ` [ndctl PATCH v9 1/7] libcxl: add interfaces for GET_POISON_LIST mailbox commands alison.schofield
2024-03-01  1:31 ` [ndctl PATCH v9 2/7] cxl: add an optional pid check to event parsing alison.schofield
2024-03-01  1:31 ` [ndctl PATCH v9 3/7] cxl/event_trace: add a private context for private parsers alison.schofield
2024-03-01  1:31 ` [ndctl PATCH v9 4/7] cxl/event_trace: add helpers to retrieve tep fields by type alison.schofield
2024-03-04 18:26   ` Dave Jiang
2024-03-01  1:31 ` [ndctl PATCH v9 5/7] cxl/list: collect and parse media_error records alison.schofield
2024-03-04 20:03   ` Dave Jiang
2024-03-06 18:39     ` Alison Schofield
2024-03-01  1:31 ` [ndctl PATCH v9 6/7] cxl/list: add --media-errors option to cxl list alison.schofield
2024-03-01  1:31 ` [ndctl PATCH v9 7/7] cxl/test: add cxl-poison.sh unit test 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.1709253898.git.alison.schofield@intel.com \
    --to=alison.schofield@intel.com \
    --cc=linux-cxl@vger.kernel.org \
    --cc=nvdimm@lists.linux.dev \
    --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