Matthew Dillon wrote:
+ if (ocflags & M_ZERO) {
+ if (oc->simple_objsize)
+ bzero(obj, oc->simple_objsize);
+ else
+ panic("objcache_get(): M_ZERO illegal here");
+ }
After some discussion with Jeffrey Hsu and Simon Schubert, it was concluded that this incurs a penalty on the hot path of objcache_get(), which should be avoided. Best to have the consumers handle any zero'ing, in order to not nerf the consumers who rely on the speed. In that case, it pollutes the instruction cache, and could worsen performance significantly in the case of branch misprediction. Especially on the long pipelines CPUs have these days (though with the Core 2 family, Intel has cut back on the 30+ stages of the Prescott/Presler...).
Cheers,
--
Thomas E. Spanjaard
[EMAIL PROTECTED]
signature.asc
Description: OpenPGP digital signature
