On Mon, 20 Apr 2009, Robert Watson wrote:
On Mon, 20 Apr 2009, Bruce Evans wrote:
+#ifndef CACHE_LINE_SHIFT
+#define CACHE_LINE_SHIFT 6
+#endif
+#define CACHE_LINE_SIZE (1 << CACHE_LINE_SHIFT)
This still has the bogus ifdef. Overriding the definition is difficult to
do consistently even in a kernel with no modules, since CACHE_LINE_SIZE is
not a kernel option. Overriding the definition makes negative sense since
the value is a maximum-maximum (possibly larger than strictly needed) so
that it can be constant.
OK, I've made this change.
Thanks.
My hope is that most applications don't resort to
including sys/param.h and using CACHE_LINE_SIZE -- most will be able to query
it at run-time using interfaces we don't yet have (such as sysconf(3) and
some appropriate constant). I also hope that most kernel consumers will be
able to use a run-time tuned version (which we also don't yet have).
You could make (have made) it __CACHE_LINE_SIZE to inhibit use.
Bruce
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"