Skip to content
This repository was archived by the owner on Feb 16, 2026. It is now read-only.

Commit f1d56eb

Browse files
committed
hash: Dropping an objcore does not rush the waiting list
Rushing the waiting list because an objcore was dropped was a source of spurious wakeups, including the case where the dropped objcore is not even relevant to the objhead waiting list. It is now guaranteed that an object either dropped its OC_F_BUSY flag once ready (otherwise failed or withdrawn) or never had this flag to begin with for objcores that can't be looked up.
1 parent 60534d1 commit f1d56eb

1 file changed

Lines changed: 3 additions & 7 deletions

File tree

bin/varnishd/cache/cache_hash.c

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1107,13 +1107,13 @@ HSH_DerefObjCoreUnlock(struct worker *wrk, struct objcore **ocp, int rushmax)
11071107
{
11081108
struct objcore *oc;
11091109
struct objhead *oh;
1110-
struct rush rush;
11111110
int r;
11121111

11131112
CHECK_OBJ_NOTNULL(wrk, WORKER_MAGIC);
11141113
TAKE_OBJ_NOTNULL(oc, ocp, OBJCORE_MAGIC);
11151114
assert(oc->refcnt > 0);
1116-
INIT_OBJ(&rush, RUSH_MAGIC);
1115+
1116+
(void)rushmax;
11171117

11181118
oh = oc->objhead;
11191119
CHECK_OBJ_NOTNULL(oh, OBJHEAD_MAGIC);
@@ -1123,15 +1123,11 @@ HSH_DerefObjCoreUnlock(struct worker *wrk, struct objcore **ocp, int rushmax)
11231123
r = --oc->refcnt;
11241124
if (!r)
11251125
VTAILQ_REMOVE(&oh->objcs, oc, hsh_list);
1126-
if (!VTAILQ_EMPTY(&oh->waitinglist)) {
1127-
assert(oh->refcnt > 1);
1128-
hsh_rush1(wrk, oh, &rush, rushmax);
1129-
}
11301126
Lck_Unlock(&oh->mtx);
1131-
hsh_rush2(wrk, &rush);
11321127
if (r != 0)
11331128
return (r);
11341129

1130+
AZ(oc->flags & OC_F_BUSY);
11351131
AZ(oc->exp_flags);
11361132

11371133
BAN_DestroyObj(oc);

0 commit comments

Comments
 (0)