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
a84f28ee
Commit
a84f28ee
authored
Jun 09, 2015
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename to more appropriate names: It's about the tasks not the
pools that service them.
parent
d5db14b2
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
16 additions
and
16 deletions
+16
-16
cache.h
bin/varnishd/cache/cache.h
+5
-5
cache_acceptor.c
bin/varnishd/cache/cache_acceptor.c
+2
-2
cache_backend_poll.c
bin/varnishd/cache/cache_backend_poll.c
+1
-1
cache_fetch.c
bin/varnishd/cache/cache_fetch.c
+1
-1
cache_pool.c
bin/varnishd/cache/cache_pool.c
+1
-1
cache_session.c
bin/varnishd/cache/cache_session.c
+2
-2
cache_wrk.c
bin/varnishd/cache/cache_wrk.c
+4
-4
No files found.
bin/varnishd/cache/cache.h
View file @
a84f28ee
...
...
@@ -313,9 +313,9 @@ struct pool_task {
void
*
priv
;
};
enum
pool
_how
{
POOL
_QUEUE_FRONT
,
POOL
_QUEUE_BACK
enum
task
_how
{
TASK
_QUEUE_FRONT
,
TASK
_QUEUE_BACK
};
/*--------------------------------------------------------------------*/
...
...
@@ -946,13 +946,13 @@ const char *sess_close_2str(enum sess_close sc, int want_desc);
/* cache_pool.c */
void
Pool_Init
(
void
);
int
Pool_Task
(
struct
pool
*
pp
,
struct
pool_task
*
task
,
enum
pool
_how
how
);
int
Pool_Task
(
struct
pool
*
pp
,
struct
pool_task
*
task
,
enum
task
_how
how
);
int
Pool_Task_Arg
(
struct
worker
*
,
task_func_t
*
,
const
void
*
arg
,
size_t
arg_len
);
void
Pool_Sumstat
(
struct
worker
*
w
);
int
Pool_TrySumstat
(
struct
worker
*
wrk
);
void
Pool_PurgeStat
(
unsigned
nobj
);
int
Pool_Task_Any
(
struct
pool_task
*
task
,
enum
pool
_how
how
);
int
Pool_Task_Any
(
struct
pool_task
*
task
,
enum
task
_how
how
);
#define V1L_IsReleased(w) ((w)->v1l == NULL)
void
V1L_Chunked
(
const
struct
worker
*
w
);
...
...
bin/varnishd/cache/cache_acceptor.c
View file @
a84f28ee
...
...
@@ -437,7 +437,7 @@ vca_accept_task(struct worker *wrk, void *arg)
* must reschedule the listening task so it will be
* taken up by another thread again.
*/
AZ
(
Pool_Task
(
wrk
->
pool
,
&
ps
->
task
,
POOL
_QUEUE_BACK
));
AZ
(
Pool_Task
(
wrk
->
pool
,
&
ps
->
task
,
TASK
_QUEUE_BACK
));
return
;
}
...
...
@@ -468,7 +468,7 @@ VCA_NewPool(struct pool *pp)
ps
->
task
.
func
=
vca_accept_task
;
ps
->
task
.
priv
=
ps
;
ps
->
pool
=
pp
;
AZ
(
Pool_Task
(
pp
,
&
ps
->
task
,
POOL
_QUEUE_BACK
));
AZ
(
Pool_Task
(
pp
,
&
ps
->
task
,
TASK
_QUEUE_BACK
));
}
}
...
...
bin/varnishd/cache/cache_backend_poll.c
View file @
a84f28ee
...
...
@@ -363,7 +363,7 @@ vbp_thread(struct worker *wrk, void *priv)
vt
->
task
.
func
=
vbp_task
;
vt
->
task
.
priv
=
vt
;
if
(
Pool_Task_Any
(
&
vt
->
task
,
POOL
_QUEUE_FRONT
))
{
if
(
Pool_Task_Any
(
&
vt
->
task
,
TASK
_QUEUE_FRONT
))
{
Lck_Lock
(
&
vbp_mtx
);
vt
->
running
=
0
;
Lck_Unlock
(
&
vbp_mtx
);
...
...
bin/varnishd/cache/cache_fetch.c
View file @
a84f28ee
...
...
@@ -1003,7 +1003,7 @@ VBF_Fetch(struct worker *wrk, struct req *req, struct objcore *oc,
bo
->
fetch_task
.
priv
=
bo_fetch
;
bo
->
fetch_task
.
func
=
vbf_fetch_thread
;
if
(
Pool_Task
(
wrk
->
pool
,
&
bo
->
fetch_task
,
POOL
_QUEUE_FRONT
))
{
if
(
Pool_Task
(
wrk
->
pool
,
&
bo
->
fetch_task
,
TASK
_QUEUE_FRONT
))
{
wrk
->
stats
->
fetch_no_thread
++
;
(
void
)
vbf_stp_fail
(
req
->
wrk
,
bo
);
if
(
bo
->
stale_oc
!=
NULL
)
...
...
bin/varnishd/cache/cache_pool.c
View file @
a84f28ee
...
...
@@ -91,7 +91,7 @@ Pool_TrySumstat(struct worker *wrk)
*/
int
Pool_Task_Any
(
struct
pool_task
*
task
,
enum
pool
_how
how
)
Pool_Task_Any
(
struct
pool_task
*
task
,
enum
task
_how
how
)
{
struct
pool
*
pp
;
...
...
bin/varnishd/cache/cache_session.c
View file @
a84f28ee
...
...
@@ -415,7 +415,7 @@ SES_Reschedule_Req(struct req *req)
req
->
task
.
func
=
SES_Proto_Req
;
req
->
task
.
priv
=
req
;
return
(
Pool_Task
(
pp
,
&
req
->
task
,
POOL
_QUEUE_FRONT
));
return
(
Pool_Task
(
pp
,
&
req
->
task
,
TASK
_QUEUE_FRONT
));
}
/*--------------------------------------------------------------------
...
...
@@ -451,7 +451,7 @@ ses_handle(struct waited *wp, enum wait_event ev, double now)
tp
=
(
void
*
)
sp
->
ws
->
f
;
tp
->
func
=
SES_Proto_Sess
;
tp
->
priv
=
sp
;
if
(
Pool_Task
(
pp
,
tp
,
POOL
_QUEUE_FRONT
))
if
(
Pool_Task
(
pp
,
tp
,
TASK
_QUEUE_FRONT
))
SES_Delete
(
sp
,
SC_OVERLOAD
,
now
);
break
;
case
WAITER_CLOSE
:
...
...
bin/varnishd/cache/cache_wrk.c
View file @
a84f28ee
...
...
@@ -218,7 +218,7 @@ Pool_Task_Arg(struct worker *wrk, task_func_t *func,
*/
int
Pool_Task
(
struct
pool
*
pp
,
struct
pool_task
*
task
,
enum
pool
_how
how
)
Pool_Task
(
struct
pool
*
pp
,
struct
pool_task
*
task
,
enum
task
_how
how
)
{
struct
worker
*
wrk
;
int
retval
=
0
;
...
...
@@ -245,7 +245,7 @@ Pool_Task(struct pool *pp, struct pool_task *task, enum pool_how how)
}
switch
(
how
)
{
case
POOL
_QUEUE_FRONT
:
case
TASK
_QUEUE_FRONT
:
/* If we have too much in the queue already, refuse. */
if
(
pp
->
lqueue
>
cache_param
->
wthread_queue_limit
)
{
pp
->
ndropped
++
;
...
...
@@ -256,11 +256,11 @@ Pool_Task(struct pool *pp, struct pool_task *task, enum pool_how how)
pp
->
lqueue
++
;
}
break
;
case
POOL
_QUEUE_BACK
:
case
TASK
_QUEUE_BACK
:
VTAILQ_INSERT_TAIL
(
&
pp
->
back_queue
,
task
,
list
);
break
;
default:
WRONG
(
"Unknown enum
pool
_how"
);
WRONG
(
"Unknown enum
task
_how"
);
}
Lck_Unlock
(
&
pp
->
mtx
);
return
(
retval
);
...
...
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