[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <af326d48-e41e-4e4f-8555-5bf62dd6e552@icloud.com>
Date: Thu, 5 Sep 2024 09:02:50 +0800
From: Zijun Hu <zijun_hu@...oud.com>
To: Alison Schofield <alison.schofield@...el.com>
Cc: Davidlohr Bueso <dave@...olabs.net>,
Jonathan Cameron <jonathan.cameron@...wei.com>,
Dave Jiang <dave.jiang@...el.com>, Vishal Verma <vishal.l.verma@...el.com>,
Ira Weiny <ira.weiny@...el.com>, Dan Williams <dan.j.williams@...el.com>,
Ben Widawsky <bwidawsk@...nel.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>, linux-cxl@...r.kernel.org,
linux-kernel@...r.kernel.org, Zijun Hu <quic_zijuhu@...cinc.com>,
stable@...r.kernel.org
Subject: Re: [PATCH] cxl/region: Fix logic for finding a free cxl decoder
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@...cinc.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
>
>>
Powered by blists - more mailing lists