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
e734b2a4
Commit
e734b2a4
authored
Feb 21, 2014
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Now that busyobj has its own worker thread, borrow the stats
throughout the show.
parent
f1708eba
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
10 deletions
+7
-10
cache_fetch.c
bin/varnishd/cache/cache_fetch.c
+7
-10
No files found.
bin/varnishd/cache/cache_fetch.c
View file @
e734b2a4
...
...
@@ -60,7 +60,7 @@ vbf_release_req(struct busyobj *bo)
*/
static
int
vbf_beresp2obj
(
struct
worker
*
wrk
,
struct
busyobj
*
bo
)
vbf_beresp2obj
(
struct
busyobj
*
bo
)
{
unsigned
l
;
char
*
b
;
...
...
@@ -104,8 +104,6 @@ vbf_beresp2obj(struct worker *wrk, struct busyobj *bo)
bo
->
exp
.
ttl
+
bo
->
exp
.
grace
+
bo
->
exp
.
keep
<
cache_param
->
shortlived
)
bo
->
storage_hint
=
TRANSIENT_STORAGE
;
AZ
(
bo
->
stats
);
bo
->
stats
=
&
wrk
->
stats
;
AN
(
bo
->
fetch_objcore
);
obj
=
STV_NewObject
(
bo
,
bo
->
storage_hint
,
l
,
nhttp
);
if
(
obj
==
NULL
&&
...
...
@@ -469,8 +467,7 @@ vbf_stp_fetch(struct worker *wrk, struct busyobj *bo)
if
(
bo
->
htc
.
body_status
==
BS_NONE
)
bo
->
do_stream
=
0
;
if
(
vbf_beresp2obj
(
wrk
,
bo
))
{
bo
->
stats
=
NULL
;
if
(
vbf_beresp2obj
(
bo
))
{
(
void
)
VFP_Error
(
bo
,
"Could not get storage"
);
VDI_CloseFd
(
&
bo
->
vbc
);
return
(
F_STP_DONE
);
...
...
@@ -500,8 +497,6 @@ vbf_stp_fetch(struct worker *wrk, struct busyobj *bo)
VFP_Fetch_Body
(
bo
,
est
);
}
bo
->
stats
=
NULL
;
bo
->
t_body
=
VTIM_mono
();
VSLb
(
bo
->
vsl
,
SLT_Fetch_Body
,
"%u(%s)"
,
...
...
@@ -572,7 +567,6 @@ vbf_stp_condfetch(struct worker *wrk, struct busyobj *bo)
vl
=
0
;
l
+=
http_EstimateWS
(
bo
->
ims_obj
->
http
,
0
,
&
nhttp
);
bo
->
stats
=
&
wrk
->
stats
;
obj
=
STV_NewObject
(
bo
,
bo
->
storage_hint
,
l
,
nhttp
);
if
(
obj
==
NULL
)
{
(
void
)
VFP_Error
(
bo
,
"Could not get storage"
);
...
...
@@ -634,7 +628,6 @@ vbf_stp_condfetch(struct worker *wrk, struct busyobj *bo)
}
while
(
bo
->
state
<
BOS_FAILED
&&
(
ois
==
OIS_DATA
||
ois
==
OIS_STREAM
));
ObjIterEnd
(
&
oi
);
bo
->
stats
=
NULL
;
if
(
bo
->
state
!=
BOS_FAILED
)
{
assert
(
al
==
bo
->
ims_obj
->
len
);
assert
(
obj
->
len
==
al
);
...
...
@@ -678,7 +671,7 @@ vbf_stp_error(struct worker *wrk, struct busyobj *bo)
http_PrintfHeader
(
bo
->
beresp
,
"Content-Length: %jd"
,
(
intmax_t
)
0
);
http_PrintfHeader
(
bo
->
beresp
,
"X-XXXPHK: yes"
);
if
(
vbf_beresp2obj
(
wrk
,
bo
))
{
if
(
vbf_beresp2obj
(
bo
))
{
INCOMPL
();
}
...
...
@@ -731,6 +724,8 @@ vbf_fetch_thread(struct worker *wrk, void *priv)
bo
->
t_hdr
=
NAN
;
bo
->
t_body
=
NAN
;
bo
->
stats
=
&
wrk
->
stats
;
while
(
stp
!=
F_STP_DONE
)
{
CHECK_OBJ_NOTNULL
(
bo
,
BUSYOBJ_MAGIC
);
bo
->
step
=
stp
;
...
...
@@ -749,6 +744,8 @@ vbf_fetch_thread(struct worker *wrk, void *priv)
}
assert
(
WRW_IsReleased
(
wrk
));
bo
->
stats
=
NULL
;
if
(
bo
->
vbc
!=
NULL
)
{
if
(
bo
->
should_close
)
VDI_CloseFd
(
&
bo
->
vbc
);
...
...
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