Re: [PATCH 09/11] EDAC/ghes: Implement DIMM mapping table for SMBIOS handles
From: Borislav Petkov
Date: Mon Mar 16 2020 - 05:40:49 EST
On Fri, Mar 06, 2020 at 04:13:16PM +0100, Robert Richter wrote:
> GHES uses SMBIOS handles to identify the DIMM that was causing a hw
> error. Currently this is stored in smbios_handle of struct dimm_info.
> This implementation has several drawbacks. The information is private
> to the ghes driver, but struct dimm_info is for general use. The DIMMs
> are tied to a *mci struct, which makes a lockup inefficient. It is
"lookup"
> hard to dynamically allocate DIMMs and also to meet locking
> constraints when adding or removing them. This becomes even more
> challenging when having multiple MC instances that group a set of
> DIMMs, so the change is needed also to later support multiple MC
> instances.
Err, I don't understand: normally a bunch of DIMMs belong to a memory
controller and that gives you the hierarchy automatically. Why is that a
problem?
And normally you allocate the DIMM representations on MC init and
deallocate them when removing the MC.
So what is the problem here?
...
...
> @@ -72,6 +79,52 @@ struct memdev_dmi_entry {
> u16 conf_mem_clk_speed;
> } __attribute__((__packed__));
>
> +/* ghes_reg_mutex must be held. */
lockdep_assert_held()
...
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette