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
fc387c38
Commit
fc387c38
authored
Feb 09, 2012
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Eliminate the mempool poll function again, we don't need it anyway.
parent
8c2fe8d0
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
6 additions
and
15 deletions
+6
-15
cache.h
bin/varnishd/cache/cache.h
+1
-3
cache_backend.c
bin/varnishd/cache/cache_backend.c
+1
-1
cache_busyobj.c
bin/varnishd/cache/cache_busyobj.c
+1
-1
cache_mempool.c
bin/varnishd/cache/cache_mempool.c
+1
-8
cache_session.c
bin/varnishd/cache/cache_session.c
+2
-2
No files found.
bin/varnishd/cache/cache.h
View file @
fc387c38
...
...
@@ -889,15 +889,13 @@ int Lck_CondWait(pthread_cond_t *cond, struct lock *lck, struct timespec *ts);
#undef LOCK
/* cache_mempool.c */
typedef
void
mpl_poll_f
(
volatile
unsigned
*
);
void
MPL_AssertSane
(
void
*
item
);
struct
mempool
*
MPL_New
(
const
char
*
name
,
volatile
struct
poolparam
*
pp
,
volatile
unsigned
*
cur_size
,
mpl_poll_f
*
poll_f
);
volatile
unsigned
*
cur_size
);
void
MPL_Destroy
(
struct
mempool
**
mpp
);
void
*
MPL_Get
(
struct
mempool
*
mpl
,
unsigned
*
size
);
void
MPL_Free
(
struct
mempool
*
mpl
,
void
*
item
);
/* cache_panic.c */
void
PAN_Init
(
void
);
...
...
bin/varnishd/cache/cache_backend.c
View file @
fc387c38
...
...
@@ -519,6 +519,6 @@ void
VDI_Init
(
void
)
{
vbcpool
=
MPL_New
(
"vbc"
,
&
cache_param
->
vbc_pool
,
&
vbcps
,
NULL
);
vbcpool
=
MPL_New
(
"vbc"
,
&
cache_param
->
vbc_pool
,
&
vbcps
);
AN
(
vbcpool
);
}
bin/varnishd/cache/cache_busyobj.c
View file @
fc387c38
...
...
@@ -57,7 +57,7 @@ VBO_Init(void)
{
vbopool
=
MPL_New
(
"vbo"
,
&
cache_param
->
vbo_pool
,
&
cache_param
->
workspace_backend
,
NULL
);
&
cache_param
->
workspace_backend
);
AN
(
vbopool
);
}
...
...
bin/varnishd/cache/cache_mempool.c
View file @
fc387c38
...
...
@@ -57,7 +57,6 @@ struct mempool {
struct
lock
mtx
;
volatile
struct
poolparam
*
param
;
volatile
unsigned
*
cur_size
;
mpl_poll_f
*
poll_func
;
uint64_t
live
;
struct
VSC_C_mempool
*
vsc
;
unsigned
n_pool
;
...
...
@@ -105,8 +104,6 @@ mpl_guard(void *priv)
mpl_slp
=
0
.
15
;
// random
while
(
1
)
{
VTIM_sleep
(
mpl_slp
);
if
(
mpl
->
poll_func
!=
NULL
)
mpl
->
poll_func
(
mpl
->
cur_size
);
mpl_slp
=
0
.
814
;
// random
mpl
->
t_now
=
VTIM_real
();
...
...
@@ -226,8 +223,7 @@ mpl_guard(void *priv)
struct
mempool
*
MPL_New
(
const
char
*
name
,
volatile
struct
poolparam
*
pp
,
volatile
unsigned
*
cur_size
,
mpl_poll_f
*
poll_f
)
volatile
struct
poolparam
*
pp
,
volatile
unsigned
*
cur_size
)
{
struct
mempool
*
mpl
;
...
...
@@ -236,9 +232,6 @@ MPL_New(const char *name,
bprintf
(
mpl
->
name
,
"%s"
,
name
);
mpl
->
param
=
pp
;
mpl
->
cur_size
=
cur_size
;
mpl
->
poll_func
=
poll_f
;
if
(
poll_f
!=
NULL
)
poll_f
(
mpl
->
cur_size
);
VTAILQ_INIT
(
&
mpl
->
list
);
VTAILQ_INIT
(
&
mpl
->
surplus
);
Lck_New
(
&
mpl
->
mtx
,
lck_mempool
);
...
...
bin/varnishd/cache/cache_session.c
View file @
fc387c38
...
...
@@ -383,9 +383,9 @@ SES_NewPool(struct pool *wp, unsigned pool_no)
pp
->
pool
=
wp
;
bprintf
(
nb
,
"req%u"
,
pool_no
);
pp
->
mpl_req
=
MPL_New
(
nb
,
&
cache_param
->
req_pool
,
&
cache_param
->
workspace_client
,
NULL
);
&
cache_param
->
workspace_client
);
bprintf
(
nb
,
"sess%u"
,
pool_no
);
pp
->
mpl_sess
=
MPL_New
(
nb
,
&
cache_param
->
sess_pool
,
&
ses_size
,
NULL
);
pp
->
mpl_sess
=
MPL_New
(
nb
,
&
cache_param
->
sess_pool
,
&
ses_size
);
return
(
pp
);
}
...
...
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