The real chunk_exponent maximum is 30 (FIO_MAX == 1<<30)

parent 52692182
......@@ -1836,8 +1836,6 @@ fellow_busy_region_alloc(struct fellow_busy *fbo, size_t size, int8_t cram)
CHECK_OBJ_NOTNULL(fbo, FELLOW_BUSY_MAGIC);
AN(size);
if (size > FIO_MAX)
size = FIO_MAX;
fc = fbo->fc;
CHECK_OBJ_NOTNULL(fc, FELLOW_CACHE_MAGIC);
......@@ -3553,6 +3551,7 @@ fellow_busy_obj_getspace(struct fellow_busy *fbo, size_t *sz, uint8_t **ptr)
CHECK_OBJ_NOTNULL(fbo->fc, FELLOW_CACHE_MAGIC);
CHECK_OBJ_NOTNULL(fbo->fc->tune, STVFE_TUNE_MAGIC);
max = (size_t)1 << fbo->fc->tune->chunk_exponent;
assert(max <= FIO_MAX);
/*
* for content-length, varnish-cache will ask for less and less.
......
......@@ -40,7 +40,7 @@ TUNE(float, logbuffer_flush_interval, 2.0, 0.0, FLT_MAX);
TUNE(float, log_rewrite_ratio, 0.5, 0.001, FLT_MAX);
// reserve chunk is the larger of chunk_exponent and result from logbuffer size
TUNE(unsigned, chunk_exponent, 20 /* 1MB*/, 12 /* 4KB */, 28 /* 256MB */);
TUNE(unsigned, chunk_exponent, 20 /* 1MB*/, 12 /* 4KB */, 30 /* 1GB */);
TUNE(uint8_t, wait_table_exponent, 10, 6, 32);
TUNE(unsigned, dsk_reserve_chunks, 4, 2, UINT_MAX);
TUNE(unsigned, mem_reserve_chunks, 1, 0, UINT_MAX);
......
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