Re: mbuf limit atomic operation

2019-10-21 Thread Alexander Bluhm
On Fri, Oct 18, 2019 at 12:33:27AM +0200, Alexander Bluhm wrote: > Can we replace the mutex that protects the mbuf allocation limit > by an atomic operation? Now without unneccessary variable and no extra check in the slow path. - Code gets shorter - Avoid mutex, makes it less complex - it is

Re: mbuf limit atomic operation

2019-10-18 Thread Alexander Bluhm
On Fri, Oct 18, 2019 at 03:55:39PM +1000, David Gwynne wrote: > why? is it significantly faster? page allocation should be in the slow path. At least it was not slower. Performance were slightly higher, but changes are well below meassurement tolerance. Usually it is a good idea to avoid locks

Re: mbuf limit atomic operation

2019-10-17 Thread David Gwynne
why? is it significantly faster? page allocation should be in the slow path. dlg > On 18 Oct 2019, at 08:33, Alexander Bluhm wrote: > > Hi, > > Can we replace the mutex that protects the mbuf allocation limit > by an atomic operation? > > ok? > > bluhm > > Index: kern/uipc_mbuf.c >