From: "Naik, Avadhut" <avadnaik@amd.com>
To: "Luck, Tony" <tony.luck@intel.com>, Borislav Petkov <bp@alien8.de>
Cc: "Mehta, Sohil" <sohil.mehta@intel.com>,
"x86@kernel.org" <x86@kernel.org>,
"linux-edac@vger.kernel.org" <linux-edac@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"yazen.ghannam@amd.com" <yazen.ghannam@amd.com>,
Avadhut Naik <avadhut.naik@amd.com>
Subject: [PATCH] x86/mce: Dynamically size space for machine check records
Date: Wed, 6 Mar 2024 17:21:51 -0600 [thread overview]
Message-ID: <cbf11eb9-ce90-426a-a27f-623e6c350426@amd.com> (raw)
In-Reply-To: <SJ1PR11MB6083F8541423267B852C510CFC212@SJ1PR11MB6083.namprd11.prod.outlook.com>
On 3/6/2024 16:07, Luck, Tony wrote:
>>> + mce_numrecords = max(80, num_possible_cpus() * 4);
>>
>> Per Boris's below suggestion, shouldn't this be:
>> mce_numrecords = max(80, num_possible_cpus() * 16);
>>
>>>> min(4*PAGE_SIZE, num_possible_cpus() * PAGE_SIZE);
>>>
>>> max() ofc.
>>>
>>>> There's a sane minimum and one page pro logical CPU should be fine on
>>>> pretty much every configuration...
>>
>> 4 MCE records per CPU equates to 1024 bytes, considering the genpool intrinsic
>> behavior you explained in the other subthread.
>
> Picking a good number of records-per-core may be more art than science. Boris
> is right that a page per CPU shouldn't cause any significant issue to systems with
> many CPUs, because they should have copious amounts of memory to make a
> balanced configuration. But 16 records per CPU feels way too high to me. The
> theoretical limit in a single scan of machine check banks on Intel is 32 (since
> Intel never has more than 32 banks). But those banks cover diverse h/w devices
> and it seems improbable that all, or even most, of them would log errors at the
> same time, with all CPUs on all sockets doing the same.
>
> After I posted the version with num_possible_cpus() * 4 I began to wonder whether
> "2" would be enough.
>
Was thinking along the same lines that 16 MCE records per thread might be too high.
But since Boris made the suggestion, I thought there might be a use case that I am
unaware of. Perhaps, some issue that had been debugged in the past. Hence, my
earlier question if it should be 16 instead of 4.
I think 2 records should also be good. IIRC, the patch that I submitted reserved
space of 2 records per logical CPU in the genpool.
>> Apart from this, tested the patch on a couple of AMD systems. Didn't observe any
>> issues.
>
> Thanks very much for testing.
>
> -Tony
--
Thanks,
Avadhut Naik
next prev parent reply other threads:[~2024-03-06 23:21 UTC|newest]
Thread overview: 68+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-07 22:56 [PATCH 0/2] Extend size of the MCE Records pool Avadhut Naik
2024-02-07 22:56 ` [PATCH 1/2] x86/MCE: " Avadhut Naik
2024-02-08 0:02 ` Luck, Tony
2024-02-08 17:41 ` Naik, Avadhut
2024-02-08 17:47 ` Naik, Avadhut
2024-02-08 18:39 ` Luck, Tony
2024-02-09 19:47 ` Naik, Avadhut
2024-02-08 21:09 ` Sohil Mehta
2024-02-09 19:52 ` Naik, Avadhut
2024-02-07 22:56 ` [PATCH 2/2] x86/MCE: Add command line option to extend " Avadhut Naik
2024-02-09 1:36 ` Sohil Mehta
2024-02-09 20:02 ` Naik, Avadhut
2024-02-09 20:09 ` Borislav Petkov
2024-02-09 20:35 ` Naik, Avadhut
2024-02-09 20:51 ` Borislav Petkov
2024-02-10 7:52 ` Borislav Petkov
2024-02-10 21:15 ` Naik, Avadhut
2024-02-11 11:14 ` Borislav Petkov
2024-02-12 2:54 ` Naik, Avadhut
2024-02-12 8:58 ` Borislav Petkov
2024-02-12 9:32 ` Borislav Petkov
2024-02-12 17:29 ` Luck, Tony
2024-02-12 17:54 ` Borislav Petkov
2024-02-12 18:45 ` Luck, Tony
2024-02-12 19:14 ` Borislav Petkov
2024-02-12 19:41 ` Luck, Tony
2024-02-12 21:37 ` Tony Luck
2024-02-12 22:08 ` Borislav Petkov
2024-02-12 22:19 ` Borislav Petkov
2024-02-12 22:42 ` Borislav Petkov
2024-02-28 23:14 ` [PATCH] x86/mce: Dynamically size space for machine check records Tony Luck
2024-02-29 0:39 ` Sohil Mehta
2024-02-29 0:44 ` Luck, Tony
2024-02-29 1:56 ` Sohil Mehta
2024-02-29 15:49 ` Yazen Ghannam
2024-02-29 17:22 ` Tony Luck
2024-02-29 17:21 ` Tony Luck
2024-02-29 23:56 ` Sohil Mehta
2024-02-29 6:42 ` Naik, Avadhut
2024-02-29 8:39 ` Borislav Petkov
2024-02-29 17:47 ` Tony Luck
2024-02-29 18:28 ` Naik, Avadhut
2024-02-29 18:38 ` Luck, Tony
2024-02-29 17:26 ` Tony Luck
2024-03-06 21:52 ` Naik, Avadhut
2024-03-06 22:07 ` Luck, Tony
2024-03-06 23:21 ` Naik, Avadhut [this message]
2024-02-15 20:18 ` [PATCH 2/2] x86/MCE: Add command line option to extend MCE Records pool Naik, Avadhut
2024-02-15 20:15 ` Naik, Avadhut
2024-02-15 20:14 ` Naik, Avadhut
2024-02-12 18:47 ` Yazen Ghannam
2024-02-12 18:58 ` Luck, Tony
2024-02-12 19:40 ` Naik, Avadhut
2024-02-12 20:18 ` Borislav Petkov
2024-02-12 20:51 ` Naik, Avadhut
2024-02-12 19:43 ` Yazen Ghannam
2024-02-12 19:49 ` Luck, Tony
2024-02-12 20:10 ` Borislav Petkov
2024-02-12 20:44 ` Paul E. McKenney
2024-02-12 21:18 ` Luck, Tony
2024-02-12 21:27 ` Borislav Petkov
2024-02-12 22:46 ` Paul E. McKenney
2024-02-12 22:53 ` Luck, Tony
2024-02-12 23:10 ` Borislav Petkov
2024-02-13 1:07 ` Paul E. McKenney
2024-02-09 20:16 ` Sohil Mehta
2024-02-09 20:28 ` Luck, Tony
2024-02-09 21:02 ` Sohil Mehta
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=cbf11eb9-ce90-426a-a27f-623e6c350426@amd.com \
--to=avadnaik@amd.com \
--cc=avadhut.naik@amd.com \
--cc=bp@alien8.de \
--cc=linux-edac@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sohil.mehta@intel.com \
--cc=tony.luck@intel.com \
--cc=x86@kernel.org \
--cc=yazen.ghannam@amd.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).