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

Re: [PATCH v5 5/6] xen/x86: move NUMA scan nodes codes from x86 to common


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Wei Chen <Wei.Chen@xxxxxxx>
  • Date: Thu, 29 Sep 2022 16:21:02 +0800
  • Arc-authentication-results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dkim=[1,1,header.d=arm.com] dmarc=[1,1,header.from=arm.com])
  • 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=2; 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=R3e9ztFjUAK5abcVlWInf+/G3+btOG244YKSL8pbIpk=; b=Bzn0BjfsKj2V6iFul1rK5VLyExNgEXXSL9Svlgsp+6ItoYFhcQkIuHAY7KZHDzuF3nMQIdOLJK1h6QkOiRD+3YSx8ooXr8h2Ve9heHyCMMi9HAc1J5DXZ7eVZnofRioc47S7UREX8XvDDaSsNDoTzq6QbfF2neYNJNUR8Av0vKQ8lBeetOMI403A8em22mvI5e729rRqvB42KIj0U9PB8K3jHvjhkGgnMMC1Crta1F6V8cHv66zOq9CwX91VX83CH3qdfGm2pQCkUpgSf5c5y4UPOKlQQMnrv7r3vgV+C93jTTPPVx834yr7tNlaSwpKAsSVLcB7609Dp7tnipbihg==
  • 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=R3e9ztFjUAK5abcVlWInf+/G3+btOG244YKSL8pbIpk=; b=kEX4k7C4aveTBMhFkHyhL7ROodI8yucwqroXD7dIel9FTdjmlOu4+C03+5KBYWmF2Erw/jimJO5y1+CVbA9GDoAaxN4l0WxDQQfdPvt7xO7fwVgdbaUTAOd6Cr1j5I1pNsgHYSTNGsFfAbY86PkSSw+I0bNq/aVowB9unENqgASaBtNs88C4qIRMF/Pqpjw+adJL4Dp+8HfaqHysxokDnpCwYOnGHDc9hTguM81cBJosdup3p7ueO3KkMx4jCm2V5H5zg6T6AkTKMmvD+vY42bqYDaNLvTooTS6ZIkGbgN83SgNPdLMi6Qeue0vQEMinl4QtiY2oQdTZCi554Xeejg==
  • Arc-seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=gQYiwSWvfAUJhGhAFyAYVHMYFbuv7AXPnt2jyAi/0lEygtRDmOpWyal8ym2Q3WL9WdQzmCXOWTB4yEr4kURq4IQa9sV9b7GsjixNTRDz1fVACuW4Bo0cLXvwnrXkNnAYQFOK4+TJDTSwJSWt5s2Z4Di9MRh7ODfGuH22D/i0Q8T5o7jdTAawiy4w4sTLTmzcdkCfUNP1VD6U2ZWzMsX13Xw9bLorcaPvVNEz94cSbn6hKX4vSjFcjWYSMqXM+zQq6OPLvlE8lq4ymDpGC3IXYk7JFqN0WPswQE3mIMBKL8yG6Eej+0dAo/uQ1l+z8UHjy8Ft5DZeCXl5sC12CN8l1A==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HtB2f0UIFxNRpHn0F8lepaUnjxeGvJCvc7KB4BIavWJvzqSWrM7ofMCoadCJVfUDPp+sCbdX1jM9bR1bQyWE9kLkVTXpb4c1XztkXNhooNYr1Z6QbSci+OQIXBIITPwwvHbvTOvSY5BmLiCLp6+P8K5O+7jH93kZq0k3WLO11WG5l7xgAdoEzk930QSfYvNWJ9OsQLaF02WeXWLlcS96GNHXPAziWmZX0eAF4S0bzTfn9o6JCiRNgdPq6jxrzgxbr57GgCArynHu7yCi0cFkGNe5mZIkghz5OKQakD7Sgmiz1Z0775LJ8oC5zrMizh6fvziVhvF5Oworw5VEvevA+A==
  • Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Cc: nd@xxxxxxx, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Thu, 29 Sep 2022 08:21:28 +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;

Hi Jan,

On 2022/9/27 23:48, Jan Beulich wrote:
On 20.09.2022 11:12, Wei Chen wrote:
+static bool __init nodes_cover_memory(void)
+{
+    unsigned int i;
+
+    for ( i = 0; ; i++ )
+    {
+        int err;
+        bool found;
+        unsigned int j;
+        paddr_t start, end;
+
+        /* Try to loop memory map from index 0 to end to get RAM ranges. */
+        err = arch_get_ram_range(i, &start, &end);
+
+        /* Reached the end of the memory map? */
+        if ( err == -ENOENT )
+            break;
+
+        /* Skip non-RAM entries. */
+        if ( err )
+            continue;
+
+        do {
+            found = false;
+            for_each_node_mask ( j, memory_nodes_parsed )
+                if ( start < nodes[j].end
+                    && end > nodes[j].start )

Nit: Style (placement of && and indentation). Does this actually need
splitting across two lines?


After covert from tab to spaces, yes, it doesn't need split into two lines. I will fix it.

--- a/xen/drivers/acpi/Kconfig
+++ b/xen/drivers/acpi/Kconfig
@@ -7,4 +7,5 @@ config ACPI_LEGACY_TABLES_LOOKUP
config ACPI_NUMA
        bool
+       select HAS_NUMA_NODE_FWID
        select NUMA

While I might guess that you've chosen the insertion point to have
things sorted alphabetically, I think here it would be more natural
to select the wider option first and then also select the more
narrow one.


Ok, I will adjust the order.

One further question though: How is this going to work for Arm64
once it wants to support both the form of NUMA you're working to
enable _and_ ACPI-based NUMA? There better wouldn't be a requirement
to pick one of the two at build time - it would be nice for support
of both forms to be able to co-exist in a single binary.

We are also working in this way. In part#3, we will check ACPI first,
only when ACPI is off, the DT NUMA will be used by Arm. If ACPI is on, we will skip DT NUMA.

Cheers,
Wei Chen


Jan



 


Rackspace

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