[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v1 27/29] xen/asm-generic: introduce stub header numa.h


  • To: Oleksii Kurochko <oleksii.kurochko@xxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Thu, 19 Oct 2023 13:45:33 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.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=7GlvpTOHiSo+w+OjXg2GACEazVVU3JeFmQjRK4NWK0Y=; b=BPtsHbbEipKaLUOCzxOfjVZxGOmIdvWCr742jiZzk/KUkjlsRGyBLSNg/F64DjmRnrexjIHU8GH6kHkOH2zxsD1VVWGzeqHw/gI5t1cfa/AFOOip6oaKrU8+rLVkOWsYwQ4SY2xbQsTh3HAVI3Gbn3YajNg0K3YHdhMgY8mkPbd5EVUfZJ7p9DAaSMLgdYpjStJB++wdYdZQ0IWoO9ozRKZRsXJwDv4xyX9JlZGzZKv0bhuR1+4C+Jb0S3saiwqDwOnIeHhW80DsEdK/NMjTrbfNunkrHq5ttzGTduDGeEjPumHC9N9hXLwEWnKXW8RKXa6nKAveQ6qi2tkVrxaLDw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BuI85PPti6YIAYnjE95yuDnehOAf5Y19EaF42r4gMnpqUpRLhpyHPJ/P6hYMmQ5Vuy4xxMWA39LgF/SOZI5y8kopwiBVChCrl6kSgSEx6+onbkoPBvp8g0+nLMufnYpLgbvCrf1MqzIEHIcKRHlLUoYjUm4WPUPK2Jw1hUidxKto0xNgPa7Wm1QPmElud9H2KyY5vdgQOVUjDcpeAnpeqvtIR43h7/3g5syp3EJJTquPZlL13yP14P2GRsUntBAEhAdJUf/6b75v0GbfBwB5q5LQA/xyCvg2i1o7jCVSmw55MOFAa/P0/s4DwxIwF3wBFBCttgvu14t/QaXlVBTmQg==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Thu, 19 Oct 2023 11:45:42 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 14.09.2023 16:56, Oleksii Kurochko wrote:
> --- /dev/null
> +++ b/xen/include/asm-generic/numa.h
> @@ -0,0 +1,35 @@
> +/* SPDX-License-Identifier: GPL-2.0-only */
> +#ifndef __ARCH_GENERIC_NUMA_H
> +#define __ARCH_GENERIC_NUMA_H
> +
> +#include <xen/mm.h>
> +
> +typedef u8 nodeid_t;

If an 8-bit quantity, then uint8_t please.

> +/* Fake one node for now. See also node_online_map. */
> +#define cpu_to_node(cpu) 0
> +#define node_to_cpumask(node)   (cpu_online_map)

Looks like this really is fake NUMA then, with just a single node. That's
certainly in need of expressing in a comment.

> +extern mfn_t first_valid_mfn;
> +
> +#define node_spanned_pages(nid) (max_page - mfn_x(first_valid_mfn))
> +#define node_start_pfn(nid) (mfn_x(first_valid_mfn))
> +#define __node_distance(a, b) (20)

This also needs commenting, even if it ended up being "arbitrary".

> +static inline unsigned int arch_get_dma_bitsize(void)
> +{
> +    return 32;

Same here.

Jan



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.