Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
U
unique-xids
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
uplex-varnish
unique-xids
Commits
b78280f4
Commit
b78280f4
authored
Mar 12, 2012
by
Martin Blix Grydeland
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Decrement the n_waitinglist counter when freeing waitinglists.
parent
b8d4eb8a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
7 deletions
+9
-7
cache_center.c
bin/varnishd/cache/cache_center.c
+1
-1
cache_hash.c
bin/varnishd/cache/cache_hash.c
+7
-5
hash_slinger.h
bin/varnishd/hash/hash_slinger.h
+1
-1
No files found.
bin/varnishd/cache/cache_center.c
View file @
b78280f4
...
...
@@ -935,7 +935,7 @@ cnt_fetchbody(struct sess *sp, struct worker *wrk, struct req *req)
AN
(
req
->
obj
->
objcore
);
AN
(
req
->
obj
->
objcore
->
ban
);
AZ
(
req
->
obj
->
ws_o
->
overflow
);
HSH_Unbusy
(
req
->
obj
->
objcore
);
HSH_Unbusy
(
&
wrk
->
stats
,
req
->
obj
->
objcore
);
}
VBO_DerefBusyObj
(
wrk
,
&
req
->
busyobj
);
wrk
->
acct_tmp
.
fetch
++
;
...
...
bin/varnishd/cache/cache_hash.c
View file @
b78280f4
...
...
@@ -125,6 +125,7 @@ HSH_Cleanup(struct worker *wrk)
if
(
wrk
->
nwaitinglist
!=
NULL
)
{
FREE_OBJ
(
wrk
->
nwaitinglist
);
wrk
->
nwaitinglist
=
NULL
;
wrk
->
stats
.
n_waitinglist
--
;
}
if
(
wrk
->
nhashpriv
!=
NULL
)
{
/* XXX: If needed, add slinger method for this */
...
...
@@ -468,7 +469,7 @@ HSH_Lookup(struct sess *sp, struct objhead **poh)
*/
static
void
hsh_rush
(
struct
objhead
*
oh
)
hsh_rush
(
struct
dstat
*
ds
,
struct
objhead
*
oh
)
{
unsigned
u
;
struct
sess
*
sp
;
...
...
@@ -497,6 +498,7 @@ hsh_rush(struct objhead *oh)
if
(
VTAILQ_EMPTY
(
&
wl
->
list
))
{
oh
->
waitinglist
=
NULL
;
FREE_OBJ
(
wl
);
ds
->
n_waitinglist
--
;
}
}
...
...
@@ -576,12 +578,12 @@ HSH_Drop(struct worker *wrk, struct object **oo)
AssertObjCorePassOrBusy
((
*
oo
)
->
objcore
);
(
*
oo
)
->
exp
.
ttl
=
-
1
.;
if
((
*
oo
)
->
objcore
!=
NULL
)
/* Pass has no objcore */
HSH_Unbusy
((
*
oo
)
->
objcore
);
HSH_Unbusy
(
&
wrk
->
stats
,
(
*
oo
)
->
objcore
);
(
void
)
HSH_Deref
(
&
wrk
->
stats
,
NULL
,
oo
);
}
void
HSH_Unbusy
(
struct
objcore
*
oc
)
HSH_Unbusy
(
struct
dstat
*
ds
,
struct
objcore
*
oc
)
{
struct
objhead
*
oh
;
...
...
@@ -603,7 +605,7 @@ HSH_Unbusy(struct objcore *oc)
oc
->
flags
&=
~
OC_F_BUSY
;
oc
->
busyobj
=
NULL
;
if
(
oh
->
waitinglist
!=
NULL
)
hsh_rush
(
oh
);
hsh_rush
(
ds
,
oh
);
AN
(
oc
->
ban
);
Lck_Unlock
(
&
oh
->
mtx
);
}
...
...
@@ -680,7 +682,7 @@ HSH_Deref(struct dstat *ds, struct objcore *oc, struct object **oo)
AN
(
oc
->
methods
);
}
if
(
oh
->
waitinglist
!=
NULL
)
hsh_rush
(
oh
);
hsh_rush
(
ds
,
oh
);
Lck_Unlock
(
&
oh
->
mtx
);
if
(
r
!=
0
)
return
(
r
);
...
...
bin/varnishd/hash/hash_slinger.h
View file @
b78280f4
...
...
@@ -53,7 +53,6 @@ struct hash_slinger {
/* cache_hash.c */
void
HSH_Cleanup
(
struct
worker
*
w
);
struct
objcore
*
HSH_Lookup
(
struct
sess
*
sp
,
struct
objhead
**
poh
);
void
HSH_Unbusy
(
struct
objcore
*
);
void
HSH_Ref
(
struct
objcore
*
o
);
void
HSH_Drop
(
struct
worker
*
,
struct
object
**
);
void
HSH_Init
(
const
struct
hash_slinger
*
slinger
);
...
...
@@ -94,6 +93,7 @@ struct objhead {
#define hoh_head _u.n.u_n_hoh_head
};
void
HSH_Unbusy
(
struct
dstat
*
,
struct
objcore
*
);
void
HSH_DeleteObjHead
(
struct
dstat
*
,
struct
objhead
*
oh
);
int
HSH_Deref
(
struct
dstat
*
,
struct
objcore
*
oc
,
struct
object
**
o
);
#endif
/* VARNISH_CACHE_CHILD */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment