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-16307 client: Defer creating network context in child processes #14875

Merged
merged 3 commits into from
Aug 16, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions src/client/dfuse/il/int_posix.c
Original file line number Diff line number Diff line change
Expand Up @@ -807,11 +807,6 @@ child_hdlr(void)
DL_WARN(rc, "daos_eq_lib_init() failed in child process");
daos_dti_reset();
ioil_eqh = ioil_iog.iog_main_eqh = DAOS_HDL_INVAL;
Copy link
Contributor

@mchaarawi mchaarawi Aug 6, 2024

Choose a reason for hiding this comment

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

i don't think we should do this for0 IOIL.
IOIL only intercepts read/write calls unlike pil4dfs. So it's more likely that that context is going to be used in this case.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

child_hdlr() is executed once a child process is forked if the parent process calls open() to access files on daos. We do not know whether the child process only calls metadata related functions or not.

Copy link
Contributor

Choose a reason for hiding this comment

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

this was not my point.
IOIL does not intercept any metadata or libaio calls, so creating a context here is not going to matter much and is only beneficial in case the child actually does IO that is intercepted.
But in pil4dfs case, the child will create additional network context now if it does libaio for example, and we already started creating aio context here taking away a resource from there.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok. Just reverted the change in libioil.

rc = daos_eq_create(&ioil_eqh);
if (rc)
DFUSE_LOG_WARNING("daos_eq_create() failed: "DF_RC, DP_RC(rc));
else
ioil_iog.iog_main_eqh = ioil_eqh;
}

/* Returns true on success */
Expand Down
7 changes: 0 additions & 7 deletions src/client/dfuse/pil4dfs/int_dfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -940,13 +940,6 @@ child_hdlr(void)
DL_WARN(rc, "daos_eq_lib_init() failed in child process");
daos_dti_reset();
td_eqh = main_eqh = DAOS_HDL_INVAL;
if (d_eq_count_max > 0) {
rc = daos_eq_create(&td_eqh);
if (rc)
DL_WARN(rc, "daos_eq_create() failed");
else
main_eqh = td_eqh;
}
context_reset = true;
}

Expand Down
5 changes: 4 additions & 1 deletion src/tests/ftest/dfuse/bash.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,10 @@ def run_bashcmd(self, il_lib=None, compatible_mode=False):
f"bzip2 -z {fuse_root_dir}/lib.a",
f"chmod u-r {fuse_root_dir}/lib.a.bz2",
'fio --readwrite=randwrite --name=test --size="2M" --directory '
f'{fuse_root_dir}/ --bs=1M --numjobs="4" --ioengine=psync '
f'{fuse_root_dir}/ --bs=1M --numjobs="4" --ioengine=psync --thread=0'
"--group_reporting --exitall_on_error --continue_on_error=none",
'fio --readwrite=randwrite --name=test --size="2M" --directory '
f'{fuse_root_dir}/ --bs=1M --numjobs="4" --ioengine=psync --thread=1'
"--group_reporting --exitall_on_error --continue_on_error=none",
'fio --readwrite=randwrite --name=test --size="2M" --directory '
f'{fuse_root_dir}/ --bs=1M --numjobs="1" --ioengine=libaio --iodepth=16'
Expand Down
Loading