[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: Mon, 10 Oct 2022 15:03:53 +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=RXs+Rw3c07S61ga/EnGPnDlOFegROYKN+yl/244Q074=; b=f0TaJXiS3zSf3lYMU9S1dJX3C1BYSd92AFb7Ve00FTkE5aEHcCcdjmtOJd/zAnEMj+vme2N01IB42MIoh9a5Hq8ftZkcKvVYfr6E0kb+vSclRqRoAdJd/mZnEZotSZw4WArLeiNj2vUHyONveInYoWHpJBaMTHRQKHJ1XrlFBd3meBso6rFKf//qNpIAkctXovHWWB+EXRCSezNACWlBHPibW+GtFQFq3KeHjUINuzNST4UetJttpkp6GUAJgqsE0gn3NoKmhX1vCRyAqQ7qy+xXzxU6bJol75hLgUe1TMA9tO9IbrHDk7g+GdPDKSoXdNfzc8WeRMD1/tH0C7PLEg==
- 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=RXs+Rw3c07S61ga/EnGPnDlOFegROYKN+yl/244Q074=; b=O+ewbCVItR5XmaGceFuixHQAXNgD/pvL08F5N0z8ghRDZcDZWAq9AZPYXINzPyoehqr7YY343bxAtinRBt1SXJFFiICqdTdTKsDI9AzyUCa7+uePJeOg83D4PNa2OpDPWIDoWMyvJBIUqBlSqOj5bUV1pcfaY+RkC9JXFtOScXYRMX981/2SUE/DJ1OFEVS1ir68ezYBS8IdCa9FwnT9KVaelZWmUy/A5Ce09xNL08z6jv/S1lQgKRATIrlu/o7mSakmjkSZnDLqUkiUS8WXoZjSodqr7WiyVTo3i42E2drSBbJugOWn7NQtD1GlF7xU0Vh1tMgQPGv/knnG5uqoGQ==
- Arc-seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=HdZ6D9iXbS7AC/RDyAjKKOXArjxZOrvxxEsjzcrwAymw+dcujx/nzpHyfW5+Z6iT7CEXNDNOA6mbqG1bdAVcDsbiGFs3LCS/KWLGeZphhc8wcb8dlw0DzJLj2k3d3LTOncl2xnKUjTSu2evAS1MWhLduTY6KvnrIUbomjfbLm/Yft/EJHmtkJqPPTBFOhheWaRR2o2Bs3Hp4eBHdqGFHw8OpaFt8HRBVuM4Gur2igZ6sDl9NmvKZtam/tTu559q4UoqDVfCojzNeMT9DNwtSDauK7fbb2yFsMhuKVK8YijHERdd/c7qw57pOMLXhysYhVseqV50OGYOwsjNYNNi/DA==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mmg+T+vYfwvpz0MXT6pdkoYHIC1wMAzblW0dn++sMjhsxAXAN3C/aNBGKxQYsp6ePPzIxTizaOl1n4mMSzN45iyOxKgxd5FRuU4wrVKhBUfTYOIjSlRqTaKL+8K/bPfxscumGE2zi1ksUVh/5pgH3Iqq+ew9CBa6AKGLCQvIlJmKhHUXBWEMkIetB4Pt77c5F4nv/x/rrkSCAAgH3uLvRGBzqVCg1IdLoeyJbzUN+BJ4NTEWKeDwtohdmkN1tnXzZKxRAmrCITmAx1iWEthiNZhsgb324hvAALnh8OTvKMr8DbZ5wQkLAaCdb/v9O+LeqMSGxRezKE2dTEnPLECq3w==
- Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
- Cc: nd <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" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- Delivery-date: Mon, 10 Oct 2022 07:04:29 +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/10/9 15:25, Wei Chen wrote:
Hi Jan,
>
Even more so an answer to my question would be nice: You'll then have
CONFIG_HAS_NUMA_NODE_FWID=y even on Arm (using PXM as mandated by ACPI
when in ACPI mode). But then what's the FWID for DT? I know it was me
to suggest this build time distinction, but I'm afraid I wasn't doing
much good with that (and I'm sorry).
How about introducing a flag for selected NUMA implementation to
set it in runtime?
For example:
bool numa_has_fw_nodeid;
ACPI NUMA will set this flag to 1, but 0 for DT NUMA.
That's an option alongside going back to what you had in an earlier
version. Another would be (name subject to improvement)
const char *__ro_after_init numa_fw_nid_name;
When I was dealing with this comment, I found that I was still a little
unclear:
When we were introducing "CONFIG_HAS_NUMA_NODE_FWID", we wanted to
eliminate the redundant code of:
if ( fwid_name not equal to "node" )
printk(KERN_INFO "NUMA: Node %u %s %u [%"PRIpaddr"%"PRIpaddr"]%s\n",
node, fwid_name , arch_nid, start, end - 1,
hotplug ? " (hotplug)" : "");
else
printk(KERN_INFO "NUMA: Node %u [%"PRIpaddr", %"PRIpaddr"]%s\n",
node, start, end - 1, hotplug ? " (hotplug)" : "");
But when I am working with numa_fw_nid_name, I find it's still not
easy to reduce above redundant code. For example:
"NUMA: Node %u %s %u
When numa_fw_nid_name = NULL, we can print "" for %s, but can't reduce
the second %u.
So can we split this message into 3 lines like:
printk(KERN_INFO "NUMA: Node %u"...);
if (numa_fw_nid_name)
printk(KERN_INFO " %s %u"...);
printk(KERN_INFO "[%"PRIpaddr"%"PRIpaddr"]%s\n"...);
Or another option, we can force each NUMA implementation to assign a
string for numa_fw_nid_name. For example, in DT NUMA, we can assign
numa_fw_nid_name="SOCKET".
Cheers,
Wei Chen
which for ACPI would be set to "PXM" (eliminating the need to pass
it to certain functions, albeit the fw_nid will continue to need to
be passed anyway). I guess I'm not really certain which of this and
your earlier approach I prefer; the boolean you suggest above looks
less desirable to me, though.
Ok, I will follow your suggestion.
Cheers,
Wei Chen
Jan
|