Date: Mon, 11 Sep 2000 00:31:48 +0100 (BST) From: Doug Rabson <dfr@nlsystems.com> To: John Baldwin <jhb@pike.osd.bsdi.com> Cc: Doug Rabson <dfr@FreeBSD.org>, cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/sys ktr.h Message-ID: <Pine.BSF.4.21.0009110030070.49106-100000@salmon.nlsystems.com> In-Reply-To: <200009102024.NAA24747@pike.osd.bsdi.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 10 Sep 2000, John Baldwin wrote: > Doug Rabson wrote: > > dfr 2000/09/10 07:36:55 PDT > > > > Modified files: > > sys/sys ktr.h > > Log: > > Use '&' instead of '%' to calculate the new value for ktr_idx. > > Err, it isn't guaranteed that KTR_ENTRIES will be a power of 2. If > it is, gcc should be optimizing the mod to a binary and though. As I mentioned to Brian, it can only reduce to a binary and if the numbers are known to be non-negative. Possibly changing the declaration of ktr_idx to an unsigned int would be enough but practically speaking, a non-power of 2 value for KTR_ENTRIES would be a disaster for performance. -- Doug Rabson Mail: dfr@nlsystems.com Nonlinear Systems Ltd. Phone: +44 20 8348 3944 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?Pine.BSF.4.21.0009110030070.49106-100000>