Commit fc387c38 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Eliminate the mempool poll function again, we don't need it anyway.

parent 8c2fe8d0
......@@ -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);
......
......@@ -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);
}
......@@ -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);
}
......
......@@ -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);
......
......@@ -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);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment