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: <linux-cxl@vger.kernel.org>, Dave Jiang <dave.jiang@intel.com>,
	"Alejandro Lucero" <alucerop@amd.com>,
	Ira Weiny <ira.weiny@intel.com>
Subject: Re: [PATCH v3 6/6] cxl: Cleanup partition size and perf helpers
Date: Tue, 4 Feb 2025 12:32:47 +0000	[thread overview]
Message-ID: <20250204123247.000000d1@huawei.com> (raw)
In-Reply-To: <173864307519.668823.10800104022426067621.stgit@dwillia2-xfh.jf.intel.com>

On Mon, 03 Feb 2025 20:24:35 -0800
Dan Williams <dan.j.williams@intel.com> wrote:

> Now that the 'struct cxl_dpa_partition' array contains both size and
> performance information, all paths that iterate over that information
> can use a loop rather than hard-code 'ram' and 'pmem' lookups.
> 
> Remove, or reduce the scope of the temporary helpers that bridged the
> pre-'struct cxl_dpa_partition' state of the code to the post-'struct
> cxl_dpa_partition' state.
> 
> - to_{ram,pmem}_perf(): scope reduced to just sysfs_emit + is_visible()
>   helpers
> 
> - to_{ram,pmem}_res(): fold into their only users cxl_{ram,pmem}_size()
> 
> - cxl_ram_size(): scope reduced to ram_size_show() (Note,
>   cxl_pmem_size() also used to gate nvdimm registration)
> 
> In short, memdev sysfs ABI already made the promise that 0-sized
> partitions will show for memdevs, but that can be avoided for future
> partitions by using dynamic sysfs group visibility (new relative to when
> the partition ABI first shipped upstream).
> 
> Cc: Dave Jiang <dave.jiang@intel.com>
> Cc: Alejandro Lucero <alucerop@amd.com>
> Cc: Ira Weiny <ira.weiny@intel.com>
> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Ok. This might make my earlier suggestions about not special
cases ram regions less effective, but I think perhaps worth considering
none the less.

Anyhow, this patch is fine.

Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>




  reply	other threads:[~2025-02-04 12:32 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-04  4:24 [PATCH v3 0/6] cxl: DPA partition metadata is a mess Dan Williams
2025-02-04  4:24 ` [PATCH v3 1/6] cxl: Remove the CXL_DECODER_MIXED mistake Dan Williams
2025-02-04 17:42   ` Fan Ni
2025-02-04  4:24 ` [PATCH v3 2/6] cxl: Introduce to_{ram,pmem}_{res,perf}() helpers Dan Williams
2025-02-04 11:30   ` Jonathan Cameron
2025-02-04 17:50   ` Fan Ni
2025-02-04  4:24 ` [PATCH v3 3/6] cxl: Introduce 'struct cxl_dpa_partition' and 'struct cxl_range_info' Dan Williams
2025-02-04 11:50   ` Jonathan Cameron
2025-02-04 18:50     ` Dan Williams
2025-02-04  4:24 ` [PATCH v3 4/6] cxl: Make cxl_dpa_alloc() DPA partition number agnostic Dan Williams
2025-02-04 12:13   ` Jonathan Cameron
2025-02-04  4:24 ` [PATCH v3 5/6] cxl: Kill enum cxl_decoder_mode Dan Williams
2025-02-04 12:23   ` Jonathan Cameron
2025-02-04 18:57     ` Dan Williams
2025-02-04  4:24 ` [PATCH v3 6/6] cxl: Cleanup partition size and perf helpers Dan Williams
2025-02-04 12:32   ` Jonathan Cameron [this message]
2025-02-04 20:52   ` Ira Weiny
2025-02-04 10:42 ` [PATCH v3 0/6] cxl: DPA partition metadata is a mess Alejandro Lucero Palau
2025-02-04 21:33 ` Dave Jiang

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=20250204123247.000000d1@huawei.com \
    --to=jonathan.cameron@huawei.com \
    --cc=alucerop@amd.com \
    --cc=dan.j.williams@intel.com \
    --cc=dave.jiang@intel.com \
    --cc=ira.weiny@intel.com \
    --cc=linux-cxl@vger.kernel.org \
    /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.