Re: [PATCH 2/6] __wr_after_init: write rare for static allocation

2018-12-19 Thread Igor Stoppa
On 12/12/2018 11:49, Martin Schwidefsky wrote: On Wed, 5 Dec 2018 15:13:56 -0800 Andy Lutomirski wrote: Hi s390 and powerpc people: it would be nice if this generic implementation *worked* on your architectures and that it will allow you to add some straightforward way to add a better

Re: [PATCH 2/6] __wr_after_init: write rare for static allocation

2018-12-12 Thread Martin Schwidefsky
On Wed, 5 Dec 2018 15:13:56 -0800 Andy Lutomirski wrote: > I added some s390 and powerpc people. > > On Tue, Dec 4, 2018 at 4:18 AM Igor Stoppa wrote: > > > > Implementation of write rare for statically allocated data, located in a > > specific memory section through the use of the

Re: [PATCH 2/6] __wr_after_init: write rare for static allocation

2018-12-10 Thread Peter Zijlstra
On Mon, Dec 10, 2018 at 12:32:21AM +0200, Igor Stoppa wrote: > > > On 06/12/2018 11:44, Peter Zijlstra wrote: > > On Wed, Dec 05, 2018 at 03:13:56PM -0800, Andy Lutomirski wrote: > > > > > > + if (op == WR_MEMCPY) > > > > + memcpy((void *)wr_poking_addr, (void *)src, len); >

Re: [PATCH 2/6] __wr_after_init: write rare for static allocation

2018-12-09 Thread Igor Stoppa
On 06/12/2018 11:44, Peter Zijlstra wrote: On Wed, Dec 05, 2018 at 03:13:56PM -0800, Andy Lutomirski wrote: + if (op == WR_MEMCPY) + memcpy((void *)wr_poking_addr, (void *)src, len); + else if (op == WR_MEMSET) + memset((u8 *)wr_poking_addr, (u8)src,

Re: [PATCH 2/6] __wr_after_init: write rare for static allocation

2018-12-09 Thread Igor Stoppa
On 06/12/2018 06:44, Matthew Wilcox wrote: On Tue, Dec 04, 2018 at 02:18:01PM +0200, Igor Stoppa wrote: +void *__wr_op(unsigned long dst, unsigned long src, __kernel_size_t len, + enum wr_op_type op) +{ + temporary_mm_state_t prev; + unsigned long flags; +

Re: [PATCH 2/6] __wr_after_init: write rare for static allocation

2018-12-09 Thread Igor Stoppa
On 06/12/2018 01:13, Andy Lutomirski wrote: + kasan_disable_current(); + if (op == WR_MEMCPY) + memcpy((void *)wr_poking_addr, (void *)src, len); + else if (op == WR_MEMSET) + memset((u8 *)wr_poking_addr, (u8)src, len); + else if (op ==

Re: [PATCH 2/6] __wr_after_init: write rare for static allocation

2018-12-06 Thread Peter Zijlstra
On Wed, Dec 05, 2018 at 03:13:56PM -0800, Andy Lutomirski wrote: > > + if (op == WR_MEMCPY) > > + memcpy((void *)wr_poking_addr, (void *)src, len); > > + else if (op == WR_MEMSET) > > + memset((u8 *)wr_poking_addr, (u8)src, len); > > + else if (op ==

Re: [PATCH 2/6] __wr_after_init: write rare for static allocation

2018-12-06 Thread Peter Zijlstra
On Wed, Dec 05, 2018 at 03:13:56PM -0800, Andy Lutomirski wrote: > > + if (op == WR_MEMCPY) > > + memcpy((void *)wr_poking_addr, (void *)src, len); > > + else if (op == WR_MEMSET) > > + memset((u8 *)wr_poking_addr, (u8)src, len); > > + else if (op ==

Re: [PATCH 2/6] __wr_after_init: write rare for static allocation

2018-12-05 Thread Matthew Wilcox
On Tue, Dec 04, 2018 at 02:18:01PM +0200, Igor Stoppa wrote: > +void *__wr_op(unsigned long dst, unsigned long src, __kernel_size_t len, > + enum wr_op_type op) > +{ > + temporary_mm_state_t prev; > + unsigned long flags; > + unsigned long offset; > + unsigned long

Re: [PATCH 2/6] __wr_after_init: write rare for static allocation

2018-12-05 Thread Matthew Wilcox
On Tue, Dec 04, 2018 at 02:18:01PM +0200, Igor Stoppa wrote: > +void *__wr_op(unsigned long dst, unsigned long src, __kernel_size_t len, > + enum wr_op_type op) > +{ > + temporary_mm_state_t prev; > + unsigned long flags; > + unsigned long offset; > + unsigned long

Re: [PATCH 2/6] __wr_after_init: write rare for static allocation

2018-12-05 Thread Andy Lutomirski
I added some s390 and powerpc people. On Tue, Dec 4, 2018 at 4:18 AM Igor Stoppa wrote: > > Implementation of write rare for statically allocated data, located in a > specific memory section through the use of the __write_rare label. > > The basic functions are: > - wr_memset(): write rare

Re: [PATCH 2/6] __wr_after_init: write rare for static allocation

2018-12-05 Thread Andy Lutomirski
I added some s390 and powerpc people. On Tue, Dec 4, 2018 at 4:18 AM Igor Stoppa wrote: > > Implementation of write rare for statically allocated data, located in a > specific memory section through the use of the __write_rare label. > > The basic functions are: > - wr_memset(): write rare

[PATCH 2/6] __wr_after_init: write rare for static allocation

2018-12-04 Thread Igor Stoppa
Implementation of write rare for statically allocated data, located in a specific memory section through the use of the __write_rare label. The basic functions are: - wr_memset(): write rare counterpart of memset() - wr_memcpy(): write rare counterpart of memcpy() - wr_assign(): write rare

[PATCH 2/6] __wr_after_init: write rare for static allocation

2018-12-04 Thread Igor Stoppa
Implementation of write rare for statically allocated data, located in a specific memory section through the use of the __write_rare label. The basic functions are: - wr_memset(): write rare counterpart of memset() - wr_memcpy(): write rare counterpart of memcpy() - wr_assign(): write rare