linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dave Jiang <dave.jiang@intel.com>
To: Ira Weiny <ira.weiny@intel.com>,
	linux-cxl@vger.kernel.org, linux-pci@vger.kernel.org
Cc: dan.j.williams@intel.com, vishal.l.verma@intel.com,
	alison.schofield@intel.com, Jonathan.Cameron@huawei.com,
	dave@stgolabs.net
Subject: Re: [PATCH v5 1/2] cxl: Preserve the CDAT access_coordinate for an endpoint
Date: Thu, 27 Jun 2024 10:53:32 -0700	[thread overview]
Message-ID: <da7d82d8-5fbd-4042-84be-16b520add8da@intel.com> (raw)
In-Reply-To: <667d77ee16b31_2ccbfb2949@iweiny-mobl.notmuch>



On 6/27/24 7:32 AM, Ira Weiny wrote:
> Dave Jiang wrote:
>> Keep the access_coordinate from the CDAT tables for region perf
>> calculations. The region perf calculation requires all participating
>> endpoints to have arrived in order to determine if there are limitations
>> of bandwidth data due to shared uplink.
>>
>> Signed-off-by: Dave Jiang <dave.jiang@intel.com>
>> ---
>>  drivers/cxl/core/cdat.c | 10 ++++++----
>>  drivers/cxl/cxlmem.h    |  1 +
>>  2 files changed, 7 insertions(+), 4 deletions(-)
>>
>> diff --git a/drivers/cxl/core/cdat.c b/drivers/cxl/core/cdat.c
>> index bb83867d9fec..fea214340d4b 100644
>> --- a/drivers/cxl/core/cdat.c
>> +++ b/drivers/cxl/core/cdat.c
>> @@ -15,7 +15,7 @@ struct dsmas_entry {
>>  	struct range dpa_range;
>>  	u8 handle;
>>  	struct access_coordinate coord[ACCESS_COORDINATE_MAX];
>> -
>> +	struct access_coordinate cdat_coord[ACCESS_COORDINATE_MAX];
>>  	int entries;
>>  	int qos_class;
>>  };
>> @@ -163,7 +163,7 @@ static int cdat_dslbis_handler(union acpi_subtable_headers *header, void *arg,
>>  	val = cdat_normalize(le16_to_cpu(le_val), le64_to_cpu(le_base),
>>  			     dslbis->data_type);
>>  
>> -	cxl_access_coordinate_set(dent->coord, dslbis->data_type, val);
>> +	cxl_access_coordinate_set(dent->cdat_coord, dslbis->data_type, val);
>>  
>>  	return 0;
>>  }
>> @@ -220,7 +220,7 @@ static int cxl_port_perf_data_calculate(struct cxl_port *port,
>>  	xa_for_each(dsmas_xa, index, dent) {
>>  		int qos_class;
>>  
>> -		cxl_coordinates_combine(dent->coord, dent->coord, ep_c);
>> +		cxl_coordinates_combine(dent->coord, dent->cdat_coord, ep_c);
>>  		dent->entries = 1;
>>  		rc = cxl_root->ops->qos_class(cxl_root,
>>  					      &dent->coord[ACCESS_COORDINATE_CPU],
>> @@ -241,8 +241,10 @@ static int cxl_port_perf_data_calculate(struct cxl_port *port,
>>  static void update_perf_entry(struct device *dev, struct dsmas_entry *dent,
>>  			      struct cxl_dpa_perf *dpa_perf)
>>  {
>> -	for (int i = 0; i < ACCESS_COORDINATE_MAX; i++)
>> +	for (int i = 0; i < ACCESS_COORDINATE_MAX; i++) {
>>  		dpa_perf->coord[i] = dent->coord[i];
>> +		dpa_perf->cdat_coord[i] = dent->cdat_coord[i];
>> +	}
>>  	dpa_perf->dpa_range = dent->dpa_range;
>>  	dpa_perf->qos_class = dent->qos_class;
>>  	dev_dbg(dev,
>> diff --git a/drivers/cxl/cxlmem.h b/drivers/cxl/cxlmem.h
>> index 19aba81cdf13..fb365453f996 100644
>> --- a/drivers/cxl/cxlmem.h
>> +++ b/drivers/cxl/cxlmem.h
>> @@ -402,6 +402,7 @@ enum cxl_devtype {
>>  struct cxl_dpa_perf {
>>  	struct range dpa_range;
>>  	struct access_coordinate coord[ACCESS_COORDINATE_MAX];
>> +	struct access_coordinate cdat_coord[ACCESS_COORDINATE_MAX];
> 
> Need to update the kdoc.

Will update.

> 
> Other than that.
> 
> Reviewed-by: Ira Weiny <ira.weiny@intel.com>

Thanks!
> 
>>  	int qos_class;
>>  };
>>  
>> -- 
>> 2.45.1
>>
> 
> 

  reply	other threads:[~2024-06-27 17:53 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-18 23:16 [PATCH v5 0/2] cxl: Region bandwidth calculation for targets with shared upstream link Dave Jiang
2024-06-18 23:16 ` [PATCH v5 1/2] cxl: Preserve the CDAT access_coordinate for an endpoint Dave Jiang
2024-06-20 10:13   ` Jonathan Cameron
2024-06-27 14:32   ` Ira Weiny
2024-06-27 17:53     ` Dave Jiang [this message]
2024-06-18 23:16 ` [PATCH v5 2/2] cxl: Calculate region bandwidth of targets with shared upstream link Dave Jiang
2024-06-20 10:45   ` Jonathan Cameron
2024-06-20 18:34     ` Dave Jiang
2024-06-27 15:50   ` Ira Weiny
2024-06-27 17:57     ` Dave Jiang
2024-06-25 18:29 ` [PATCH v5 0/2] cxl: Region bandwidth calculation for " Ira Weiny

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=da7d82d8-5fbd-4042-84be-16b520add8da@intel.com \
    --to=dave.jiang@intel.com \
    --cc=Jonathan.Cameron@huawei.com \
    --cc=alison.schofield@intel.com \
    --cc=dan.j.williams@intel.com \
    --cc=dave@stgolabs.net \
    --cc=ira.weiny@intel.com \
    --cc=linux-cxl@vger.kernel.org \
    --cc=linux-pci@vger.kernel.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).