Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DAOS-14261 engine: Add dss_chore for I/O forwarding #13372

Merged
merged 15 commits into from
Mar 22, 2024
Merged

Conversation

liw
Copy link
Contributor

@liw liw commented Nov 22, 2023

As requested by the Jira ticket, add a new I/O forwarding mechanism,
dss_chore, to avoid creating a ULT for every forwarding task.

  • Forwarding of object I/O and DTX RPCs is converted to chores.

  • Cancelation is not implemented, because the I/O forwarding tasks
    themselves do not support cancelation yet.

  • In certain engine configurations, some xstreams do not need to
    initialize dx_chore_queue. This is left to future work.

Before requesting gatekeeper:

  • Two review approvals and any prior change requests have been resolved.
  • Testing is complete and all tests passed or there is a reason documented in the PR why it should be force landed and forced-landing tag is set.
  • Features: (or Test-tag*) commit pragma was used or there is a reason documented that there are no appropriate tags for this PR.
  • Commit messages follows the guidelines outlined here.
  • Any tests skipped by the ticket being addressed have been run and passed in the PR.

Gatekeeper:

  • You are the appropriate gatekeeper to be landing the patch.
  • The PR has 2 reviews by people familiar with the code, including appropriate watchers.
  • Githooks were used. If not, request that user install them and check copyright dates.
  • Checkpatch issues are resolved. Pay particular attention to ones that will show up on future PRs.
  • All builds have passed. Check non-required builds for any new compiler warnings.
  • Sufficient testing is done. Check feature pragmas and test tags and that tests skipped for the ticket are run and now pass with the changes.
  • If applicable, the PR has addressed any potential version compatibility issues.
  • Check the target branch. If it is master branch, should the PR go to a feature branch? If it is a release branch, does it have merge approval in the JIRA ticket.
  • Extra checks if forced landing is requested
    • Review comments are sufficiently resolved, particularly by prior reviewers that requested changes.
    • No new NLT or valgrind warnings. Check the classic view.
    • Quick-build or Quick-functional is not used.
  • Fix the commit message upon landing. Check the standard here. Edit it to create a single commit. If necessary, ask submitter for a new summary.

Copy link

Bug-tracker data:
Ticket title is 'limit ULT creation on helper xstream'
Status is 'In Progress'
https://daosio.atlassian.net/browse/DAOS-14261

Copy link
Collaborator

@daosbuild1 daosbuild1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. No errors found by checkpatch.

@daosbuild1
Copy link
Collaborator

Test stage Build RPM on EL 9 completed with status FAILURE. https://build.hpdd.intel.com//job/daos-stack/job/daos/view/change-requests/job/PR-13372/1/execution/node/381/log

@daosbuild1
Copy link
Collaborator

Test stage Build RPM on EL 8 completed with status FAILURE. https://build.hpdd.intel.com//job/daos-stack/job/daos/view/change-requests/job/PR-13372/1/execution/node/368/log

@daosbuild1
Copy link
Collaborator

Test stage Build RPM on Leap 15.4 completed with status FAILURE. https://build.hpdd.intel.com//job/daos-stack/job/daos/view/change-requests/job/PR-13372/1/execution/node/356/log

@daosbuild1
Copy link
Collaborator

@daosbuild1
Copy link
Collaborator

Test stage Build DEB on Ubuntu 20.04 completed with status FAILURE. https://build.hpdd.intel.com//job/daos-stack/job/daos/view/change-requests/job/PR-13372/1/execution/node/315/log

@daosbuild1
Copy link
Collaborator

Test stage Build on Leap 15.4 with Intel-C and TARGET_PREFIX completed with status FAILURE. https://build.hpdd.intel.com//job/daos-stack/job/daos/view/change-requests/job/PR-13372/1/execution/node/543/log

Copy link
Collaborator

@daosbuild1 daosbuild1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. No errors found by checkpatch.

Copy link
Collaborator

@daosbuild1 daosbuild1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. No errors found by checkpatch.

@daosbuild1
Copy link
Collaborator

Copy link
Collaborator

@daosbuild1 daosbuild1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. No errors found by checkpatch.

@daosbuild1
Copy link
Collaborator

Test stage Functional Hardware Medium MD on SSD completed with status FAILURE. https://build.hpdd.intel.com//job/daos-stack/job/daos/view/change-requests/job/PR-13372/4/execution/node/1377/log

@daosbuild1
Copy link
Collaborator

Test stage Functional Hardware Medium completed with status FAILURE. https://build.hpdd.intel.com//job/daos-stack/job/daos/view/change-requests/job/PR-13372/4/execution/node/1331/log

@daosbuild1
Copy link
Collaborator

Test stage Functional Hardware Large completed with status FAILURE. https://build.hpdd.intel.com//job/daos-stack/job/daos/view/change-requests/job/PR-13372/4/execution/node/1519/log

