Date: Fri, 10 Dec 2004 11:03:20 +0100 From: Simon 'corecode' Schubert <corecode@fs.ei.tum.de> To: cvs-src@freebsd.org Cc: Sam Leffler <sam@errno.com> Subject: Re: cvs commit: src/sys/netinet ip_fw_pfil.c Message-ID: <200412101103.27119.corecode@fs.ei.tum.de> In-Reply-To: <41B8EA66.4875E2D9@freebsd.org> References: <200412091641.iB9GflnD067866@repoman.freebsd.org> <41B8BF81.2000701@errno.com> <41B8EA66.4875E2D9@freebsd.org>
index | next in thread | previous in thread | raw e-mail
[-- Attachment #1 --] On Friday, 10. December 2004 01:14, Andre Oppermann wrote: > > >>> Check that DUMMYNET_LOADED before seeking dummynet m_tag. > > >>This change may be a mistake unless you can prove some significant > > >>performance gain. > > > Checking for DUMMYNET_LOADED is a simple pointer compare to NULL and > > > doesn't add a memory write. Not a big difference for sure but not > > > hurting either. > > If tag lookup cost becomes an important consideration in writing code > > then we need to address that basic functionality. > Actually this is a good argument and reasoning and I buy into it. Not > that is matter this much in this case but having nice and clean code > wins big over time. I've spent and am still spending too much time > cleaning up old BSD PDP-11 "optimizations" and other shortcuts. Forgive me if I'm way off here, I not experienced with the network stack as you are. First of all I also think that this check here might be over(micro)optimization. Nevertheless, if tags appear to be a (small) performance hit, I conclude that there should be a fast way to check for the (possible?) existance of a tag. So for example having a bit field signaling the presence of the most important tags which are checked in the hot code path might help, so is this really stupid[tm]? cheers simon -- /"\ \ / \ ASCII Ribbon Campaign / \ Against HTML Mail and News [-- Attachment #2 --] -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.6 (FreeBSD) iD8DBQBBuXRvr5S+dk6z85oRAvNyAJ9OBGuVM2mEVj+2EJ0LV3SK1X8SRACgvHjn bmefsxPtJmX7CXfrcjbZFUY= =ohsr -----END PGP SIGNATURE-----help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200412101103.27119.corecode>
