[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v5 1/6] xen/x86: Provide helpers for common code to access acpi_numa
- To: Jan Beulich <jbeulich@xxxxxxxx>
- From: Wei Chen <Wei.Chen@xxxxxxx>
- Date: Thu, 29 Sep 2022 14:29:30 +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=/YAw0gVf/fUr4SLwG77Ds/8+6rISHbIekQQqTPtcWXk=; b=D61087EcXnVltQeGJpEONGx8E+yylfu22FmzWNWuUtdnmCENyy3mySfaIirX2pDEGU/s8XwueqeS0Ue6bKo6Ptvoi99VeYpNPq1YNlDOwigYXMEwvlTt7RWKtVBkBfqTvB1rV2cByd32oWOk74Y4es0mpOEMpc3Daup79mgRk1sB7HyAy63uTTOOZ6TsMP0Q3SMcW3CTKhOH6hpB8fYujn6sbLqNvorttCAfAukX/vTdZdhX+bP2aeMMBe5GajL80yg0y7RFxnJRnFsXZWS0fGXjhIgPPPEcIMnsLPJFYOq9Eo7AjVIffv1/pWJgyDBHmB/oP0FKBOgCre4SjATphg==
- 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=/YAw0gVf/fUr4SLwG77Ds/8+6rISHbIekQQqTPtcWXk=; b=WYVmbnUDovp/JS1XTWQuB+MkL29g7AobLN5fivkp6FoF4TAXrLMdoBPZb77Uq/0URuXVxHc0V1R2ifkDkmc99DQRck1BHXFIIs2wMzqh8CkCjEqSs3fmfuvI2sQWKy6pZadavrVc9qkLoHE3kR//7Vd8BNpFDYtJ9oNv/Mt4jy4g5jlR+hviSwKfWyhqH5cG/BCQm0FW/C7IuZKZyqebOsmZrGwWAoY8eZwIHTMPdoMbMsP35DZN0osIFU8Hp8lsndu0dbV2TKjflRmEAMSXok8V3GuC/xEMWVsvGaEn5e0idL79qe76xLXgoRN7MvxzcC+6zjIgp9xe0h81H7IwRQ==
- Arc-seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=LAbOFx63XJRteHNltl+VRmxBDSki6THR2QhIW/AltE69fW4IJo2A666BE+9O9CklhNDNV4lLssaWpMDc915NijvHMc1wVgwVZAYhtUvOHyFzA0nHOtcckhsADR6IxiCFN2q82XPYF9Cs/n6OsBLGKcC2BiSNHLdLhKyjU2CHDHuOa9yqSnuuS8FEmEhC/flpaT3FPcyW9dlOGD16cYf2GB2blkM25VtMaOrfdnkFtSQjT08dg+PXU2eGxLtO8hvvPygnjasNA7+iFOoCc8ua4f3lq9GOWqWu/bIbROmClEAM27QCPutYkZxam5P+O9WOrsRw//WBFXZl3KUza9nAcg==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ofV5m+GKBrTZ89k+aNHbnGc3dPoF5aORAxDLVVrySVTgHFaL3ZpQdyLvzzPLRY2rU6jXd9OCDMJl0wXIKRgpW/6k9HyJITy78j/JB04VWmQduQ0Iq5fnQ9IZtAItI+bq4dJjt9p2TjW7WX69q3bcicRKmCD5Wq1a8K0E8KTvKpRS3o8orRspLhEm8B797w/Z5dewU36At4kIaQ+yEH8evOneT12z+s3g495f7ZpVk/K4iW0BIsbV/ceJddvnFCbLkVC7YAcKKoS3ApuwvibZ15/eh+yQMIDJcblvKsTAaDw+BTTSKXyrmqm+hei1rZ4Bn/abNQLpFw07Gin5ptrRyg==
- 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>, xen-devel@xxxxxxxxxxxxxxxxxxxx
- Delivery-date: Thu, 29 Sep 2022 06:30:14 +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 15:37, Jan Beulich wrote:
On 20.09.2022 11:12, Wei Chen wrote:
--- a/xen/arch/x86/numa.c
+++ b/xen/arch/x86/numa.c
@@ -50,9 +50,28 @@ nodemask_t __read_mostly node_online_map = { { [0] = 1UL } };
bool numa_off;
s8 acpi_numa = 0;
-int srat_disabled(void)
+int __init arch_numa_setup(const char *opt)
{
- return numa_off || acpi_numa < 0;
+#ifdef CONFIG_ACPI_NUMA
+ if ( !strncmp(opt, "noacpi", 6) )
+ {
+ numa_off = false;
+ acpi_numa = -1;
When making the v5 changes, did you go over the results to check they are
actually consistent? I'm afraid they still aren't, because of the line
above: Here we disable NUMA, but that doesn't mean there's broken firmware.
Yes, you're right. I had not realized it while I was modifying this patch.
Therefore I guess I need to ask for another round of renaming of the two
helper functions; I'm sorry for that. What you introduce ...
+ return 0;
+ }
+#endif
+
+ return -EINVAL;
+}
+
+bool arch_numa_broken(void)
+{
+ return acpi_numa < 0;
+}
... here wants to be arch_numa_disabled(), whereas the function currently
named this way (in patch 5) wants to be e.g. arch_numa_unavailable() (or,
using inverted sense, arch_numa_available()). Of course I'll be happy to
see other naming suggestions for both functions, as long as they reflect
the respective purposes.
Alternatively, to retain the current naming, the assignments to acpi_numa
would need revising. But I think that would be the more fragile approach.
Yes, I agree with you, I will rename these two functions. Your suggested
names are reasonable, I will use them in next version.
Cheers,
Wei Chen
Jan
|