Support vitastor_c_create_epoll() in fio driver
Test / buildenv (push) Successful in 9s
Details
Test / build (push) Successful in 2m28s
Details
Test / test_cas (push) Successful in 8s
Details
Test / make_test (push) Successful in 33s
Details
Test / test_change_pg_size (push) Successful in 8s
Details
Test / test_create_nomaxid (push) Successful in 7s
Details
Test / test_change_pg_count (push) Successful in 44s
Details
Test / test_change_pg_count_ec (push) Successful in 40s
Details
Test / test_etcd_fail (push) Successful in 1m25s
Details
Test / test_interrupted_rebalance_imm (push) Successful in 1m25s
Details
Test / test_add_osd (push) Successful in 3m3s
Details
Test / test_failure_domain (push) Successful in 19s
Details
Test / test_interrupted_rebalance (push) Successful in 2m40s
Details
Test / test_interrupted_rebalance_ec_imm (push) Successful in 1m21s
Details
Test / test_snapshot (push) Successful in 24s
Details
Test / test_minsize_1 (push) Successful in 12s
Details
Test / test_snapshot_ec (push) Successful in 29s
Details
Test / test_move_reappear (push) Successful in 21s
Details
Test / test_rm (push) Successful in 21s
Details
Test / test_snapshot_down (push) Successful in 27s
Details
Test / test_interrupted_rebalance_ec (push) Successful in 2m29s
Details
Test / test_splitbrain (push) Successful in 20s
Details
Test / test_snapshot_down_ec (push) Successful in 24s
Details
Test / test_snapshot_chain (push) Successful in 2m35s
Details
Test / test_rebalance_verify (push) Successful in 3m22s
Details
Test / test_rebalance_verify_imm (push) Successful in 3m22s
Details
Test / test_write (push) Successful in 32s
Details
Test / test_write_no_same (push) Successful in 12s
Details
Test / test_rebalance_verify_ec (push) Successful in 3m56s
Details
Test / test_rebalance_verify_ec_imm (push) Successful in 3m51s
Details
Test / test_heal_pg_size_2 (push) Successful in 3m21s
Details
Test / test_heal_ec (push) Successful in 5m45s
Details
Test / test_heal_csum_32k_dmj (push) Successful in 5m43s
Details
Test / test_heal_csum_32k_dj (push) Successful in 6m10s
Details
Test / test_heal_csum_32k (push) Successful in 6m29s
Details
Test / test_heal_csum_4k_dmj (push) Successful in 6m22s
Details
Test / test_heal_csum_4k_dj (push) Successful in 5m51s
Details
Test / test_scrub (push) Successful in 36s
Details
Test / test_scrub_zero_osd_2 (push) Successful in 34s
Details
Test / test_heal_csum_4k (push) Successful in 5m35s
Details
Test / test_scrub_xor (push) Successful in 35s
Details
Test / test_write_xor (push) Successful in 1m31s
Details
Test / test_scrub_pg_size_6_pg_minsize_4_osd_count_6_ec (push) Successful in 31s
Details
Test / test_scrub_pg_size_3 (push) Successful in 42s
Details
Test / test_scrub_ec (push) Successful in 20s
Details
Test / test_snapshot_chain_ec (push) Successful in 1m23s
Details
Test / buildenv (push) Successful in 9s
Details
Test / build (push) Successful in 2m28s
Details
Test / test_cas (push) Successful in 8s
Details
Test / make_test (push) Successful in 33s
Details
Test / test_change_pg_size (push) Successful in 8s
Details
Test / test_create_nomaxid (push) Successful in 7s
Details
Test / test_change_pg_count (push) Successful in 44s
Details
Test / test_change_pg_count_ec (push) Successful in 40s
Details
Test / test_etcd_fail (push) Successful in 1m25s
Details
Test / test_interrupted_rebalance_imm (push) Successful in 1m25s
Details
Test / test_add_osd (push) Successful in 3m3s
Details
Test / test_failure_domain (push) Successful in 19s
Details
Test / test_interrupted_rebalance (push) Successful in 2m40s
Details
Test / test_interrupted_rebalance_ec_imm (push) Successful in 1m21s
Details
Test / test_snapshot (push) Successful in 24s
Details
Test / test_minsize_1 (push) Successful in 12s
Details
Test / test_snapshot_ec (push) Successful in 29s
Details
Test / test_move_reappear (push) Successful in 21s
Details
Test / test_rm (push) Successful in 21s
Details
Test / test_snapshot_down (push) Successful in 27s
Details
Test / test_interrupted_rebalance_ec (push) Successful in 2m29s
Details
Test / test_splitbrain (push) Successful in 20s
Details
Test / test_snapshot_down_ec (push) Successful in 24s
Details
Test / test_snapshot_chain (push) Successful in 2m35s
Details
Test / test_rebalance_verify (push) Successful in 3m22s
Details
Test / test_rebalance_verify_imm (push) Successful in 3m22s
Details
Test / test_write (push) Successful in 32s
Details
Test / test_write_no_same (push) Successful in 12s
Details
Test / test_rebalance_verify_ec (push) Successful in 3m56s
Details
Test / test_rebalance_verify_ec_imm (push) Successful in 3m51s
Details
Test / test_heal_pg_size_2 (push) Successful in 3m21s
Details
Test / test_heal_ec (push) Successful in 5m45s
Details
Test / test_heal_csum_32k_dmj (push) Successful in 5m43s
Details
Test / test_heal_csum_32k_dj (push) Successful in 6m10s
Details
Test / test_heal_csum_32k (push) Successful in 6m29s
Details
Test / test_heal_csum_4k_dmj (push) Successful in 6m22s
Details
Test / test_heal_csum_4k_dj (push) Successful in 5m51s
Details
Test / test_scrub (push) Successful in 36s
Details
Test / test_scrub_zero_osd_2 (push) Successful in 34s
Details
Test / test_heal_csum_4k (push) Successful in 5m35s
Details
Test / test_scrub_xor (push) Successful in 35s
Details
Test / test_write_xor (push) Successful in 1m31s
Details
Test / test_scrub_pg_size_6_pg_minsize_4_osd_count_6_ec (push) Successful in 31s
Details
Test / test_scrub_pg_size_3 (push) Successful in 42s
Details
Test / test_scrub_ec (push) Successful in 20s
Details
Test / test_snapshot_chain_ec (push) Successful in 1m23s
Details
parent
bac9e34836
commit
8bfea6e7de
|
@ -32,6 +32,7 @@
|
||||||
struct sec_data
|
struct sec_data
|
||||||
{
|
{
|
||||||
vitastor_c *cli = NULL;
|
vitastor_c *cli = NULL;
|
||||||
|
bool epoll_based = false;
|
||||||
void *watch = NULL;
|
void *watch = NULL;
|
||||||
bool last_sync = false;
|
bool last_sync = false;
|
||||||
/* The list of completed io_u structs. */
|
/* The list of completed io_u structs. */
|
||||||
|
@ -58,6 +59,7 @@ struct sec_options
|
||||||
int rdma_port_num = 0;
|
int rdma_port_num = 0;
|
||||||
int rdma_gid_index = 0;
|
int rdma_gid_index = 0;
|
||||||
int rdma_mtu = 0;
|
int rdma_mtu = 0;
|
||||||
|
int no_io_uring = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct fio_option options[] = {
|
static struct fio_option options[] = {
|
||||||
|
@ -193,6 +195,16 @@ static struct fio_option options[] = {
|
||||||
.category = FIO_OPT_C_ENGINE,
|
.category = FIO_OPT_C_ENGINE,
|
||||||
.group = FIO_OPT_G_FILENAME,
|
.group = FIO_OPT_G_FILENAME,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
.name = "no_io_uring",
|
||||||
|
.lname = "Disable io_uring",
|
||||||
|
.type = FIO_OPT_BOOL,
|
||||||
|
.off1 = offsetof(struct sec_options, no_io_uring),
|
||||||
|
.help = "Use epoll and plain sendmsg/recvmsg instead of io_uring (slower)",
|
||||||
|
.def = "0",
|
||||||
|
.category = FIO_OPT_C_ENGINE,
|
||||||
|
.group = FIO_OPT_G_FILENAME,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
.name = NULL,
|
.name = NULL,
|
||||||
},
|
},
|
||||||
|
@ -281,7 +293,17 @@ static int sec_setup(struct thread_data *td)
|
||||||
opt_push(options, "log_level", std::to_string(o->cluster_log).c_str());
|
opt_push(options, "log_level", std::to_string(o->cluster_log).c_str());
|
||||||
// allow writeback caching if -direct is not set
|
// allow writeback caching if -direct is not set
|
||||||
opt_push(options, "client_writeback_allowed", td->o.odirect ? "0" : "1");
|
opt_push(options, "client_writeback_allowed", td->o.odirect ? "0" : "1");
|
||||||
bsd->cli = vitastor_c_create_uring_json((const char**)options.data(), options.size());
|
bsd->cli = o->no_io_uring ? NULL : vitastor_c_create_uring_json((const char**)options.data(), options.size());
|
||||||
|
bsd->epoll_based = false;
|
||||||
|
if (!bsd->cli)
|
||||||
|
{
|
||||||
|
if (o->no_io_uring)
|
||||||
|
fprintf(stderr, "vitastor: io_uring disabled - I/O will be slower\n");
|
||||||
|
else
|
||||||
|
fprintf(stderr, "vitastor: failed to create io_uring: %s - I/O will be slower\n", strerror(errno));
|
||||||
|
bsd->cli = vitastor_c_create_epoll_json((const char**)options.data(), options.size());
|
||||||
|
bsd->epoll_based = true;
|
||||||
|
}
|
||||||
for (auto opt: options)
|
for (auto opt: options)
|
||||||
free(opt);
|
free(opt);
|
||||||
options.clear();
|
options.clear();
|
||||||
|
@ -289,12 +311,24 @@ static int sec_setup(struct thread_data *td)
|
||||||
{
|
{
|
||||||
bsd->watch = NULL;
|
bsd->watch = NULL;
|
||||||
vitastor_c_watch_inode(bsd->cli, o->image, watch_callback, bsd);
|
vitastor_c_watch_inode(bsd->cli, o->image, watch_callback, bsd);
|
||||||
while (true)
|
if (!bsd->epoll_based)
|
||||||
{
|
{
|
||||||
vitastor_c_uring_handle_events(bsd->cli);
|
while (true)
|
||||||
if (bsd->watch)
|
{
|
||||||
break;
|
vitastor_c_uring_handle_events(bsd->cli);
|
||||||
vitastor_c_uring_wait_events(bsd->cli);
|
if (bsd->watch)
|
||||||
|
break;
|
||||||
|
vitastor_c_uring_wait_events(bsd->cli);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
while (true)
|
||||||
|
{
|
||||||
|
if (bsd->watch)
|
||||||
|
break;
|
||||||
|
vitastor_c_epoll_handle_events(bsd->cli, 1000);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
td->files[0]->real_file_size = vitastor_c_inode_get_size(bsd->watch);
|
td->files[0]->real_file_size = vitastor_c_inode_get_size(bsd->watch);
|
||||||
if (!vitastor_c_inode_get_num(bsd->watch) ||
|
if (!vitastor_c_inode_get_num(bsd->watch) ||
|
||||||
|
@ -437,12 +471,24 @@ static enum fio_q_status sec_queue(struct thread_data *td, struct io_u *io)
|
||||||
static int sec_getevents(struct thread_data *td, unsigned int min, unsigned int max, const struct timespec *t)
|
static int sec_getevents(struct thread_data *td, unsigned int min, unsigned int max, const struct timespec *t)
|
||||||
{
|
{
|
||||||
sec_data *bsd = (sec_data*)td->io_ops_data;
|
sec_data *bsd = (sec_data*)td->io_ops_data;
|
||||||
while (true)
|
if (!bsd->epoll_based)
|
||||||
{
|
{
|
||||||
vitastor_c_uring_handle_events(bsd->cli);
|
while (true)
|
||||||
if (bsd->completed.size() >= min)
|
{
|
||||||
break;
|
vitastor_c_uring_handle_events(bsd->cli);
|
||||||
vitastor_c_uring_wait_events(bsd->cli);
|
if (bsd->completed.size() >= min)
|
||||||
|
break;
|
||||||
|
vitastor_c_uring_wait_events(bsd->cli);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
while (true)
|
||||||
|
{
|
||||||
|
if (bsd->completed.size() >= min)
|
||||||
|
break;
|
||||||
|
vitastor_c_epoll_handle_events(bsd->cli, 1000);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return bsd->completed.size();
|
return bsd->completed.size();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue