Re: Some performance measurements on the FreeBSD network stack

From: John Baldwin <jhb_at_freebsd.org>
Date: Fri, 20 Apr 2012 08:11:44 -0400
On Thursday, April 19, 2012 4:46:22 pm Luigi Rizzo wrote:
> What might be moderately expensive are the critical_enter()/critical_exit()
> calls around individual allocations.
> The allocation happens while the code has already an exclusive
> lock on so->snd_buf so a pool of fresh buffers could be attached
> there.

Keep in mind that in the common case critical_enter() and critical_exit()
should be very cheap as they should just do td->td_critnest++ and
td->td_critnest--.  critical_enter() should probably be inlined if KTR
is not enabled.

-- 
John Baldwin
Received on Fri Apr 20 2012 - 10:48:06 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:26 UTC