[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [PATCH v4 03/17] xen/arm: implement node distance helpers for Arm
- To: Jan Beulich <jbeulich@xxxxxxxx>
- From: Henry Wang <Henry.Wang@xxxxxxx>
- Date: Tue, 25 Apr 2023 09:48:34 +0000
- Accept-language: zh-CN, en-US
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Z28GOUe5s7WC0tnX/8jCpcrjDY2WrCcBIGidUSVw+hg=; b=SAq/U7n652t1JTixnvOpsaG1yheqZ+ByC3ddWqC8UKtC7qdabMi16uoRGsXTZf+7wS3xqtkqVtKzHuUiE34sNNAa5xyTknaAPhfbuaRrOuM1zFWsrw6Nt9L7+PUbljfXWLEgwZAbtOfelVHmn0a8aiN52IHKLOOBwSgKZbJjRGNafHf5nAeIjBAbD53XnWodpVeSZuHbXlfsW2JDTHoxNSQ8+o1joTRGB8DM9Yp79Iu/EGtq+OO79MMdCiIR865kwwIssRxtBtlGvUjr6Qk4QLGPXI1Vmq92DNtoCHHEDFSB8NcuwTpSjAwuLetqoOS4WLC1Jo8vO83+3E8RENXFnQ==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kd3wLNk2Z+t2oguNVDoQEBQVXi8vKBCWz9WYTTg4euih07n7Za/qdH+dirTAG4afB6MSQjVuStchziR8LI1iQI82fvanZE2FNimuZjzg9G5QxZVxqOQjRl88iXF7bhoihUqc7jaEGQRjET4sYyuPvEt9fOIKykk1vdFzh5baJoF37e7uGxinhSfhKd7OlJhT0kQhzfDFee6hbWMC7+H9viJC9S0wPAWSEP4Moa9JVKVNu4dU66Ac4XXRAVH41lgyPJ+mqy3HHmt/UbPQzRDzd4WrPJx2stT8ABtx3trsbjSDV3kE/lX02/4KX0XenR7j/CrYi/Qb5ICFFV5hbvdSPw==
- Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
- Cc: Wei Chen <Wei.Chen@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <Bertrand.Marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- Delivery-date: Tue, 25 Apr 2023 09:49:03 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
- Nodisclaimer: true
- Original-authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
- Thread-index: AQHZd0uatmvJ8yLEu0+BYdIuaJgbea87s6sAgAANHMCAAAVQAIAAAOFg
- Thread-topic: [PATCH v4 03/17] xen/arm: implement node distance helpers for Arm
Hi Jan,
> -----Original Message-----
> From: Jan Beulich <jbeulich@xxxxxxxx>
> Subject: Re: [PATCH v4 03/17] xen/arm: implement node distance helpers for
> Arm
>
> On 25.04.2023 11:31, Henry Wang wrote:
> >> -----Original Message-----
> >> From: Jan Beulich <jbeulich@xxxxxxxx>
> >>
> >> On 25.04.2023 09:56, Henry Wang wrote:
> >>> + /* NUMA defines NUMA_NO_DISTANCE as unreachable and 0-9 are
> >> undefined */
> >>> + if ( distance >= NUMA_NO_DISTANCE || distance <=
> >> NUMA_DISTANCE_UDF_MAX ||
> >>> + (from == to && distance != NUMA_LOCAL_DISTANCE) )
> >>> + {
> >>> + printk(KERN_WARNING
> >>> + "NUMA: invalid distance: from=%"PRIu8" to=%"PRIu8"
> >> distance=%"PRIu32"\n",
> >>> + from, to, distance);
> >>> + return;
> >>> + }
> >>
> >> I appreciate the checking that node-local references are
> >> NUMA_LOCAL_DISTANCE,
> >> but if they're wrongly passed into here, shouldn't the resulting array
> >> still
> >> have NUMA_LOCAL_DISTANCE on its diagonal, at least as far as present
> nodes
> >> go?
> >
> > Apologies in advance to ask more specific details from you as I am not sure
> > if I can correctly understand the "if they're wrongly passed into here"
> > case.
> Do you
> > mean we are always guaranteed that if from == to, the distance will always
> be
> > NUMA_LOCAL_DISTANCE so the (from == to && distance !=
> NUMA_LOCAL_DISTANCE)
> > check is redundant and can be removed? Thanks.
>
> It's a little odd that you ask me: It is your code which insists on
> NUMA_LOCAL_DISTANCE when from == to. If you insist on your caller to pass
> only this one value, then I think it is only logical to also set the
> respective table entries to that value (rather than leaving them at
> NUMA_NO_DISTANCE).
I think I understand what do you mean now. I was only checking this specific
patch so didn't make the connection with the latter patches.
Kind regards,
Henry
>
> Jan
|