Commit d86979e0 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Emit SLT__Batch records which tells us that the next N bytes all

belong to the same batch of VSL records and therefore have the
same vxid.

This will allow us to optimize libvarnishapi, in particular when
doing ordered/transaction mode.
parent 09e8a28b
......@@ -217,11 +217,12 @@ VSL_Flush(struct vsl_log *vsl, int overflow)
assert(l >= 8);
p = vsl_get(l - 8, vsl->wlr, overflow);
p = vsl_get(l, vsl->wlr, overflow);
memcpy(p + 1, vsl->wlb + 1, l - 4);
memcpy(p + 2, vsl->wlb, l);
p[1] = l;
VWMB();
p[0] = vsl->wlb[0];
p[0] = ((((unsigned)SLT__Batch & 0xff) << 24) | 0);
vsl->wlp = vsl->wlb;
vsl->wlr = 0;
}
......
......@@ -80,7 +80,8 @@ enum VSL_tag_e {
#define SLTM(foo,sdesc,ldesc) SLT_##foo,
#include "tbl/vsl_tags.h"
#undef SLTM
SLT__Reserved = 255
SLT__Reserved = 254,
SLT__Batch = 255
};
#endif /* VAPI_VSL_FMT_H_INCLUDED */
......@@ -270,7 +270,9 @@ VSL_NextSLT(struct VSM_data *vd, uint32_t **pp, uint64_t *bits)
}
t = VSL_TAG(p);
if (vbit_test(vsl->vbm_select, t)) {
if (t == SLT__Batch) {
continue;
} else if (vbit_test(vsl->vbm_select, t)) {
/* nothing */
} else if (vbit_test(vsl->vbm_supress, t)) {
continue;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment