[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Yu4tV9FmEQmbB4AU@gmail.com>
Date: Sat, 6 Aug 2022 10:59:03 +0200
From: Ingo Molnar <mingo@...nel.org>
To: Rik van Riel <riel@...riel.com>
Cc: Borislav Petkov <bp@...en8.de>, x86@...nel.org,
linux-kernel@...r.kernel.org, kernel-team@...com,
Dave Hansen <dave.hansen@...el.com>,
Thomas Gleixner <tglx@...utronix.de>,
Andy Lutomirski <luto@...nel.org>
Subject: Re: [PATCH v3] x86,mm: print likely CPU at segfault time
* Ingo Molnar <mingo@...nel.org> wrote:
> > instrumentation_begin();
> > - handle_page_fault(regs, error_code, address);
> > + handle_page_fault(regs, error_code, address, cpu);
>
> Not convinced that this is a good change: this will bloat all the
> affected code by a couple of dozen instructions - for no good reason in
> the context of this patch.
>
> Boris, why should we do this? Extracting a parameter at higher levels and
> passing it down to lower levels is almost always a bad idea from a code
> generation POV, unless the majority of lower levels needs this
> information anyway (which isn't the case here).
Oh, I just got to this series in my mbox:
[RFC PATCH 0/5] Print CPU at segfault time
...
[RFC PATCH 5/5] x86/entry: Store CPU info on exception entry
With that basis, printing the segfault CPU becomes a 'free' feature.
At the cost of putting ~2 new instructions into the hotpath of every
exception though. :-/
Thanks,
Ingo
Powered by blists - more mailing lists