Re: [PATCH v3] x86/mce: Dynamically size space for machine check records

From: Borislav Petkov
Date: Tue Mar 26 2024 - 07:50:14 EST


On Thu, Mar 07, 2024 at 11:27:04AM -0800, Tony Luck wrote:
> - ret = gen_pool_add(tmpp, (unsigned long)gen_pool_buf, MCE_POOLSZ, -1);
> + mce_numrecords = max(MCE_MIN_ENTRIES, num_possible_cpus() * MCE_PER_CPU);
> + mce_poolsz = mce_numrecords * (1 << order);

So, on a big fat machine with 8K CPUs that's, what

8192 * 2 * (1 << 8) = ~4M

buffer?

Well, if you have a fat machine, you get fat buffers too.

--
Regards/Gruss,
Boris.

https://people.kernel.org/tglx/notes-about-netiquette