Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 15 Aug 2002 22:16:09 -0700
From:      David Greenman-Lawrence <dg@dglawrence.com>
To:        David Greenman <dg@FreeBSD.org>
Cc:        cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/sys/kern uipc_socket2.c
Message-ID:  <20020815221609.E42978@nexus.root.com>
In-Reply-To: <200208160508.g7G58kRZ098250@freefall.freebsd.org>; from dg@FreeBSD.org on Thu, Aug 15, 2002 at 10:08:46PM -0700
References:  <200208160508.g7G58kRZ098250@freefall.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
>dg          2002/08/15 22:08:46 PDT
>
>  Modified files:
>    sys/kern             uipc_socket2.c 
>  Log:
>  Rewrote the space check algorithm in sbreserve() so that the extremely
>  expensive (!) 64bit multiply, divide, and comparison aren't necessary
...
>  The 64bit math in this function was measured in some kernel profiles as
>  being as much as 5-8% of the total overhead of the TCP/IP stack and

   I'm looking at calcru() as well, since is does four 64bit divides and
was as expensive as sbreserve() in my profiles. The __qdivrem function
that does the 64bit divide appears to consume several thousand instructions
in the common case. Something to avoid if at all possible.

-DG

D.G.Lawrence
Download Technologies, Inc. - http://www.downloadtech.com - (866) 399 8500
TeraSolutions, Inc. - http://www.terasolutions.com - (503) 288 9544
The FreeBSD Project - http://www.freebsd.org
Pave the road of life with opportunities.

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




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