svn commit: r255202 - head/sys/netgraph/netflow
Ivan Voras
ivoras at freebsd.org
Wed Sep 4 12:58:05 UTC 2013
On 4 September 2013 12:17, Gleb Smirnoff <glebius at 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...
More information about the svn-src-all
mailing list