linux-edac.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Borislav Petkov <bp@alien8.de>
To: Yazen Ghannam <yazen.ghannam@amd.com>
Cc: "Luck, Tony" <tony.luck@intel.com>,
	"linux-edac@vger.kernel.org" <linux-edac@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"x86@kernel.org" <x86@kernel.org>,
	"Smita.KoralahalliChannabasappa@amd.com" 
	<Smita.KoralahalliChannabasappa@amd.com>
Subject: Re: [PATCH] x86/mce: Increase maximum number of banks to 64
Date: Tue, 25 Aug 2020 20:34:02 +0200	[thread overview]
Message-ID: <20200825183402.GG12107@zn.tnic> (raw)
In-Reply-To: <20200824151105.GA3478291@yaz-nikka.amd.com>

On Mon, Aug 24, 2020 at 10:11:05AM -0500, Yazen Ghannam wrote:
> Thanks. Yeah, they're identical:
>    text    data     bss     dec     hex filename
>    15710076        13519306        5398528 34627910        2106146   vmlinux-32banks
>    15710076        13519306        5398528 34627910        2106146   vmlinux-64banks

So I went crazy here and built allmodconfigs for hypothetical CPUs which
support up to 4K MCA banks:

   text    data     bss     dec     hex filename
24618040        27211906        35409988        87239934        5332cfe vmlinux-32banks
24618040        27211906        35409988        87239934        5332cfe vmlinux-64banks
24618040        27211906        35409988        87239934        5332cfe vmlinux-128banks

For the first three - up to 128 banks, the sizes don't change.

24618000        27216002        35401796        87235798        5331cd6 vmlinux-256banks

Somewhere after 128 banks, it grows the data section but by exactly 4K,
i.e., one more page:

27216002 - 27211906 = 4096

The last page is not full, of course.

27216002 % 4096 = 2178
27211906 % 4096 = 2178

24618000        27220098        35401796        87239894        5332cd6 vmlinux-512banks

The same happens here.

27220098 - 27216002 = 4096
27220098 % 4096 = 2178

And so on:

24618000        27228290        35393604        87239894        5332cd6 vmlinux-1024banks
24618000        27244674        35377220        87239894        5332cd6 vmlinux-2048banks
24618000        27277442        35344452        87239894        5332cd6 vmlinux-4Kbanks

So what I think happens is, the first 128 banks fit within the same
.data section page thus vmlinux doesn't increase.

I guess there might be a .config which could cause that data increase
when the 32->64 banks move won't fit in the last .data page. It depends
on where those ~2K you computed and I snipped, land.

But since most kernels are allmodconfig builds, I guess we should be
fine.

So yeah, I guess we can take this one after you summarize the findings
of this thread in v2's commit message. :-)

Thx.

-- 
Regards/Gruss,
    Boris.

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

      reply	other threads:[~2020-08-25 18:34 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-20 17:06 [PATCH] x86/mce: Increase maximum number of banks to 64 Yazen Ghannam
2020-08-20 17:15 ` Borislav Petkov
2020-08-20 18:00   ` Yazen Ghannam
2020-08-20 18:15     ` Luck, Tony
2020-08-24 15:11       ` Yazen Ghannam
2020-08-25 18:34         ` Borislav Petkov [this message]

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=20200825183402.GG12107@zn.tnic \
    --to=bp@alien8.de \
    --cc=Smita.KoralahalliChannabasappa@amd.com \
    --cc=linux-edac@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --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).