Commit 9cb08c1d authored by Nils Goroll's avatar Nils Goroll

merge HSH_EXP and HSH_EXPBUSY into HSH_GRACE

they are the same case
parent ad98214e
...@@ -496,7 +496,7 @@ HSH_Lookup(struct req *req, struct objcore **ocp, struct objcore **bocp, ...@@ -496,7 +496,7 @@ HSH_Lookup(struct req *req, struct objcore **ocp, struct objcore **bocp,
} else { } else {
if (exp_oc->hits < LONG_MAX) if (exp_oc->hits < LONG_MAX)
exp_oc->hits++; exp_oc->hits++;
retval = HSH_EXPBUSY; retval = HSH_GRACE;
} }
} else { } else {
Lck_Unlock(&oh->mtx); Lck_Unlock(&oh->mtx);
...@@ -518,7 +518,7 @@ HSH_Lookup(struct req *req, struct objcore **ocp, struct objcore **bocp, ...@@ -518,7 +518,7 @@ HSH_Lookup(struct req *req, struct objcore **ocp, struct objcore **bocp,
assert(HSH_DerefObjHead(wrk, &oh)); assert(HSH_DerefObjHead(wrk, &oh));
if (exp_oc->hits < LONG_MAX) if (exp_oc->hits < LONG_MAX)
exp_oc->hits++; exp_oc->hits++;
return (HSH_EXP); return (HSH_GRACE);
} }
/* There are one or more busy objects, wait for them */ /* There are one or more busy objects, wait for them */
......
...@@ -543,7 +543,7 @@ cnt_lookup(struct worker *wrk, struct req *req) ...@@ -543,7 +543,7 @@ cnt_lookup(struct worker *wrk, struct req *req)
} }
wrk->stats->cache_hit++; wrk->stats->cache_hit++;
req->is_hit = 1; req->is_hit = 1;
if (lr == HSH_EXP || lr == HSH_EXPBUSY) if (lr == HSH_GRACE)
wrk->stats->cache_hit_grace++; wrk->stats->cache_hit_grace++;
req->req_step = R_STP_DELIVER; req->req_step = R_STP_DELIVER;
return (REQ_FSM_MORE); return (REQ_FSM_MORE);
......
...@@ -53,8 +53,7 @@ enum lookup_e { ...@@ -53,8 +53,7 @@ enum lookup_e {
HSH_MISS, HSH_MISS,
HSH_BUSY, HSH_BUSY,
HSH_HIT, HSH_HIT,
HSH_EXP, HSH_GRACE
HSH_EXPBUSY
}; };
/* mgt_hash.c */ /* mgt_hash.c */
......
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