lkml.org 
[lkml]   [2020]   [Jul]   [14]   [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 Tue, 14 Jul 2020 20:31:43 +0200
Peter Zijlstra <peterz@infradead.org> wrote:

> On Tue, Jul 14, 2020 at 12:07:01PM -0400, Steven Rostedt wrote:
> > Can we add a statement that says something like: "Because x86 now calls
> > static_call_init() before the setup of the memory allocator, we must
> > avoid using kmalloc() and friends for core kernel static calls." ?
> >
> > This was the missing piece for me.
>
> It now reads like this.
>
> ---
> Subject: static_call: Allow early init
> From: Peter Zijlstra <peterz@infradead.org>
> Date: Fri, 4 Oct 17:21:10 CEST 2019
>
> In order to use static_call() to wire up x86_pmu, we need to
> initialize earlier, specifically before memory allocation works; 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.

All the pieces lie in place. Thanks!

Reviewed-by: Steven Rostedt (VMware) <rostedt@goodmis.org>

-- Steve

>
> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
> ---

\
 
 \ /
  Last update: 2020-07-14 21:38    [W:0.071 / U:0.412 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site