public inbox for linux-cxl@vger.kernel.org
 help / color / mirror / Atom feed
From: Zijun Hu <zijun_hu@icloud.com>
To: Alison Schofield <alison.schofield@intel.com>
Cc: Davidlohr Bueso <dave@stgolabs.net>,
	Jonathan Cameron <jonathan.cameron@huawei.com>,
	Dave Jiang <dave.jiang@intel.com>,
	Vishal Verma <vishal.l.verma@intel.com>,
	Ira Weiny <ira.weiny@intel.com>,
	Dan Williams <dan.j.williams@intel.com>,
	Ben Widawsky <bwidawsk@kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-cxl@vger.kernel.org, linux-kernel@vger.kernel.org,
	Zijun Hu <quic_zijuhu@quicinc.com>,
	stable@vger.kernel.org
Subject: Re: [PATCH] cxl/region: Fix logic for finding a free cxl decoder
Date: Thu, 5 Sep 2024 09:02:50 +0800	[thread overview]
Message-ID: <af326d48-e41e-4e4f-8555-5bf62dd6e552@icloud.com> (raw)
In-Reply-To: <ZtduQeu2NNyVWTk7@aschofie-mobl2.lan>

On 2024/9/4 04:14, Alison Schofield wrote:
> On Tue, Sep 03, 2024 at 08:41:44PM +0800, Zijun Hu wrote:
>> From: Zijun Hu <quic_zijuhu@quicinc.com>
>>
>> match_free_decoder()'s logic for finding a free cxl decoder depends on
>> a prerequisite that all child decoders are sorted by ID in ascending order
>> but the prerequisite may not be guaranteed, fix by finding a free cxl
>> decoder with minimal ID.
> 
> After reading the 'Closes' tag below I have a better understanding of
> why you may be doing this, but I don't want to have to jump to that
> Link. Can you describe here examples of when the ordered allocation
> may not be guaranteed, and the impact when that happens.
> 

thank you for code review.
let me try to do it.

> This includes a change to device_for_each_child() which I see mentioned
> in the Closes tag discussion too. Is that required for this fix?
>

yes, device_for_each_child() is better than device_find_child() to
correct logic for finding a free cxl decoder.
> It's feeling like the fix and api update are comingled. Please clarify.
> 

actually, there are two concerns as shown below:

concern A: device_find_child() modifies caller's match data.
concern B: weird logic for finding a free cxl decoder

this patch focuses on concern B, and it also solve concern A in passing.

the following exclusive patch only solves concern A.
https://lore.kernel.org/all/20240905-const_dfc_prepare-v4-1-4180e1d5a244@quicinc.com/

either will solve concern A i care about.

> Thanks,
> Alison
> 
>>


      reply	other threads:[~2024-09-05  1:03 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-03 12:41 [PATCH] cxl/region: Fix logic for finding a free cxl decoder Zijun Hu
2024-09-03 20:14 ` Alison Schofield
2024-09-05  1:02   ` Zijun Hu [this message]

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=af326d48-e41e-4e4f-8555-5bf62dd6e552@icloud.com \
    --to=zijun_hu@icloud.com \
    --cc=alison.schofield@intel.com \
    --cc=bwidawsk@kernel.org \
    --cc=dan.j.williams@intel.com \
    --cc=dave.jiang@intel.com \
    --cc=dave@stgolabs.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=ira.weiny@intel.com \
    --cc=jonathan.cameron@huawei.com \
    --cc=linux-cxl@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=quic_zijuhu@quicinc.com \
    --cc=stable@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