From: "Yajun Deng" <yajun.deng@linux.dev>
To: "Luck, Tony" <tony.luck@intel.com>, "Borislav Petkov" <bp@alien8.de>
Cc: james.morse@arm.com, mchehab@kernel.org, rric@kernel.org,
corbet@lwn.net, linux-kernel@vger.kernel.org,
linux-edac@vger.kernel.org, linux-doc@vger.kernel.org
Subject: Re: [PATCH] EDAC: Expose node link in sysfs if CONFIG_NUMA
Date: Wed, 17 May 2023 02:49:47 +0000 [thread overview]
Message-ID: <f0a8449f4a428300a5143b6ea3a51b82@linux.dev> (raw)
In-Reply-To: <SJ1PR11MB60831CF4AC4E4C23DE362E0DFC799@SJ1PR11MB6083.namprd11.prod.outlook.com>
May 17, 2023 1:25 AM, "Luck, Tony" <tony.luck@intel.com> wrote:
>>> If we have '/sys/devices/system/node/node0/mc0', by comparing the number
>>> of dimm and MemTotal in meminfo. It is easy to know that the dimm didn't
>>> recognized whether it belonged to this NUMA node or not.
>>
>> mc != NUMA node.
>
> Modern systems have multiple memory controllers per socket.
> On an Icelake server I see:
>
> $ cd /sys/devices/system/edac/mc
> $ ls -l
> total 0
> drwxr-xr-x. 5 root root 0 May 16 10:13 mc0
> drwxr-xr-x. 3 root root 0 May 16 10:13 mc1
> drwxr-xr-x. 5 root root 0 May 16 10:13 mc2
> drwxr-xr-x. 3 root root 0 May 16 10:13 mc3
> drwxr-xr-x. 5 root root 0 May 16 10:13 mc4
> drwxr-xr-x. 3 root root 0 May 16 10:13 mc5
> drwxr-xr-x. 5 root root 0 May 16 10:13 mc6
> drwxr-xr-x. 3 root root 0 May 16 10:13 mc7
> drwxr-xr-x. 2 root root 0 May 16 10:13 power
> lrwxrwxrwx. 1 root root 0 May 16 03:11 subsystem -> ../../../../bus/edac
> -rw-r--r--. 1 root root 4096 May 16 03:11 uevent
>
> But I can figure out the socket topology with:
>
> $ grep . mc*/mc_name
> mc0/mc_name:Intel_10nm Socket#0 IMC#0
> mc1/mc_name:Intel_10nm Socket#0 IMC#1
> mc2/mc_name:Intel_10nm Socket#0 IMC#2
> mc3/mc_name:Intel_10nm Socket#0 IMC#3
> mc4/mc_name:Intel_10nm Socket#1 IMC#0
> mc5/mc_name:Intel_10nm Socket#1 IMC#1
> mc6/mc_name:Intel_10nm Socket#1 IMC#2
> mc7/mc_name:Intel_10nm Socket#1 IMC#3
>
> I think this should help connect "mc*" to which node
> they belong to.
>
Thanks!
Yes, mc_name may show the NUMA id, it depends on the vendor edac modules.
On the other hand, this directory '/sys/devices/system/node/node0/' should
show all resources that belong to it. It already has cpu and memory symbolic
link. Memory controller also belongs to one NUMA. The memory controller
symbolic link should appear under node* directory.
> -Tony
next prev parent reply other threads:[~2023-05-17 2:49 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-16 8:07 [PATCH] EDAC: Expose node link in sysfs if CONFIG_NUMA Yajun Deng
2023-05-16 10:34 ` Borislav Petkov
2023-05-16 11:07 ` Yajun Deng
2023-05-16 11:19 ` Borislav Petkov
2023-05-16 11:59 ` Yajun Deng
2023-05-16 12:10 ` Borislav Petkov
2023-05-16 17:25 ` Luck, Tony
2023-05-17 2:49 ` Yajun Deng [this message]
2023-05-17 7:43 ` Bagas Sanjaya
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f0a8449f4a428300a5143b6ea3a51b82@linux.dev \
--to=yajun.deng@linux.dev \
--cc=bp@alien8.de \
--cc=corbet@lwn.net \
--cc=james.morse@arm.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-edac@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=rric@kernel.org \
--cc=tony.luck@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).