Date: Wed, 4 Sep 2013 14:57:23 +0200 From: Ivan Voras <ivoras@freebsd.org> To: Gleb Smirnoff <glebius@freebsd.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r255202 - head/sys/netgraph/netflow Message-ID: <CAF-QHFW0vdnKmb0QNy2SLa4MRfh6H-LKLYctnpTrG%2BOM4ZwiJQ@mail.gmail.com> In-Reply-To: <201309041017.r84AHoR2075614@svn.freebsd.org> References: <201309041017.r84AHoR2075614@svn.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On 4 September 2013 12:17, Gleb Smirnoff <glebius@freebsd.org> wrote: > Log: > Make default cache size more modern. > -#define CACHESIZE (65536*4) > +#define CACHESIZE (65536*16) Things like this make me wonder if there shouldn't be a constant somehwere in an ubiquitous header which would basically be a single place to modify and which would cascade all over the place. Maybe even something like a macro based on something like a YEAR_OF_RELEASE, so e.g. the code becomes #define AUTO_TUNE_BASE (YEAR_OF_RELEASE - 2000) #define AUTO_TUNE_AGGRESIVE (AUTO_TUNE_BASE * 2) #define AUTO_TUNE_CONSERVATIVE ((AUTO_TUNE_BASE * 6) / 5) #define CACHESIZE (65536 * (4 + AUTO_TUNE_CONSERVATIVE)) Of course, some power-of-2 variants should also exist...
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAF-QHFW0vdnKmb0QNy2SLa4MRfh6H-LKLYctnpTrG%2BOM4ZwiJQ>