All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Cameron <Jonathan.Cameron@Huawei.com>
To: Dan Williams <dan.j.williams@intel.com>
Cc: <vishal.l.verma@intel.com>, <alison.schofield@intel.com>,
	<nvdimm@lists.linux.dev>, <linux-cxl@vger.kernel.org>
Subject: Re: [ndctl PATCH v2 10/12] cxl/memdev: Add {reserve,free}-dpa commands
Date: Wed, 20 Jul 2022 14:16:18 +0100	[thread overview]
Message-ID: <20220720141618.00004116@Huawei.com> (raw)
In-Reply-To: <165781816425.1555691.17958897857798325111.stgit@dwillia2-xfh.jf.intel.com>

On Thu, 14 Jul 2022 10:02:44 -0700
Dan Williams <dan.j.williams@intel.com> wrote:

> Add helper commands for managing allocations of DPA (device physical
> address) capacity on a set of CXL memory devices.
> 
> The main convenience this command affords is automatically picking the next
> decoder to allocate per-memdev.
> 
> For example, to allocate 256MiB from all endpoints that are covered by a
> given root decoder, and collect those resulting endpoint-decoders into an
> array:
> 
>   readarray -t mem < <(cxl list -M -d $decoder | jq -r ".[].memdev")
>   readarray -t endpoint < <(cxl reserve-dpa -t pmem ${mem[*]} -s $((256<<20)) |
>                             jq -r ".[] | .decoder.decoder")
> 
> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Not a proper review as don't have time to dive into this today. But whilst glancing at it, noticed a typo below.

> diff --git a/Documentation/cxl/cxl-reserve-dpa.txt b/Documentation/cxl/cxl-reserve-dpa.txt
> new file mode 100644
> index 000000000000..560daf0cb277
> --- /dev/null
> +++ b/Documentation/cxl/cxl-reserve-dpa.txt
> @@ -0,0 +1,67 @@
> +// SPDX-License-Identifier: GPL-2.0
> +
> +cxl-reserve-dpa(1)
> +==================
> +
> +NAME
> +----
> +cxl-reserve-dpa - allocate device-physical address space
> +
> +SYNOPSIS
> +--------
> +[verse]
> +'cxl reserve-dpa' <mem0> [<mem1>..<memN>] [<options>]
> +
> +The CXL region provisioning process proceeds in multiple steps. One of
> +the steps is identifying and reserving the DPA span that each member of
> +the interleave-set (region) contributes in advance of attaching that
> +allocation to a region. For development, test, and debug purposes this
> +command is a helper to find the next available decoder on endpoint
> +(memdev) and mark a span of DPA as busy.
> +
> +OPTIONS
> +-------
> +<memory device(s)>::
> +include::memdev-option.txt[]
> +
> +-d::
> +--decoder::
> +	Specify the decoder to attempt the allocation. The CXL specification
> +	mandates that allocations must be ordered by DPA and decoder instance.
> +	I.e. the lowest DPA allocation on the device is covered by deocder0, and

decoder0

> +	the last / highest DPA allocation is covered by the last decoder. This
> +	ordering is enforced by the kernel. By default the tool picks the 'next
> +	available' decoder.


  reply	other threads:[~2022-07-20 13:16 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-14 17:01 [ndctl PATCH v2 00/12] cxl: Region provisioning foundation Dan Williams
2022-07-14 17:01 ` [ndctl PATCH v2 01/12] cxl/list: Reformat option list Dan Williams
2022-07-14 17:01 ` [ndctl PATCH v2 02/12] cxl/list: Emit endpoint decoders filtered by memdev Dan Williams
2022-07-14 17:02 ` [ndctl PATCH v2 03/12] cxl/list: Hide 0s in disabled decoder listings Dan Williams
2022-07-14 17:02 ` [ndctl PATCH v2 04/12] cxl/list: Add DPA span to endpoint " Dan Williams
2022-07-14 17:02 ` [ndctl PATCH v2 05/12] ccan/list: Import latest list helpers Dan Williams
2022-07-14 17:20   ` Ira Weiny
2022-07-14 17:02 ` [ndctl PATCH v2 06/12] cxl/lib: Maintain decoders in id order Dan Williams
2022-07-14 17:02 ` [ndctl PATCH v2 07/12] cxl/memdev: Fix json for multi-device partitioning Dan Williams
2022-07-14 17:02 ` [ndctl PATCH v2 08/12] cxl/list: Emit 'mode' for endpoint decoder objects Dan Williams
2022-07-14 17:02 ` [ndctl PATCH v2 09/12] cxl/set-partition: Accept 'ram' as an alias for 'volatile' Dan Williams
2022-07-14 17:02 ` [ndctl PATCH v2 10/12] cxl/memdev: Add {reserve,free}-dpa commands Dan Williams
2022-07-20 13:16   ` Jonathan Cameron [this message]
2022-07-14 17:02 ` [ndctl PATCH v2 11/12] cxl/test: Update CXL memory parameters Dan Williams
2022-07-14 17:02 ` [ndctl PATCH v2 12/12] cxl/test: Checkout region setup/teardown Dan Williams
2022-07-14 20:55   ` Verma, Vishal L
2022-07-14 21:13     ` Dan Williams
2022-07-14 21:26       ` Verma, Vishal L

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=20220720141618.00004116@Huawei.com \
    --to=jonathan.cameron@huawei.com \
    --cc=alison.schofield@intel.com \
    --cc=dan.j.williams@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.