Skip to content

Commit

Permalink
hash: Log the VXID of requests being rushed
Browse files Browse the repository at this point in the history
This is very useful to manually verify the rush_exponent behavior.
  • Loading branch information
dridi committed Dec 20, 2023
1 parent 02402cc commit f6c5607
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions bin/varnishd/cache/cache_hash.c
Original file line number Diff line number Diff line change
Expand Up @@ -715,6 +715,7 @@ hsh_rush1(const struct worker *wrk, struct objcore *oc, struct rush *r)
{
struct objhead *oh;
struct req *req;
unsigned xid;
int max, i;

CHECK_OBJ_NOTNULL(wrk, WORKER_MAGIC);
Expand All @@ -737,6 +738,13 @@ hsh_rush1(const struct worker *wrk, struct objcore *oc, struct rush *r)
req = VTAILQ_FIRST(&oh->waitinglist);
if (req == NULL)
break;

if (DO_DEBUG(DBG_WAITINGLIST)) {
xid = VXID(req->vsl->wid);
VSLb(wrk->vsl, SLT_Debug,
"waiting list rush for req %u", xid);
}

CHECK_OBJ_NOTNULL(req, REQ_MAGIC);
wrk->stats->busy_wakeup++;
AZ(req->wrk);
Expand Down

0 comments on commit f6c5607

Please sign in to comment.