@daosbuild1
Copy link
Collaborator

Test stage Functional Hardware Medium Verbs Provider completed with status FAILURE. https://build.hpdd.intel.com//job/daos-stack/job/daos/view/change-requests/job/PR-13372/4/execution/node/1473/log

Copy link
Collaborator

@daosbuild1 daosbuild1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. No errors found by checkpatch.

@daosbuild1
Copy link
Collaborator

Test stage Functional Hardware Large completed with status FAILURE. https://build.hpdd.intel.com//job/daos-stack/job/daos/view/change-requests/job/PR-13372/5/execution/node/1331/log

@liw liw force-pushed the liw/helper-ult branch 2 times, most recently from a4658c2 to 3325b2a Compare November 30, 2023 02:58
Copy link
Collaborator

@daosbuild1 daosbuild1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. No errors found by checkpatch.

Copy link
Collaborator

@daosbuild1 daosbuild1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. No errors found by checkpatch.

@daosbuild1
Copy link
Collaborator

Test stage Functional Hardware Large completed with status FAILURE. https://build.hpdd.intel.com//job/daos-stack/job/daos/view/change-requests/job/PR-13372/9/execution/node/352/log

@daosbuild1
Copy link
Collaborator

Test stage Functional Hardware Medium completed with status FAILURE. https://build.hpdd.intel.com//job/daos-stack/job/daos/view/change-requests/job/PR-13372/9/execution/node/448/log

@daosbuild1
Copy link
Collaborator

Test stage Functional Hardware Medium MD on SSD completed with status FAILURE. https://build.hpdd.intel.com//job/daos-stack/job/daos/view/change-requests/job/PR-13372/9/execution/node/564/log

@liw liw requested a review from Nasf-Fan December 18, 2023 01:20
@daosbuild1
Copy link
Collaborator

Test stage Functional Hardware Medium completed with status UNSTABLE. https://build.hpdd.intel.com/job/daos-stack/job/daos//view/change-requests/job/PR-13372/14/testReport/

NiuYawei
NiuYawei previously approved these changes Dec 19, 2023
@@ -773,6 +787,8 @@ dss_start_one_xstream(hwloc_cpuset_t cpus, int tag, int xs_id)
} else {
dx->dx_main_xs = (xs_id >= dss_sys_xs_nr) && (xs_offset == 0);
}
/* See the DSS_XS_IOFW case in sched_ult2xs. */
dx->dx_iofw = xs_id >= dss_sys_xs_nr && (!dx->dx_main_xs || dss_tgt_offload_xs_nr == 0);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor: Seems you don't regard vos xstream as iofw xstream, so it could be simplified as "dx->dx_iofw = xs_id >= dss_sys_xs_nr && !dx->dx_main_xs".

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@NiuYawei, I thought about the same when updating the patch last time. Ended up keeping it this way because if we make such a change to dx_iofw, then a dx_iofw xstream != a DSS_XS_IOFW xstream, potentially making our terminology even more complex (i.e., we currently talk about "I/O forward xstream", "offload xstream", "helper xstream", "DSS_XS_OFFLOAD xstream", etc.---already too confusing).

Copy link
Contributor Author

@liw liw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Nasf-Fan, thanks for the replies.

