VIP23 (VSL refactoring) design sketch
Poul-Henning Kamp
phk at phk.freebsd.dk
Wed Apr 10 14:07:46 UTC 2019
--------
In message <93c9d1d0-9d1c-ba23-a7aa-cc5e597d171e at uplex.de>, Nils Goroll writes:
>But at least for the built-in tags, I find it more appealing to auto-generate
>logging functions for each SLT (not macros) with well-defined arguments, by
>example of
>
>void VSLb_ts(struct vsl_log *, const char *event, vtim_real first,
> vtim_real *pprev, vtim_real now);
>
>The generated code may or may not memcpy, but even if, why is this an issue?
Because of the cache footprint.
If each VSL record invokes its own C-function, we eat up a LOT of L1+L2
cache bandwidth. If they all call the same function, we do not.
(Timestamp was a badly chosen example, because we already wrap that
in a function call, but you get the idea...)
--
Poul-Henning Kamp | UNIX since Zilog Zeus 3.20
phk at FreeBSD.ORG | TCP/IP since RFC 956
FreeBSD committer | BSD since 4.3-tahoe
Never attribute to malice what can adequately be explained by incompetence.
More information about the varnish-dev
mailing list