Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
varnish-cache
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
varnishcache
varnish-cache
Commits
ed645d24
Commit
ed645d24
authored
Mar 20, 2012
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove busyobj from objcore under oh-mtx
parent
c40a7d0c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
6 deletions
+23
-6
cache_fetch.c
bin/varnishd/cache/cache_fetch.c
+4
-6
cache_hash.c
bin/varnishd/cache/cache_hash.c
+18
-0
hash_slinger.h
bin/varnishd/hash/hash_slinger.h
+1
-0
No files found.
bin/varnishd/cache/cache_fetch.c
View file @
ed645d24
...
...
@@ -35,10 +35,11 @@
#include "cache.h"
#include "hash/hash_slinger.h"
#include "cache_backend.h"
#include "vcli_priv.h"
#include "vct.h"
#include "vmb.h"
#include "vtcp.h"
static
unsigned
fetchfrag
;
...
...
@@ -675,11 +676,8 @@ FetchBody(struct worker *wrk, void *priv)
/* XXX: Atomic assignment, needs volatile/membar ? */
bo
->
state
=
BOS_FINISHED
;
}
if
(
obj
->
objcore
!=
NULL
)
{
VMB
();
obj
->
objcore
->
busyobj
=
NULL
;
VMB
();
}
if
(
obj
->
objcore
!=
NULL
)
HSH_Complete
(
obj
->
objcore
);
bo
->
stats
=
NULL
;
VBO_DerefBusyObj
(
wrk
,
&
bo
);
}
...
...
bin/varnishd/cache/cache_hash.c
View file @
ed645d24
...
...
@@ -565,6 +565,24 @@ HSH_Drop(struct worker *wrk, struct object **oo)
AZ
(
HSH_Deref
(
&
wrk
->
stats
,
NULL
,
oo
));
}
/*---------------------------------------------------------------------
* Remove the busyobj from an objcore
*/
void
HSH_Complete
(
struct
objcore
*
oc
)
{
struct
objhead
*
oh
;
CHECK_OBJ_NOTNULL
(
oc
,
OBJCORE_MAGIC
);
oh
=
oc
->
objhead
;
CHECK_OBJ
(
oh
,
OBJHEAD_MAGIC
);
Lck_Lock
(
&
oh
->
mtx
);
oc
->
busyobj
=
NULL
;
Lck_Unlock
(
&
oh
->
mtx
);
}
/*---------------------------------------------------------------------
* Unbusy an objcore when the object is completely fetched.
*/
...
...
bin/varnishd/hash/hash_slinger.h
View file @
ed645d24
...
...
@@ -94,6 +94,7 @@ struct objhead {
};
void
HSH_Unbusy
(
struct
dstat
*
,
struct
objcore
*
);
void
HSH_Complete
(
struct
objcore
*
oc
);
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