From owner-svn-src-head@FreeBSD.ORG Wed Dec 17 08:45:08 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B79B61065676; Wed, 17 Dec 2008 08:45:08 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mail.cksoft.de (mail.cksoft.de [62.111.66.27]) by mx1.freebsd.org (Postfix) with ESMTP id 70FAF8FC12; Wed, 17 Dec 2008 08:45:08 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from localhost (amavis.str.cksoft.de [192.168.74.71]) by mail.cksoft.de (Postfix) with ESMTP id E0CDF41C5EB; Wed, 17 Dec 2008 09:45:06 +0100 (CET) X-Virus-Scanned: amavisd-new at cksoft.de Received: from mail.cksoft.de ([62.111.66.27]) by localhost (amavis.str.cksoft.de [192.168.74.71]) (amavisd-new, port 10024) with ESMTP id w9jAVMYfYPzm; Wed, 17 Dec 2008 09:45:05 +0100 (CET) Received: by mail.cksoft.de (Postfix, from userid 66) id E0C0E41C5DC; Wed, 17 Dec 2008 09:45:05 +0100 (CET) Received: from maildrop.int.zabbadoz.net (maildrop.int.zabbadoz.net [10.111.66.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.int.zabbadoz.net (Postfix) with ESMTP id 9D8C24448D5; Wed, 17 Dec 2008 08:43:21 +0000 (UTC) Date: Wed, 17 Dec 2008 08:43:21 +0000 (UTC) From: "Bjoern A. Zeeb" X-X-Sender: bz@maildrop.int.zabbadoz.net To: Peter Wemm In-Reply-To: Message-ID: <20081217082655.G97918@maildrop.int.zabbadoz.net> References: <200812132159.mBDLxIQv040799@svn.freebsd.org> X-OpenPGP-Key: 0x14003F198FEFA3E77207EE8D2B58B8F83CCF1842 MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r186057 - head/sys/netinet X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Dec 2008 08:45:08 -0000 On Tue, 16 Dec 2008, Peter Wemm wrote: Hi, there's multiple things in here, so let me try to address them separately. > On Sat, Dec 13, 2008 at 1:59 PM, Bjoern A. Zeeb wrote: >> De-virtualize the MD5 context for TCP initial seq number generation >> and make it a function local variable like we do almost everywhere >> inside the kernel. > [..] >> --- head/sys/netinet/vinet.h Sat Dec 13 21:17:46 2008 (r186056) >> +++ head/sys/netinet/vinet.h Sat Dec 13 21:59:18 2008 (r186057) >> @@ -142,7 +142,6 @@ struct vnet_inet { >> int _isn_last_reseed; >> u_int32_t _isn_offset; >> u_int32_t _isn_offset_old; >> - MD5_CTX _isn_ctx; >> >> struct inpcbhead _udb; >> struct inpcbinfo _udbinfo; > BTW; the reason why _isn_ctx was global is because it is a non-trivial > size. It might only be 88 bytes, but when you've only got a few KB of > stack and lots of nesting, this stuff adds up pretty quickly. We were > right on the edge of stack overflows for quite some time and had to go > and hunt down this sort of thing. In this case it is probably > harmless, but we must not get into the habit of casually discarding > previous hard-won space savings. Ok. I wasn't aware of this but it's good to know as there are some ip address printings out there that need to be resolved and it's I'll send it out for broader review before resuming that work. For the above change silby had confirmed that he initially went with the global to save stack space. To decide if I should really change it I had looked at the kernel how other parts are handling this and I found cam, ipfilter, pf, safe, usbsec, various geom modules, the syncache itself, ... to have them on the stack. At that point I stopped worrying. For the actual structure change, yeah I missed the freebsd_version bump most likely because I had done the patch ~2 days before vimage went in, sent mail to silby, and was distracted by the SYSINIT ordering problem Marko had found (see that commit) and then got back to this commit days later after Marko's and my vimage commit. In short - my fault. (2nd mail to follow). -- Bjoern A. Zeeb The greatest risk is not taking one.