lkml.org 
[lkml]   [2013]   [May]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/2] Fix perf LBR filtering

* Andi Kleen <andi@firstfloor.org> wrote:

> >
> > OK, so how about we use something like:
> >
> > is_kernel_text() || is_module_text_address()
>
> is_module_text_address() has to walk all modules.
> A random system with a distro kernel I checked has 101 modules loaded.

I checked another random distro and it had 30 modules loaded.

> 16 * 101 = too much
>
> I don't think you want to spend that many cycles in the NMI
> handler for a dubious feature. Ok in theory you could
> add something with binary search, but that would be quite
> a bit of effort and it would be probably challenging
> to do that all NMI safe.

If anyone using LBR sees that overhead it can be improved. You or others
who care can improve it.

(Or if the hardware gets fully fixed, it can be removed for that
hardware.)

> Also it wouldn't work for all these new kernel JITs people are doing of
> course.

They'll miss the filtering, until they offer the proper
is_kernel_jit_text() primitive that is.

> Still think my patch is the best so far? (plus the missing root check)

Your patch simply disables the filtering for kernel addresses, it's the
worst of all options so far.

Anyway, what Peter asked for is a trivial change that solves the bug - are
you willing to respond to his review feedback and submit an updated
series?

Thanks,

Ingo


\
 
 \ /
  Last update: 2013-05-01 14:01    [W:1.313 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site