Re: [RFC PATCH v2 for 4.15 08/14] Provide cpu_opv system call

2017-11-06 Thread Boqun Feng
On Tue, Nov 07, 2017 at 02:40:37AM +, Mathieu Desnoyers wrote: > - On Nov 6, 2017, at 9:07 PM, Boqun Feng boqun.f...@gmail.com wrote: > > > On Mon, Nov 06, 2017 at 03:56:38PM -0500, Mathieu Desnoyers wrote: > > [...] > >> +static int cpu_op_pin_pages(unsigned long addr, unsigned long len,

Re: [RFC PATCH v2 for 4.15 08/14] Provide cpu_opv system call

2017-11-06 Thread Mathieu Desnoyers
- On Nov 6, 2017, at 9:07 PM, Boqun Feng boqun.f...@gmail.com wrote: > On Mon, Nov 06, 2017 at 03:56:38PM -0500, Mathieu Desnoyers wrote: > [...] >> +static int cpu_op_pin_pages(unsigned long addr, unsigned long len, >> +struct page ***pinned_pages_ptr, size_t *nr_pinned, >> +

Re: [RFC PATCH v2 for 4.15 08/14] Provide cpu_opv system call

2017-11-06 Thread Boqun Feng
On Mon, Nov 06, 2017 at 03:56:38PM -0500, Mathieu Desnoyers wrote: [...] > +static int cpu_op_pin_pages(unsigned long addr, unsigned long len, > + struct page ***pinned_pages_ptr, size_t *nr_pinned, > + int write) > +{ > + struct page *pages[2]; > + int ret, nr_pages

[RFC PATCH v2 for 4.15 08/14] Provide cpu_opv system call

2017-11-06 Thread Mathieu Desnoyers
This new cpu_opv system call executes a vector of operations on behalf of user-space on a specific CPU with preemption disabled. It is inspired from readv() and writev() system calls which take a "struct iovec" array as argument. The operations available are: comparison, memcpy, add, or, and, xor,