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

Move the setup/teardown of requests vary prediction space from

cache_hash to cache_center.
parent cdeea123
...@@ -1028,13 +1028,28 @@ cnt_lookup(struct sess *sp) ...@@ -1028,13 +1028,28 @@ cnt_lookup(struct sess *sp)
struct objcore *oc; struct objcore *oc;
struct object *o; struct object *o;
struct objhead *oh; struct objhead *oh;
struct worker *wrk;
CHECK_OBJ_NOTNULL(sp, SESS_MAGIC); CHECK_OBJ_NOTNULL(sp, SESS_MAGIC);
CHECK_OBJ_NOTNULL(sp->vcl, VCL_CONF_MAGIC); CHECK_OBJ_NOTNULL(sp->vcl, VCL_CONF_MAGIC);
wrk = sp->wrk;
AZ(wrk->vary_b);
AZ(wrk->vary_l);
AZ(wrk->vary_e);
(void)WS_Reserve(wrk->ws, 0);
wrk->vary_b = (void*)wrk->ws->f;
wrk->vary_e = (void*)wrk->ws->r;
wrk->vary_b[2] = '\0';
oc = HSH_Lookup(sp, &oh); oc = HSH_Lookup(sp, &oh);
WS_Release(wrk->ws, 0);
wrk->vary_b = NULL;
wrk->vary_l = NULL;
wrk->vary_e = NULL;
if (oc == NULL) { if (oc == NULL) {
/* /*
* We lost the session to a busy object, disembark the * We lost the session to a busy object, disembark the
......
...@@ -330,13 +330,6 @@ HSH_Lookup(struct sess *sp, struct objhead **poh) ...@@ -330,13 +330,6 @@ HSH_Lookup(struct sess *sp, struct objhead **poh)
} }
CHECK_OBJ_NOTNULL(oh, OBJHEAD_MAGIC); CHECK_OBJ_NOTNULL(oh, OBJHEAD_MAGIC);
AZ(sp->wrk->vary_b);
AZ(sp->wrk->vary_l);
AZ(sp->wrk->vary_e);
WS_Reserve(sp->wrk->ws, 0);
sp->wrk->vary_b = (void*)sp->wrk->ws->f;
sp->wrk->vary_e = (void*)sp->wrk->ws->r;
sp->wrk->vary_b[2] = '\0';
Lck_Lock(&oh->mtx); Lck_Lock(&oh->mtx);
assert(oh->refcnt > 0); assert(oh->refcnt > 0);
busy_oc = NULL; busy_oc = NULL;
...@@ -381,11 +374,6 @@ HSH_Lookup(struct sess *sp, struct objhead **poh) ...@@ -381,11 +374,6 @@ HSH_Lookup(struct sess *sp, struct objhead **poh)
} }
} }
WS_ReleaseP(sp->wrk->ws, (void*)sp->wrk->vary_b);
sp->wrk->vary_b = NULL;
sp->wrk->vary_l = NULL;
sp->wrk->vary_e = NULL;
/* /*
* If we have seen a busy object or the backend is unhealthy, and * If we have seen a busy object or the backend is unhealthy, and
* we have an object in grace, use it, if req.grace is also * we have an object in grace, use it, if req.grace is also
......
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