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

[GSOC] Qthread Select #18019

Merged
merged 2 commits into from Aug 4, 2021
Merged

[GSOC] Qthread Select #18019

merged 2 commits into from Aug 4, 2021

Conversation

king-11
Copy link
Contributor

@king-11 king-11 commented Jul 1, 2021

conditional compilation of qt_select for providing in a method to keep original task unblocked when observing for IO.

Prior to qt_select call select and block for 64ms which allows instantaneous connections to be established
without timing out.

Signed-off-by: Lakshya Singh lakshay.singh1108@gmail.com

runtime/src/qio/sys.c Outdated Show resolved Hide resolved
@king-11 king-11 force-pushed the qt_sys_calls branch 2 times, most recently from f3435c5 to 839372d Compare July 15, 2021 14:21
@king-11 king-11 changed the title Qthread Sys Calls Qthread Select Jul 15, 2021
@king-11 king-11 force-pushed the qt_sys_calls branch 3 times, most recently from c278e95 to 83ebb6d Compare July 23, 2021 02:51
@mppf
Copy link
Member

mppf commented Jul 28, 2021

I've run testing with this but I see these failures

[Error matching compiler output for io/ferguson/ctests/qbuffer_test]
[Error matching compiler output for io/ferguson/ctests/qio_bits_test]
[Error matching compiler output for io/ferguson/ctests/qio_formatted_test]
[Error matching compiler output for io/ferguson/ctests/qio_mark_test]
[Error matching compiler output for io/ferguson/ctests/qio_memfile_test]
[Error matching compiler output for io/ferguson/ctests/qio_pwriteread]
[Error matching compiler output for io/ferguson/ctests/qio_test]

While this is a testing problem, I'm not quite sure how to solve it. These tests try to compile some C code with some C files from the runtime to check that they work.

Can we disable the qthreads integration if -DCHPL_RT_UNIT_TEST is provided - that is - put it in an #ifndef CHPL_RT_UNIT_TEST ?

@king-11
Copy link
Contributor Author

king-11 commented Jul 29, 2021

Made the required updates @mppf

@king-11 king-11 changed the title Qthread Select [GSOC] Qthread Select Jul 29, 2021
runtime/src/qio/sys.c Outdated Show resolved Hide resolved
runtime/src/qio/sys.c Outdated Show resolved Hide resolved
runtime/src/qio/sys.c Outdated Show resolved Hide resolved
@mppf
Copy link
Member

mppf commented Jul 29, 2021

@king-11 - let me know when you've addressed the feedback and I'll run testing again. Thanks.

qt sys calls handle blocking sys calls whenever qthreads are
available to us keeping the orginal thread unblocked
Signed-off-by: Lakshya Singh <lakshay.singh1108@gmail.com>
@king-11 king-11 force-pushed the qt_sys_calls branch 6 times, most recently from b1d511f to e91ad0b Compare July 29, 2021 17:54
runtime/src/qio/sys.c Outdated Show resolved Hide resolved
runtime/src/qio/sys.c Outdated Show resolved Hide resolved
@king-11 king-11 force-pushed the qt_sys_calls branch 3 times, most recently from ecfdd3b to 41a11b1 Compare July 30, 2021 10:18
runtime/src/qio/sys.c Outdated Show resolved Hide resolved
runtime/src/qio/sys.c Outdated Show resolved Hide resolved
allow blocking select for small timeout
don't compile with qt_select in test env
after which we call qt_select or blocking select based on availability
busy wait select doesn't work hence is commented out for time being
Signed-off-by: Lakshya Singh <lakshay.singh1108@gmail.com>
@mppf
Copy link
Member

mppf commented Jul 30, 2021

Looking good. I'd like to run testing again before merging.

@mppf
Copy link
Member

mppf commented Aug 4, 2021

Passed full local testing

@mppf mppf merged commit 1861b11 into chapel-lang:main Aug 4, 2021
@king-11 king-11 deleted the qt_sys_calls branch August 5, 2021 05:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants