lkml.org 
[lkml]   [2020]   [Jul]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v6 15/17] static_call: Allow early init
On Sat, 11 Jul 2020 07:08:31 +0200
Peter Zijlstra <peterz@infradead.org> wrote:

> On Fri, Jul 10, 2020 at 09:14:26PM -0400, Steven Rostedt wrote:
> > On Fri, 10 Jul 2020 15:38:46 +0200
> > Peter Zijlstra <peterz@infradead.org> wrote:
> >
> > > In order to use static_call() to wire up x86_pmu, we need to
> > > initialize earlier; copy some of the tricks from jump_label to enable
> > > this.
> > >
> > > Primarily we overload key->next to store a sites pointer when there
> > > are no modules, this avoids having to use kmalloc() to initialize the
> > > sites and allows us to run much earlier.
> > >
> >
> > I'm confused. What was the need to have key->next store site pointers
> > in order to move it up earlier?
>
> The critical part was to not need an allocation.

Why is an allocation needed? What's different about calling it early
that we need an allocation or this trick?

The two paragraphs above seem totally disconnected.

"In order to use static_call() to wire up x86_pmu, we need to
initialize earlier; copy some of the tricks from jump_label to enable
this."

What tricks were copied?

"Primarily we overload key->next to store a sites pointer when there
are no modules, this avoids having to use kmalloc() to initialize the
sites and allows us to run much earlier."

Why is kmalloc() (or this trick) needed to initialize the sites?

-- Steve

\
 
 \ /
  Last update: 2020-07-13 22:24    [W:0.072 / U:0.508 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site