[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [PATCH v3 03/17] xen/arm: implement node distance helpers for Arm
- To: Jan Beulich <jbeulich@xxxxxxxx>
- From: Henry Wang <Henry.Wang@xxxxxxx>
- Date: Mon, 24 Apr 2023 11:27:48 +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=2HNfPZNksNZ3bEr9x5KOupK8IIm1iWP0K1b0Fs9XyX8=; b=VaOkRLj9qPDgih8a4KNEwt4Psd7FNF1ugWSI13BGVXUMaAUnsELs9/SElN1R/qnn+mkSCYCSM0vSi7cS2Na/a1/GwNZHKRBOvCzYnXs4Op0s/4/mZ4g8offUFZaBzPSDxpoJ7WGQQwFHIBPFmF3gyfzeA8SXrVtxfm341vlhFaNtlphsAxwFAIyC2To5JAaCZPaNTBHgEFgJMMZ+HeKU9u1gJadeeYU9UHR6+1LdpWfntTtWIvCep/F7QKAf4OIS5MmR9/5aC5f8NRtG764OPKBK9LfkF2Z0qxF0ME2IL2cLiKVfxHRTkVfsyrAsldSfkegex0W8DzlEx0lVQE5dlg==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=n6hI7WMrWYdH3gTN+iqXsHKEhRVlS5mI8xmfc0rw6/giUTt/NwIAB+jdp6D0EZBhuumXlwloB+1kZQROLRJDpCjm13JRarW7inhpNVXhms1xO+8ZQhBFKTf/yRd6xvkXKQWfSQ9E0txgOQywrNUN7rfEDWGjdrjeV/TYm/xXdjkx9IsVSxso5XfA0w9BHB4TMnZSeZ+BwDBacabfan77LJcquMduS2887iCbnJ79iW0btJx3+kjk1cKJV89ByyATNSqQCAvHaCPzQQmx8ll2X2olk1v/HOucVfKp4siXr8/gHvyaJHG9fGObCQf0pOqLNEFy3CsEzyl+CbZQbTj03A==
- 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: Mon, 24 Apr 2023 11:28:23 +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: AQHZc3rmCrt50C+BaEmmIgaK9uo9ea80IxGAgAFPzpCAABDqgIAC3lpQgAG3XoCAADcqoIAABVQAgAABqiA=
- Thread-topic: [PATCH v3 03/17] xen/arm: implement node distance helpers for Arm
Hi Jan,
> -----Original Message-----
> From: Jan Beulich <jbeulich@xxxxxxxx>
> Subject: Re: [PATCH v3 03/17] xen/arm: implement node distance helpers for
> Arm
> >>> Correct, I agree. I added a numa_init_distance() function (in patch #12)
> >>> to
> >>> set all values to NUMA_NO_DISTANCE. The numa_init_distance() will be
> >>> called in the beginning of numa_init().
> >>
> >> Why do you need a function for this? As said, this array can be pre-set at
> >> compile time (unless I'm overlooking something).
> >
> > Sorry I overlooked this comment, correct me if I am wrong, but IIUC we
> > can only pre-set the 2D array to 0 at the compile time. Could you please
> > elaborate a bit more about the code in your mind? Thanks!
>
> static unsigned char __ro_after_init
> node_distance_map[MAX_NUMNODES][MAX_NUMNODES] = {
> [0 ... MAX_NUMNODES - 1] = { [0 ... MAX_NUMNODES - 1] =
> NUMA_NO_DISTANCE }
> };
>
> or even (limiting redundancy a little)
>
> static unsigned char __ro_after_init
> node_distance_map[][MAX_NUMNODES] = {
> [0 ... MAX_NUMNODES - 1] = { [0 ... MAX_NUMNODES - 1] =
> NUMA_NO_DISTANCE }
> };
Yeah you are correct. I made a mistake that missing the
"[0 ... MAX_NUMNODES - 1]" in the left side of "=" hence my compiler
complained... Thanks for your patience.
Kind regards,
Henry
>
> Jan
|