Re: [PATCH 11/15] static_call: Add inline static call infrastructure

2019-10-01 Thread Peter Zijlstra
On Mon, Jun 10, 2019 at 12:19:29PM -0500, Josh Poimboeuf wrote: > On Fri, Jun 07, 2019 at 10:37:56AM +0200, Peter Zijlstra wrote: > > > > +} > > > > + > > > > +static int static_call_module_notify(struct notifier_block *nb, > > > > +unsigned long val, void *data)

Re: [PATCH 11/15] static_call: Add inline static call infrastructure

2019-06-10 Thread Josh Poimboeuf
On Mon, Jun 10, 2019 at 06:33:26PM +, Nadav Amit wrote: > > On Jun 10, 2019, at 10:19 AM, Josh Poimboeuf wrote: > > > > On Fri, Jun 07, 2019 at 10:37:56AM +0200, Peter Zijlstra wrote: > +} > + > +static int static_call_module_notify(struct notifier_block *nb, > +

Re: [PATCH 11/15] static_call: Add inline static call infrastructure

2019-06-10 Thread Nadav Amit
> On Jun 10, 2019, at 10:19 AM, Josh Poimboeuf wrote: > > On Fri, Jun 07, 2019 at 10:37:56AM +0200, Peter Zijlstra wrote: +} + +static int static_call_module_notify(struct notifier_block *nb, + unsigned long val, void *data) +{ + struct

Re: [PATCH 11/15] static_call: Add inline static call infrastructure

2019-06-10 Thread Josh Poimboeuf
On Fri, Jun 07, 2019 at 10:37:56AM +0200, Peter Zijlstra wrote: > > > +} > > > + > > > +static int static_call_module_notify(struct notifier_block *nb, > > > + unsigned long val, void *data) > > > +{ > > > + struct module *mod = data; > > > + int ret = 0; > > > + > > >

Re: [PATCH 11/15] static_call: Add inline static call infrastructure

2019-06-07 Thread Peter Zijlstra
On Fri, Jun 07, 2019 at 04:35:42PM +, Nadav Amit wrote: > > On Jun 7, 2019, at 1:37 AM, Peter Zijlstra wrote: > > On Thu, Jun 06, 2019 at 10:24:17PM +, Nadav Amit wrote: > >>> + if (ret) { > >>> + WARN(1, "Failed to allocate memory for static calls"); > >>> +

Re: [PATCH 11/15] static_call: Add inline static call infrastructure

2019-06-07 Thread Nadav Amit
> On Jun 7, 2019, at 1:37 AM, Peter Zijlstra wrote: > > On Thu, Jun 06, 2019 at 10:24:17PM +, Nadav Amit wrote: > >>> +static void static_call_del_module(struct module *mod) >>> +{ >>> + struct static_call_site *start = mod->static_call_sites; >>> + struct static_call_site *stop = mod->s

Re: [PATCH 11/15] static_call: Add inline static call infrastructure

2019-06-07 Thread Peter Zijlstra
On Thu, Jun 06, 2019 at 10:24:17PM +, Nadav Amit wrote: > > +static void static_call_del_module(struct module *mod) > > +{ > > + struct static_call_site *start = mod->static_call_sites; > > + struct static_call_site *stop = mod->static_call_sites + > > + m

Re: [PATCH 11/15] static_call: Add inline static call infrastructure

2019-06-06 Thread Nadav Amit
> On Jun 5, 2019, at 6:08 AM, Peter Zijlstra wrote: > > From: Josh Poimboeuf > > Add infrastructure for an arch-specific CONFIG_HAVE_STATIC_CALL_INLINE > option, which is a faster version of CONFIG_HAVE_STATIC_CALL. At > runtime, the static call sites are patched directly, rather than using >

[PATCH 11/15] static_call: Add inline static call infrastructure

2019-06-05 Thread Peter Zijlstra
From: Josh Poimboeuf Add infrastructure for an arch-specific CONFIG_HAVE_STATIC_CALL_INLINE option, which is a faster version of CONFIG_HAVE_STATIC_CALL. At runtime, the static call sites are patched directly, rather than using the out-of-line trampolines. Compared to out-of-line static calls,