Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 20 Apr 2012 08:11:44 -0400
From:      John Baldwin <jhb@freebsd.org>
To:        freebsd-net@freebsd.org
Cc:        Andre Oppermann <andre@freebsd.org>, Luigi Rizzo <rizzo@iet.unipi.it>, current@freebsd.org, net@freebsd.org
Subject:   Re: Some performance measurements on the FreeBSD network stack
Message-ID:  <201204200811.44957.jhb@freebsd.org>
In-Reply-To: <20120419204622.GA94904@onelab2.iet.unipi.it>
References:  <20120419133018.GA91364@onelab2.iet.unipi.it> <4F907011.9080602@freebsd.org> <20120419204622.GA94904@onelab2.iet.unipi.it>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201204200811.44957.jhb>