[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 05/10] xen/x86: Use ASSERT instead of VIRTUAL_BUG_ON for phys_to_nid
- To: Jan Beulich <jbeulich@xxxxxxxx>
- From: Wei Chen <Wei.Chen@xxxxxxx>
- Date: Wed, 27 Apr 2022 14:27:41 +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=If2X0BlV/dg9z6xzoWqRbdLtn4k0nYahiIeBt+aBCRY=; b=V0+bLIIgPCShs+GiIoJgQUj5RAbEoG60IXBDxFCL/Oe6XWeAoozeaImguJVPeHYnObBO2LzGvfoRQST269kfsdziG2U5/vnpSUWjxVOLM7MhnDldUL88w74smAJwf5v1ACcaBD0Pa+Qii5fGponAGUnYOITH8VGTf1WCsiUtjkBeV92sVEQ76HN6eBa9aL5O6hQmM6mhukLltzfgpAtCNmJVY4Meim3baJj6rzZOAYD7Lv45INaeo/gNMYUyQTixHWjRvrcQoa3uxpY68T2oQ3GsU5Z7gJ1eoR3A8GWj0H6ugiPsWjKC035xbHXBvI/jiPwNHVtQilh6D2U9KEJchA==
- 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=If2X0BlV/dg9z6xzoWqRbdLtn4k0nYahiIeBt+aBCRY=; b=fwhWdk6v0ex5wNoKv7Ek3YUVgAIsFdIus35TwjPNHKCvF9RiAMdpD8QcA1d9H0zBevxRrGqRlQpJJaYHC9q8F3No5yUp5bsS6atDwe0RZcRgvw0XorOznPQgA6zde/qRMd4UhTd1zODgmIBtSTmXPhtq7mI4ZhVtXcDrumhEftFtVSw4Yy6bYyd//U4CpAae7nlyEl/jkZEG3ODtjdGxkzgD18ICWnYNfTCh0WdbxV6bWfFyjVUvqLfHnFRxUPSqmz3UrmR5jjvT+AhFwHcM+rgS3c541KNczllN1Zt/jdjB6CWAaObqR/wYXKpCeaPN9pbnAdE2Thi4XPjXXY+7zA==
- Arc-seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=IOpAZbse73k1qE/VI1xBX1kgVEm3meYIwMqXWeD+xOFTSy+MQ1lPshLDeEnjVVz52eAnU3BTyWkOjMnEl2UVIfdv+KR9gm0p/fBLS0qYxyn4L0wGpJBRJgDK6CGuS97x6suV/o1ROGgYWUlkZLzGu6bLG7Fj73guGIrUjZXHnRDyEQF4Ns1poQnQtU5sRh1XDL9Um3MDWUji/jYoMX7t0MnMTBwBtGDJgsEPwpGx83jO2vjrhDMwPEYCAsC0AKsfLnslqdJc3f3VLJgc40KX+H9G+YK1WEkoHe2lAdcGyz5JAmNoUoB65P/GGkJ7XczilYcEKW8TwKgYzqP4Hf/oqA==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mvcC7AAvNDFPzijd4lOPHT4vLO5Mtvg2kXIr6mtbmnHMk63bBMOS5nxlHS63rSBhLTSfSDX2IWXnKigrPdSqlhk57u5Ay7yE/E0Vb0aofdOYfXK2K99SxVD9MNxT+9xpoJXISk3ZtDZR/RrBUXJ83oCnUBtBfJSclHpkBMS22eGsJryR4OxLn+rRYWk0Cem9TImwVdsemriJoVrLq/BQRd5uWUGLYhebzkSkzWK/NfO6kyAVFr4t92V8hm2V2nfrVqMBNgh9dpZH/kntbXMqrzN2qq6M04nHyz7uuAuEVP13uDcHYgWYaoK2vSybXwZk6SbrY76hDQ8IhoEHSuVRTQ==
- 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: Wed, 27 Apr 2022 06:28:02 +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/4/27 13:56, Jan Beulich wrote:
On 27.04.2022 05:52, Wei Chen wrote:
From: Jan Beulich <jbeulich@xxxxxxxx>
Sent: 2022年4月26日 22:42
On 26.04.2022 12:59, Wei Chen wrote:
On 2022/4/26 17:02, Jan Beulich wrote:
On 18.04.2022 11:07, Wei Chen wrote:
2. error: wrong type argument to unary exclamation mark.
This is because, the error-checking code contains !node_data[nid].
But node_data is a data structure variable, it's not a pointer.
So, in this patch, we use ASSERT instead of VIRTUAL_BUG_ON to
enable the two lines of error-checking code. And fix the left
compilation errors by replacing !node_data[nid] to
!node_data[nid].node_spanned_pages.
Because when node_spanned_pages is 0, this node has no memory,
numa_scan_node will print warning message for such kind of nodes:
"Firmware Bug or mis-configured hardware?".
This warning is bogus - nodes can have only processors. Therefore I'd
like to ask that you don't use it for justification. And indeed you
Yes, you're right, node can only has CPUs! I will remove it.
don't need to: phys_to_nid() is about translating an address. The
input address can't be valid if it maps to a node with no memory.
Can I understand your comment:
Any input address is invalid, when node_spanned_pages is zero, because
this node has no memory?
It's getting close, but it's not exactly equivalent I think. A node
with 0 bytes of memory might (at least in theory) have an entry in
memnodemap[]. But finding a node ID for that address would still
I have done a quick check in populate_memnodemap:
74 spdx = paddr_to_pdx(nodes[i].start);
75 epdx = paddr_to_pdx(nodes[i].end - 1) + 1;
76 if ( spdx >= epdx )
77 continue;
It seems that if node has no memory, start == end, then this function
will not populate memnodemap entry for this node.
not mean that at least one byte of memory at that address is present
on the given node, because the node covers 0 bytes.
And back to this patch, can I just drop the unnecessary justification
from the commit message?
Well, you'll want to have _some_ justification for that particular
aspect of the patch.
Ok.
And for the bogus warning message, can I update it to an INFO level
message in part#2 series, and just keep:
printk(KERN_INFO "SRAT: Node %u has no memory!\n", i);
but remove "BIOS Bug or mis-configured hardware?\n", i); ?
This sounds at least plausible to do.
Ok.
Jan
|