From owner-cvs-all Thu Aug 15 22: 8:51 2002 Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4B48837B400; Thu, 15 Aug 2002 22:08:47 -0700 (PDT) Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id B4C4943E3B; Thu, 15 Aug 2002 22:08:46 -0700 (PDT) (envelope-from dg@FreeBSD.org) Received: from freefall.freebsd.org (dg@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.4/8.12.4) with ESMTP id g7G58kJU098251; Thu, 15 Aug 2002 22:08:46 -0700 (PDT) (envelope-from dg@freefall.freebsd.org) Received: (from dg@localhost) by freefall.freebsd.org (8.12.4/8.12.4/Submit) id g7G58kRZ098250; Thu, 15 Aug 2002 22:08:46 -0700 (PDT) Message-Id: <200208160508.g7G58kRZ098250@freefall.freebsd.org> From: David Greenman Date: Thu, 15 Aug 2002 22:08:46 -0700 (PDT) To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/sys/kern uipc_socket2.c X-FreeBSD-CVS-Branch: HEAD Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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 (this came in originally from rev 1.19 to fix an overflow with large sb_max or MCLBYTES). 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 is eliminated with this commit. There is a harmless rounding error (of about .4% with the standard values) introduced with this change, however this is in the conservative direction (downward toward a slightly smaller maximum socket buffer size). MFC after: 3 days Revision Changes Path 1.102 +1 -1 src/sys/kern/uipc_socket2.c To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message