Instead of doing bs/2 of incompressible and zeroed data for a 50%
compression setting, use the smaller chunk size specified by
this option.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
unsigned int refill_buffers;
unsigned int scramble_buffers;
unsigned int compress_percentage;
unsigned int refill_buffers;
unsigned int scramble_buffers;
unsigned int compress_percentage;
+ unsigned int compress_chunk;
unsigned int time_based;
unsigned int disable_lat;
unsigned int disable_clat;
unsigned int time_based;
unsigned int disable_lat;
unsigned int disable_clat;
unsigned int perc = td->o.compress_percentage;
if (perc) {
unsigned int perc = td->o.compress_percentage;
if (perc) {
+ unsigned int seg = min_write;
+
+ seg = min(min_write, td->o.compress_chunk);
fill_random_buf_percentage(&td->buf_state, io_u->buf,
fill_random_buf_percentage(&td->buf_state, io_u->buf,
- perc, min_write, max_bs);
} else
fill_random_buf(&td->buf_state, io_u->buf, max_bs);
} else
} else
fill_random_buf(&td->buf_state, io_u->buf, max_bs);
} else
.minval = 1,
.help = "How compressible the buffer is (approximately)",
},
.minval = 1,
.help = "How compressible the buffer is (approximately)",
},
+ {
+ .name = "buffer_compress_chunk",
+ .type = FIO_OPT_INT,
+ .off1 = td_var_offset(compress_chunk),
+ .help = "Size of compressible region in buffer",
+ },
{
.name = "clat_percentiles",
.type = FIO_OPT_BOOL,
{
.name = "clat_percentiles",
.type = FIO_OPT_BOOL,