Re: [PATCH net-next v4 2/3] udp: implement memory accounting helpers

2016-10-20 Thread Paolo Abeni
On Wed, 2016-10-19 at 21:43 -0700, Eric Dumazet wrote: > On Wed, 2016-10-19 at 14:47 +0200, Paolo Abeni wrote: > > Avoid using the generic helpers. > > Adds a new spinlock_t to the udp_sock structure and use > > it to protect the memory accounting operation, both on > > enqueue and on dequeue. > >

Re: [PATCH net-next v4 2/3] udp: implement memory accounting helpers

2016-10-20 Thread Paolo Abeni
On Wed, 2016-10-19 at 21:43 -0700, Eric Dumazet wrote: > On Wed, 2016-10-19 at 14:47 +0200, Paolo Abeni wrote: > > Avoid using the generic helpers. > > Adds a new spinlock_t to the udp_sock structure and use > > it to protect the memory accounting operation, both on > > enqueue and on dequeue. > >

Re: [PATCH net-next v4 2/3] udp: implement memory accounting helpers

2016-10-19 Thread Eric Dumazet
On Wed, 2016-10-19 at 14:47 +0200, Paolo Abeni wrote: > Avoid using the generic helpers. > Adds a new spinlock_t to the udp_sock structure and use > it to protect the memory accounting operation, both on > enqueue and on dequeue. > > On dequeue perform partial memory reclaiming, trying to > leave

[PATCH net-next v4 2/3] udp: implement memory accounting helpers

2016-10-19 Thread Paolo Abeni
Avoid using the generic helpers. Adds a new spinlock_t to the udp_sock structure and use it to protect the memory accounting operation, both on enqueue and on dequeue. On dequeue perform partial memory reclaiming, trying to leave a quantum of forward allocated memory. On enqueue use a custom help