Re: per cpu memory in the kernel

2016-08-22 Thread Martin Pieuchot
On 17/08/16(Wed) 22:19, David Gwynne wrote: > On Wed, Aug 17, 2016 at 09:13:04PM +1000, David Gwynne wrote: > > On Wed, Aug 17, 2016 at 08:27:19PM +1000, David Gwynne wrote: > > > On Thu, Aug 11, 2016 at 02:43:16PM +1000, David Gwynne wrote: > > > > ive been tinker

Re: per cpu memory in the kernel

2016-08-17 Thread David Gwynne
On Wed, Aug 17, 2016 at 09:13:04PM +1000, David Gwynne wrote: > On Wed, Aug 17, 2016 at 08:27:19PM +1000, David Gwynne wrote: > > On Thu, Aug 11, 2016 at 02:43:16PM +1000, David Gwynne wrote: > > > ive been tinkering with per cpu memory in the kernel. > > > > mpi@ wa

Re: per cpu memory in the kernel

2016-08-17 Thread David Gwynne
On Wed, Aug 17, 2016 at 08:27:19PM +1000, David Gwynne wrote: > On Thu, Aug 11, 2016 at 02:43:16PM +1000, David Gwynne wrote: > > ive been tinkering with per cpu memory in the kernel. > > mpi@ wanted to see another example of moving something to per cpu counters > and challenge

Re: per cpu memory in the kernel

2016-08-17 Thread David Gwynne
On Thu, Aug 11, 2016 at 02:43:16PM +1000, David Gwynne wrote: > ive been tinkering with per cpu memory in the kernel. mpi@ wanted to see another example of moving something to per cpu counters and challenged me to do tcpstat. the diff below does that, but with a couple of warts. firstly,

Re: per cpu memory in the kernel

2016-08-15 Thread Mark Kettenis
> From: David Gwynne > Date: Sun, 14 Aug 2016 16:26:45 +1000 > > > On 13 Aug 2016, at 5:48 AM, Mark Kettenis wrote: > > > >> From: Martin Pieuchot > >> Date: Fri, 12 Aug 2016 20:44:04 +0200 > >> > >> On 08/11/16 06:43, David Gwynne w

Re: per cpu memory in the kernel

2016-08-13 Thread David Gwynne
> On 13 Aug 2016, at 5:48 AM, Mark Kettenis wrote: > >> From: Martin Pieuchot >> Date: Fri, 12 Aug 2016 20:44:04 +0200 >> >> On 08/11/16 06:43, David Gwynne wrote: >>> ive been tinkering with per cpu memory in the kernel >>> [...] >> >

Re: per cpu memory in the kernel

2016-08-12 Thread Mark Kettenis
> From: Martin Pieuchot > Date: Fri, 12 Aug 2016 20:44:04 +0200 > > On 08/11/16 06:43, David Gwynne wrote: > > ive been tinkering with per cpu memory in the kernel > > [...] > > I'd like to have more people comment on this because we need an MP-safe > way t

Re: per cpu memory in the kernel

2016-08-12 Thread Martin Pieuchot
On 08/11/16 06:43, David Gwynne wrote: > ive been tinkering with per cpu memory in the kernel > [...] I'd like to have more people comment on this because we need an MP-safe way to handle counters in the network stack. > im still debating whether the API should do protection agains

Re: per cpu memory in the kernel

2016-08-11 Thread David Gwynne
On Thu, Aug 11, 2016 at 02:43:16PM +1000, David Gwynne wrote: > ive been tinkering with per cpu memory in the kernel. i think vi threw up a little bit on the diff i sent out, so this should work. it should also work on !MULTIPROCESSOR kernels now. some of that is fixes to the percpu.h bits,

per cpu memory in the kernel

2016-08-10 Thread David Gwynne
ive been tinkering with per cpu memory in the kernel. per cpu memory is pretty much what it sounds like. you allocate memory for each cpu to operate on independently of the rest of the system, therefore reducing the contention between cpus on cache lines. this introduces wrappers around the