D_ASSERT(chore->cho_status != DSS_CHORE_NEW);
if (chore->cho_status == DSS_CHORE_DONE)
d_list_del_init(&chore->cho_link);
ABT_thread_yield();
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, list is not cleared before the splice. Have I overlooked anything?

}
rc = dss_chore_delegate(&dca->dca_chore, dtx_rpc_helper);
} else {
dss_chore_diy(&dca->dca_chore, dtx_rpc_helper);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I prefer not to merge diy with delegate, if that's acceptable to you.

@daosbuild1
Copy link
Collaborator

Test stage Functional Hardware Medium completed with status UNSTABLE. https://build.hpdd.intel.com/job/daos-stack/job/daos//view/change-requests/job/PR-13372/15/testReport/

@Nasf-Fan
Copy link
Contributor

Nasf-Fan commented Jan 8, 2024

dtx_common.c and dtx_rpc.c have been much changed recently, need some merge work for this patch.

liw added 2 commits January 17, 2024 17:08
Signed-off-by: Li Wei <[email protected]>
Required-githooks: true
@daosbuild1
Copy link
Collaborator

Test stage Functional Hardware Medium completed with status FAILURE. https://build.hpdd.intel.com//job/daos-stack/job/daos/view/change-requests/job/PR-13372/16/execution/node/1387/log

Signed-off-by: Li Wei <[email protected]>
Required-githooks: true
@daosbuild1
Copy link
Collaborator

Test stage Functional Hardware Large completed with status FAILURE. https://build.hpdd.intel.com//job/daos-stack/job/daos/view/change-requests/job/PR-13372/16/execution/node/1574/log

liw added 2 commits January 23, 2024 14:59
Signed-off-by: Li Wei <[email protected]>
Required-githooks: true
else
rc = dtx_rpc_internal(dca);
if (dss_has_enough_helper()) {
rc = ABT_eventual_create(0, &dca->dca_chore_eventual);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why non-coll case need the eventual, but coll case does not?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible to not create the dca_chore_eventual, instead, depends on the dra->dra_future to check whether related operation has been done or not, then non-coll case and coll case can share the same mechanism or logic.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why non-coll case need the eventual, but coll case does not?

@Nasf-Fan, the dca_chore_eventual is for dtx_rpc_post to know when it's safe to access dra_future.

Is it possible to not create the dca_chore_eventual, instead, depends on the dra->dra_future to check whether related operation has been done or not, then non-coll case and coll case can share the same mechanism or logic.

AFAICS, it's possible, though not easy. The main trouble is that the number of slots in the future is computed by the chore, so we can't create the future until the chore has run to the point where that number is computed. Also, even if we really want to make such a change in this PR, it will take more changes to share the mechanism with dtx_coll_rpc_helper, since the two code paths use different data structures.

So, what do you think?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why non-coll case need the eventual, but coll case does not?

@Nasf-Fan, the dca_chore_eventual is for dtx_rpc_post to know when it's safe to access dra_future.

Is it possible to not create the dca_chore_eventual, instead, depends on the dra->dra_future to check whether related operation has been done or not, then non-coll case and coll case can share the same mechanism or logic.

AFAICS, it's possible, though not easy. The main trouble is that the number of slots in the future is computed by the chore, so we can't create the future until the chore has run to the point where that number is computed. Also, even if we really want to make such a change in this PR, it will take more changes to share the mechanism with dtx_coll_rpc_helper, since the two code paths use different data structures.

So, what do you think?

Then ignore my former comment and go ahead.

@Nasf-Fan Nasf-Fan self-requested a review February 2, 2024 14:20
Features: tx
Required-githooks: true
else
rc = dtx_rpc_internal(dca);
if (dss_has_enough_helper()) {
rc = ABT_eventual_create(0, &dca->dca_chore_eventual);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why non-coll case need the eventual, but coll case does not?

@Nasf-Fan, the dca_chore_eventual is for dtx_rpc_post to know when it's safe to access dra_future.

Is it possible to not create the dca_chore_eventual, instead, depends on the dra->dra_future to check whether related operation has been done or not, then non-coll case and coll case can share the same mechanism or logic.

AFAICS, it's possible, though not easy. The main trouble is that the number of slots in the future is computed by the chore, so we can't create the future until the chore has run to the point where that number is computed. Also, even if we really want to make such a change in this PR, it will take more changes to share the mechanism with dtx_coll_rpc_helper, since the two code paths use different data structures.

So, what do you think?

Then ignore my former comment and go ahead.

@liw liw requested review from a team as code owners February 19, 2024 08:18
Copy link

Bug-tracker data:
Ticket title is 'limit ULT creation on helper xstream'
Status is 'In Progress'
https://daosio.atlassian.net/browse/DAOS-14261

Features: tx
Required-githooks: true
@liw liw requested a review from NiuYawei March 19, 2024 04:19
Copy link

Ticket title is 'limit ULT creation on helper xstream'
Status is 'In Progress'
https://daosio.atlassian.net/browse/DAOS-14261

@liw liw requested a review from a team March 21, 2024 23:53
@NiuYawei NiuYawei merged commit 9351bd2 into master Mar 22, 2024
48 of 49 checks passed
@NiuYawei NiuYawei deleted the liw/helper-ult branch March 22, 2024 01:28
jolivier23 pushed a commit that referenced this pull request Apr 12, 2024
As requested by the Jira ticket, add a new I/O forwarding mechanism,
dss_chore, to avoid creating a ULT for every forwarding task.

  - Forwarding of object I/O and DTX RPCs is converted to chores.

  - Cancelation is not implemented, because the I/O forwarding tasks
    themselves do not support cancelation yet.

  - In certain engine configurations, some xstreams do not need to
    initialize dx_chore_queue. This is left to future work.

Required-githooks: true
Skipped-githooks: clang

Change-Id: I8d6f9889f5562a8bc3683d26cb830672a8aa40f3
Signed-off-by: Li Wei <[email protected]>
jolivier23 added a commit that referenced this pull request Apr 19, 2024
As requested by the Jira ticket, add a new I/O forwarding mechanism,
dss_chore, to avoid creating a ULT for every forwarding task.

  - Forwarding of object I/O and DTX RPCs is converted to chores.

  - Cancelation is not implemented, because the I/O forwarding tasks
    themselves do not support cancelation yet.

  - In certain engine configurations, some xstreams do not need to
    initialize dx_chore_queue. This is left to future work.

Signed-off-by: Li Wei <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants