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
78ad7c4c
Commit
78ad7c4c
authored
Jun 25, 2012
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Continue the move towards multiple concurrent requests per session
parent
c4d56d76
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
36 deletions
+12
-36
cache.h
bin/varnishd/cache/cache.h
+1
-1
cache_center.c
bin/varnishd/cache/cache_center.c
+10
-34
cache_esi_deliver.c
bin/varnishd/cache/cache_esi_deliver.c
+1
-1
No files found.
bin/varnishd/cache/cache.h
View file @
78ad7c4c
...
...
@@ -743,7 +743,7 @@ void VBO_DerefBusyObj(struct worker *wrk, struct busyobj **busyobj);
void
VBO_Free
(
struct
busyobj
**
vbo
);
/* cache_center.c [CNT] */
int
CNT_Request
(
struct
req
*
);
int
CNT_Request
(
struct
worker
*
,
struct
req
*
);
void
CNT_Session
(
struct
sess
*
);
void
CNT_Init
(
void
);
...
...
bin/varnishd/cache/cache_center.c
View file @
78ad7c4c
...
...
@@ -362,7 +362,7 @@ CNT_Session(struct sess *sp)
sp
->
req
->
req_step
==
R_STP_START
)));
if
(
sp
->
sess_step
==
S_STP_WORKING
)
{
done
=
CNT_Request
(
sp
->
req
);
done
=
CNT_Request
(
sp
->
wrk
,
sp
->
req
);
if
(
done
==
2
)
return
;
assert
(
done
==
1
);
...
...
@@ -1572,43 +1572,23 @@ cnt_start(struct worker *wrk, struct req *req)
*/
static
void
cnt_diag
(
struct
sess
*
sp
,
const
char
*
state
)
cnt_diag
(
struct
req
*
req
,
const
char
*
state
)
{
void
*
vcl
;
void
*
obj
;
if
(
sp
->
req
==
NULL
)
{
vcl
=
NULL
;
obj
=
NULL
;
}
else
{
vcl
=
sp
->
req
->
vcl
;
obj
=
sp
->
req
->
obj
;
}
CHECK_OBJ_NOTNULL
(
req
,
REQ_MAGIC
);
if
(
sp
->
req
!=
NULL
)
{
VSLb
(
sp
->
req
->
vsl
,
SLT_Debug
,
"vsl_id %u STP_%s sp %p obj %p vcl %p"
,
sp
->
vsl_id
,
state
,
sp
,
obj
,
vcl
);
VSL_Flush
(
sp
->
req
->
vsl
,
0
);
}
else
{
VSL
(
SLT_Debug
,
sp
->
vsl_id
,
"vsl_id %u STP_%s sp %p obj %p vcl %p"
,
sp
->
vsl_id
,
state
,
sp
,
obj
,
vcl
);
}
VSLb
(
req
->
vsl
,
SLT_Debug
,
"vsl_id %u STP_%s sp %p obj %p vcl %p"
,
req
->
sp
->
vsl_id
,
state
,
req
->
sp
,
req
->
obj
,
req
->
vcl
);
VSL_Flush
(
req
->
vsl
,
0
);
}
int
CNT_Request
(
struct
req
*
req
)
CNT_Request
(
struct
worker
*
wrk
,
struct
req
*
req
)
{
int
done
;
struct
worker
*
wrk
;
struct
sess
*
sp
;
CHECK_OBJ_NOTNULL
(
req
,
REQ_MAGIC
);
sp
=
req
->
sp
;
CHECK_OBJ_NOTNULL
(
sp
,
SESS_MAGIC
);
wrk
=
sp
->
wrk
;
CHECK_OBJ_NOTNULL
(
wrk
,
WORKER_MAGIC
);
CHECK_OBJ_NOTNULL
(
req
,
REQ_MAGIC
);
/*
* Possible entrance states
...
...
@@ -1619,24 +1599,20 @@ CNT_Request(struct req *req)
req
->
req_step
==
R_STP_RECV
);
for
(
done
=
0
;
!
done
;
)
{
assert
(
sp
->
wrk
==
wrk
);
/*
* This is a good place to be paranoid about the various
* pointers still pointing to the things we expect.
*/
CHECK_OBJ_NOTNULL
(
sp
,
SESS_MAGIC
);
CHECK_OBJ_NOTNULL
(
wrk
,
WORKER_MAGIC
);
CHECK_OBJ_ORNULL
(
wrk
->
nobjhead
,
OBJHEAD_MAGIC
);
WS_Assert
(
wrk
->
aws
);
CHECK_OBJ_NOTNULL
(
req
,
REQ_MAGIC
);
AN
(
req
->
sp
);
assert
(
req
->
sp
==
sp
);
switch
(
req
->
req_step
)
{
#define REQ_STEP(l,u,arg) \
case R_STP_##u: \
if (cache_param->diag_bitmap & 0x01) \
cnt_diag(
sp
, #u); \
cnt_diag(
req
, #u); \
done = cnt_##l arg; \
break;
#include "tbl/steps.h"
...
...
@@ -1648,7 +1624,7 @@ CNT_Request(struct req *req)
CHECK_OBJ_ORNULL
(
wrk
->
nobjhead
,
OBJHEAD_MAGIC
);
}
if
(
done
==
1
)
SES_Charge
(
sp
);
SES_Charge
(
req
->
sp
);
assert
(
WRW_IsReleased
(
wrk
));
return
(
done
);
...
...
bin/varnishd/cache/cache_esi_deliver.c
View file @
78ad7c4c
...
...
@@ -95,7 +95,7 @@ ved_include(struct req *req, const char *src, const char *host)
sxid
=
req
->
xid
;
while
(
1
)
{
req
->
sp
->
wrk
=
wrk
;
i
=
CNT_Request
(
req
);
i
=
CNT_Request
(
wrk
,
req
);
if
(
i
==
1
)
break
;
assert
(
i
==
2
);
...
...
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