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
606b6f0d
Commit
606b6f0d
authored
Mar 17, 2015
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
But we can do without the struct pool_task in struct sess, because
we can reserve the space on the workspace when needed.
parent
56a073e5
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
4 deletions
+11
-4
cache.h
bin/varnishd/cache/cache.h
+0
-1
cache_acceptor.c
bin/varnishd/cache/cache_acceptor.c
+2
-0
cache_session.c
bin/varnishd/cache/cache_session.c
+9
-3
No files found.
bin/varnishd/cache/cache.h
View file @
606b6f0d
...
@@ -657,7 +657,6 @@ struct sess {
...
@@ -657,7 +657,6 @@ struct sess {
struct
sesspool
*
sesspool
;
struct
sesspool
*
sesspool
;
struct
pool_task
task
;
struct
waited
waited
;
struct
waited
waited
;
/* Session related fields ------------------------------------*/
/* Session related fields ------------------------------------*/
...
...
bin/varnishd/cache/cache_acceptor.c
View file @
606b6f0d
...
@@ -360,6 +360,8 @@ vca_make_session(struct worker *wrk, void *arg)
...
@@ -360,6 +360,8 @@ vca_make_session(struct worker *wrk, void *arg)
sp
->
client_addr_str
,
sp
->
client_port_str
,
lsockname
,
laddr
,
lport
,
sp
->
client_addr_str
,
sp
->
client_port_str
,
lsockname
,
laddr
,
lport
,
sp
->
t_open
,
sp
->
fd
);
sp
->
t_open
,
sp
->
fd
);
/* SES_sess_pool_task() must be sceduled with reserved WS */
assert
(
8
==
WS_Reserve
(
sp
->
ws
,
8
));
wrk
->
task
.
func
=
SES_sess_pool_task
;
wrk
->
task
.
func
=
SES_sess_pool_task
;
wrk
->
task
.
priv
=
sp
;
wrk
->
task
.
priv
=
sp
;
}
}
...
...
bin/varnishd/cache/cache_session.c
View file @
606b6f0d
...
@@ -132,6 +132,7 @@ SES_sess_pool_task(struct worker *wrk, void *arg)
...
@@ -132,6 +132,7 @@ SES_sess_pool_task(struct worker *wrk, void *arg)
CHECK_OBJ_NOTNULL
(
wrk
,
WORKER_MAGIC
);
CHECK_OBJ_NOTNULL
(
wrk
,
WORKER_MAGIC
);
CAST_OBJ_NOTNULL
(
sp
,
arg
,
SESS_MAGIC
);
CAST_OBJ_NOTNULL
(
sp
,
arg
,
SESS_MAGIC
);
WS_Release
(
sp
->
ws
,
0
);
req
=
SES_GetReq
(
wrk
,
sp
);
req
=
SES_GetReq
(
wrk
,
sp
);
CHECK_OBJ_NOTNULL
(
req
,
REQ_MAGIC
);
CHECK_OBJ_NOTNULL
(
req
,
REQ_MAGIC
);
...
@@ -176,10 +177,13 @@ ses_handle(struct waited *wp, enum wait_event ev, double now)
...
@@ -176,10 +177,13 @@ ses_handle(struct waited *wp, enum wait_event ev, double now)
{
{
struct
sess
*
sp
;
struct
sess
*
sp
;
struct
sesspool
*
pp
;
struct
sesspool
*
pp
;
struct
pool_task
*
tp
;
CHECK_OBJ_NOTNULL
(
wp
,
WAITED_MAGIC
);
CHECK_OBJ_NOTNULL
(
wp
,
WAITED_MAGIC
);
CAST_OBJ_NOTNULL
(
sp
,
wp
->
ptr
,
SESS_MAGIC
);
CAST_OBJ_NOTNULL
(
sp
,
wp
->
ptr
,
SESS_MAGIC
);
AZ
(
sp
->
ws
->
r
);
switch
(
ev
)
{
switch
(
ev
)
{
case
WAITER_TIMEOUT
:
case
WAITER_TIMEOUT
:
SES_Delete
(
sp
,
SC_RX_TIMEOUT
,
now
);
SES_Delete
(
sp
,
SC_RX_TIMEOUT
,
now
);
...
@@ -191,9 +195,11 @@ ses_handle(struct waited *wp, enum wait_event ev, double now)
...
@@ -191,9 +195,11 @@ ses_handle(struct waited *wp, enum wait_event ev, double now)
pp
=
sp
->
sesspool
;
pp
=
sp
->
sesspool
;
CHECK_OBJ_NOTNULL
(
pp
,
SESSPOOL_MAGIC
);
CHECK_OBJ_NOTNULL
(
pp
,
SESSPOOL_MAGIC
);
AN
(
pp
->
pool
);
AN
(
pp
->
pool
);
sp
->
task
.
func
=
SES_sess_pool_task
;
assert
(
sizeof
*
tp
==
WS_Reserve
(
sp
->
ws
,
sizeof
*
tp
));
sp
->
task
.
priv
=
sp
;
tp
=
(
void
*
)
sp
->
ws
->
f
;
if
(
Pool_Task
(
pp
->
pool
,
&
sp
->
task
,
POOL_QUEUE_FRONT
))
tp
->
func
=
SES_sess_pool_task
;
tp
->
priv
=
sp
;
if
(
Pool_Task
(
pp
->
pool
,
tp
,
POOL_QUEUE_FRONT
))
SES_Delete
(
sp
,
SC_OVERLOAD
,
now
);
SES_Delete
(
sp
,
SC_OVERLOAD
,
now
);
break
;
break
;
case
WAITER_CLOSE
:
case
WAITER_CLOSE
:
...
...
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