Re: [RFC PATCH v5 03/12] __wr_after_init: Core and default arch

2019-02-16 Thread Igor Stoppa
On 15/02/2019 10:57, Peter Zijlstra wrote: Where are the comments and Changelog notes ? How is an arch maintainer to be aware of this requirement when adding support for his/her arch? Yes, it will be fixed in the next revision. I've added comment to the core wr_assign function and also to

Re: [RFC PATCH v5 03/12] __wr_after_init: Core and default arch

2019-02-15 Thread Peter Zijlstra
On Fri, Feb 15, 2019 at 01:10:33AM +0200, Igor Stoppa wrote: > > > On 14/02/2019 13:28, Peter Zijlstra wrote: > > On Thu, Feb 14, 2019 at 12:41:32AM +0200, Igor Stoppa wrote: > > [...] > > > > +#define wr_rcu_assign_pointer(p, v) ({ \ > > > + smp_mb(); \ > > > + wr_assig

Re: [RFC PATCH v5 03/12] __wr_after_init: Core and default arch

2019-02-14 Thread Igor Stoppa
On 14/02/2019 13:28, Peter Zijlstra wrote: On Thu, Feb 14, 2019 at 12:41:32AM +0200, Igor Stoppa wrote: [...] +#define wr_rcu_assign_pointer(p, v) ({ \ + smp_mb(); \ + wr_assign(p, v);\ + p; \ +}) This r

Re: [RFC PATCH v5 03/12] __wr_after_init: Core and default arch

2019-02-14 Thread Peter Zijlstra
On Thu, Feb 14, 2019 at 12:41:32AM +0200, Igor Stoppa wrote: > +static inline void *wr_memset(void *p, int c, __kernel_size_t n) > +{ > + return memset(p, c, n); > +} > + > +static inline void *wr_memcpy(void *p, const void *q, __kernel_size_t n) > +{ > + return memcpy(p, q, n); > +} > + >

[RFC PATCH v5 03/12] __wr_after_init: Core and default arch

2019-02-13 Thread Igor Stoppa
The patch provides: - the core functionality for write-rare after init for statically allocated data, based on code from Matthew Wilcox - the default implementation for generic architecture A specific architecture can override one or more of the default functions. The core (API) functions ar