lkml.org 
[lkml]   [2022]   [Aug]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3] x86,mm: print likely CPU at segfault time

* Ingo Molnar <mingo@kernel.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

\
 
 \ /
  Last update: 2022-08-06 11:00    [W:0.052 / U:0.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site