mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Zijun Hu <zijun_hu@icloud.com>
To: Dan Williams <dan.j.williams@intel.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Davidlohr Bueso <dave@stgolabs.net>,
	Jonathan Cameron <jonathan.cameron@huawei.com>,
	Dave Jiang <dave.jiang@intel.com>,
	Alison Schofield <alison.schofield@intel.com>,
	Vishal Verma <vishal.l.verma@intel.com>,
	Ira Weiny <ira.weiny@intel.com>
Cc: Przemek Kitszel <przemyslaw.kitszel@intel.com>,
	linux-cxl@vger.kernel.org, linux-kernel@vger.kernel.org,
	Zijun Hu <quic_zijuhu@quicinc.com>
Subject: Re: [PATCH v6] cxl/region: Fix wrong logic for finding a free switch cxl decoder
Date: Thu, 17 Oct 2024 07:35:37 +0800	[thread overview]
Message-ID: <4be42749-5444-4847-9396-820667d5a9e2@icloud.com> (raw)
In-Reply-To: <671045fc36835_3ee2294a5@dwillia2-xfh.jf.intel.com.notmuch>

On 2024/10/17 07:02, Dan Williams wrote:
> Zijun Hu wrote:
>> From: Zijun Hu <quic_zijuhu@quicinc.com>
>>
>> Provided that all child switch cxl decoders are sorted by ID in ascending
>> order, then it is wrong for current match_free_decoder()'s logic to find
>> a free cxl decoder as explained below:
>>
>> Port
>>  ├── cxld A        <---->  region A
>>  ├── cxld B        // no region
>>  ├── cxld C        <---->  region C
>>
>> Current logic will find cxld B as a free one, but cxld B is not true
>> free since region C has not been torn down, so current logic is wrong.
>>
>> Fixed by verifying if cxl decoder with ID (@port->commit_end + 1) can
>> be returned as finding result.
>>
>> Link: https://lore.kernel.org/all/670af54931b8_964fe29427@dwillia2-xfh.jf.intel.com.notmuch/
>> Suggested-by: Dan Williams <dan.j.williams@intel.com>
>> Signed-off-by: Zijun Hu <quic_zijuhu@quicinc.com>
>> ---
>> This patch is incremental to below patch series with title "cxl: Initialization and shutdown fixes"
>> http://lore.kernel.org/172862483180.2150669.5564474284074502692.stgit@dwillia2-xfh.jf.intel.com
>>
>> This patch is based on Dan's recommendation shown by below link:
>> https://lore.kernel.org/all/670af54931b8_964fe29427@dwillia2-xfh.jf.intel.com.notmuch/
> 
> ...and Dan and already sent a patch he is happier with here:
> 
> http://lore.kernel.org/172895072669.39002.9296583943188706348.stgit@dwillia2-xfh.jf.intel.com

this is a optimized one based your recommendation, namely, above link.
please don't hesitate to use it as your V2 if you like this one.

you maybe also have below change when you send V2
Reported-by: Zijun Hu <zijun_hu@icloud.com>
to
Reported-by: Zijun Hu <quic_zijuhu@quicinc.com>

So let us close discussion for this mail thread and go to your above thread.





      reply	other threads:[~2024-10-16 23:35 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-16 21:57 Zijun Hu
2024-10-16 23:02 ` Dan Williams
2024-10-16 23:35   ` 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=4be42749-5444-4847-9396-820667d5a9e2@icloud.com \
    --to=zijun_hu@icloud.com \
    --cc=alison.schofield@intel.com \
    --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=przemyslaw.kitszel@intel.com \
    --cc=quic_zijuhu@quicinc.com \
    --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

all inboxes | Powered by JetHome®