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
ab4018d7
Commit
ab4018d7
authored
Jan 12, 2015
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make the waiter per session pool
parent
b2731b84
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
9 additions
and
17 deletions
+9
-17
cache.h
bin/varnishd/cache/cache.h
+1
-0
cache_main.c
bin/varnishd/cache/cache_main.c
+0
-1
cache_http1_fsm.c
bin/varnishd/http1/cache_http1_fsm.c
+2
-6
cache_waiter.c
bin/varnishd/waiter/cache_waiter.c
+3
-5
cache_waiter_epoll.c
bin/varnishd/waiter/cache_waiter_epoll.c
+1
-1
waiter.h
bin/varnishd/waiter/waiter.h
+2
-4
No files found.
bin/varnishd/cache/cache.h
View file @
ab4018d7
...
...
@@ -970,6 +970,7 @@ void VRG_dorange(struct req *req, struct busyobj *bo, const char *r);
/* cache_session.c [SES] */
void
SES_Close
(
struct
sess
*
sp
,
enum
sess_close
reason
);
void
SES_Wait
(
struct
sess
*
sp
);
void
SES_Delete
(
struct
sess
*
sp
,
enum
sess_close
reason
,
double
now
);
struct
sesspool
*
SES_NewPool
(
struct
pool
*
pp
,
unsigned
pool_no
);
void
SES_DeletePool
(
struct
sesspool
*
sp
);
...
...
bin/varnishd/cache/cache_main.c
View file @
ab4018d7
...
...
@@ -211,7 +211,6 @@ child_main(void)
Lck_New
(
&
vxid_lock
,
lck_vxid
);
WAIT_Init
(
SES_Handle
);
PAN_Init
();
CLI_Init
();
VFP_Init
();
...
...
bin/varnishd/http1/cache_http1_fsm.c
View file @
ab4018d7
...
...
@@ -44,7 +44,6 @@
#include "vcl.h"
#include "vtcp.h"
#include "vtim.h"
#include "waiter/waiter.h"
/*----------------------------------------------------------------------
* Collect a request from the client.
...
...
@@ -113,11 +112,8 @@ http1_wait(struct sess *sp, struct worker *wrk, struct req *req)
SES_ReleaseReq
(
req
);
if
(
VTCP_nonblocking
(
sp
->
fd
))
SES_Close
(
sp
,
SC_REM_CLOSE
);
else
if
(
WAIT_Enter
(
sp
))
{
VSC_C_main
->
sess_pipe_overflow
++
;
SES_Delete
(
sp
,
SC_SESS_PIPE_OVERFLOW
,
NAN
);
}
else
SES_Wait
(
sp
);
return
(
REQ_FSM_DONE
);
}
}
else
{
...
...
bin/varnishd/waiter/cache_waiter.c
View file @
ab4018d7
...
...
@@ -38,8 +38,6 @@
#include "waiter/waiter.h"
static
void
*
waiter_priv
;
const
char
*
WAIT_GetName
(
void
)
{
...
...
@@ -50,7 +48,7 @@ WAIT_GetName(void)
return
(
"no_waiter"
);
}
void
void
*
WAIT_Init
(
waiter_handle_f
*
func
)
{
...
...
@@ -58,11 +56,11 @@ WAIT_Init(waiter_handle_f *func)
AN
(
waiter
->
name
);
AN
(
waiter
->
init
);
AN
(
waiter
->
pass
);
waiter_priv
=
waiter
->
init
(
func
);
return
(
waiter
->
init
(
func
)
);
}
int
WAIT_Enter
(
struct
sess
*
sp
)
WAIT_Enter
(
void
*
waiter_priv
,
struct
sess
*
sp
)
{
CHECK_OBJ_NOTNULL
(
sp
,
SESS_MAGIC
);
...
...
bin/varnishd/waiter/cache_waiter_epoll.c
View file @
ab4018d7
...
...
@@ -132,7 +132,7 @@ vwe_eev(struct vwe *vwe, const struct epoll_event *ep, double now)
CAST_OBJ_NOTNULL
(
sp
,
ep
->
data
.
ptr
,
SESS_MAGIC
);
if
(
ep
->
events
&
EPOLLIN
||
ep
->
events
&
EPOLLPRI
)
{
VTAILQ_REMOVE
(
&
vwe
->
sesshead
,
sp
,
list
);
vwe
->
func
(
sp
,
sp
->
fd
,
WAITER_ACTION
,
now
)
vwe
->
func
(
sp
,
sp
->
fd
,
WAITER_ACTION
,
now
)
;
}
else
if
(
ep
->
events
&
EPOLLERR
)
{
VTAILQ_REMOVE
(
&
vwe
->
sesshead
,
sp
,
list
);
vwe
->
func
(
sp
,
sp
->
fd
,
WAITER_REMCLOSE
,
now
);
...
...
bin/varnishd/waiter/waiter.h
View file @
ab4018d7
...
...
@@ -48,11 +48,9 @@ struct waiter {
waiter_pass_f
*
pass
;
};
waiter_handle_f
SES_Handle
;
/* cache_waiter.c */
int
WAIT_Enter
(
struct
sess
*
sp
);
void
WAIT_Init
(
waiter_handle_f
*
);
int
WAIT_Enter
(
void
*
waiter_priv
,
struct
sess
*
sp
);
void
*
WAIT_Init
(
waiter_handle_f
*
);
const
char
*
WAIT_GetName
(
void
);
int
WAIT_Write_Session
(
struct
sess
*
sp
,
int
fd
);
...
...
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