Skip to content

Commit

Permalink
DAOS-16469 object: debug patch for EC16P2GX performance - b26
Browse files Browse the repository at this point in the history
  • Loading branch information
Nasf-Fan committed Sep 9, 2024
1 parent 70e4362 commit df1b543
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/dtx/dtx_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -755,7 +755,7 @@ dtx_batched_commit(void *arg)
dbca->dbca_cleanup_done = 0;
}

if (dtx_cont_opened(cont) &&
if (0 && dtx_cont_opened(cont) &&
!dbca->dbca_deregister && dbca->dbca_cleanup_req == NULL &&
stat.dtx_oldest_active_time != 0 &&
dtx_sec2age(stat.dtx_oldest_active_time) >= dbca->dbca_cleanup_thd) {
Expand Down Expand Up @@ -1351,7 +1351,7 @@ dtx_leader_end(struct dtx_leader_handle *dlh, struct ds_cont_hdl *coh, int resul
}
}

if (dth->dth_prepared || dtx_batched_ult_max == 0) {
if (dtx_batched_ult_max == 0) {
dth->dth_sync = 1;
goto sync;
}
Expand Down
7 changes: 4 additions & 3 deletions src/dtx/dtx_rpc.c
Original file line number Diff line number Diff line change
Expand Up @@ -225,9 +225,10 @@ dtx_req_cb(const struct crt_cb_info *cb_info)
}

out:
D_DEBUG(DB_TRACE, "DTX req for opc %x (req %p future %p) got reply from %d/%d: "
"epoch :"DF_X64", result %d\n", dra->dra_opc, req, dra->dra_future,
drr->drr_rank, drr->drr_tag, din != NULL ? din->di_epoch : 0, rc);
DL_CDEBUG(rc < 0 && rc != -DER_NONEXIST, DLOG_ERR, DB_TRACE, rc,

Check warning on line 228 in src/dtx/dtx_rpc.c

View workflow job for this annotation

GitHub Actions / Logging macro checking

check-return, Line contains too many newlines
"DTX req for opc %x (req %p future %p) got reply from %d/%d: "
"epoch :"DF_X64"\n", dra->dra_opc, req, dra->dra_future,
drr->drr_rank, drr->drr_tag, din != NULL ? din->di_epoch : 0);

drr->drr_comp = 1;
drr->drr_result = rc;
Expand Down
4 changes: 3 additions & 1 deletion src/object/cli_ec.c
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,9 @@ obj_ec_stripe_encode(daos_iod_t *iod, d_sg_list_t *sgl, uint32_t iov_idx,
}
}

ec_encode_data(cell_bytes, k, p, codec->ec_gftbls, data, parity_bufs);
(void)data;
(void)p;
//ec_encode_data(cell_bytes, k, p, codec->ec_gftbls, data, parity_bufs);

out:
for (i = 0; i < c_idx; i++)
Expand Down
24 changes: 23 additions & 1 deletion src/object/srv_ec_aggregate.c
Original file line number Diff line number Diff line change
Expand Up @@ -2667,6 +2667,11 @@ cont_ec_aggregate_cb(struct ds_cont_child *cont, daos_epoch_range_t *epr,
struct ec_agg_param *ec_agg_param = agg_param->ap_data;
vos_iter_param_t iter_param = { 0 };
struct vos_iter_anchors anchors = { 0 };
struct dtx_handle *dth = NULL;
struct dtx_share_peer *dsp;
struct dtx_id dti = { 0 };
struct dtx_epoch epoch = { 0 };
daos_unit_oid_t oid = { 0 };
int rc = 0;
int blocks = 0;

Expand Down Expand Up @@ -2715,8 +2720,25 @@ cont_ec_aggregate_cb(struct ds_cont_child *cont, daos_epoch_range_t *epr,
agg_reset_entry(&ec_agg_param->ap_agg_entry, NULL, NULL);

retry:
epoch.oe_value = epr->epr_hi;
rc = dtx_begin(cont->sc_hdl, &dti, &epoch, 0, cont->sc_pool->spc_map_version, &oid,
NULL, 0, 0, NULL, &dth);
if (rc != 0)
goto update_hae;

rc = vos_iterate(&iter_param, VOS_ITER_OBJ, true, &anchors, agg_iterate_pre_cb,
agg_iterate_post_cb, ec_agg_param, NULL);
agg_iterate_post_cb, ec_agg_param, dth);
if (rc == -DER_INPROGRESS && !d_list_empty(&dth->dth_share_tbd_list)) {
while ((dsp = d_list_pop_entry(&dth->dth_share_tbd_list,
struct dtx_share_peer, dsp_link)) != NULL) {
D_ERROR(DF_CONT ": EC aggregate hit non-committed DTX " DF_DTI "\n",
DP_CONT(cont->sc_pool->spc_uuid, cont->sc_uuid),
DP_DTI(&dsp->dsp_xid));
dtx_dsp_free(dsp);
}
}

dtx_end(dth, cont, rc);

/* Post_cb may not being executed in some cases */
agg_clear_extents(&ec_agg_param->ap_agg_entry);
Expand Down

0 comments on commit df1b543

Please sign in to comment.