-
-
Notifications
You must be signed in to change notification settings - Fork 294
Make H5FL package threadsafe #5195
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
base: develop
Are you sure you want to change the base?
Conversation
Signed-off-by: Quincey Koziol <[email protected]>
Signed-off-by: Quincey Koziol <[email protected]>
Signed-off-by: Quincey Koziol <[email protected]>
…tocol Signed-off-by: Quincey Koziol <[email protected]>
Signed-off-by: Quincey Koziol <[email protected]>
Signed-off-by: Quincey Koziol <[email protected]>
…tocol Signed-off-by: Quincey Koziol <[email protected]>
Signed-off-by: Quincey Koziol <[email protected]>
Signed-off-by: Quincey Koziol <[email protected]>
Can I please get some reviews on this? @fortnern @mattjala @jhendersonHDF @derobins |
Signed-off-by: Quincey Koziol <[email protected]>
Signed-off-by: Quincey Koziol <[email protected]>
Signed-off-by: Quincey Koziol <[email protected]>
@qkoziol the conflicts are Makefile.ams that are gone in develop since autotools support has been removed there. Do we need to fix the conflicts, or is this PR to be superseeded by another one that will be coming? |
I have been waiting for the CMake builds to stabilize, which I believe we're at. I'll update this to resolve the conflicts this week. |
Library:
Added mutex that obeys disable-locking-for-this-thread (DLFTT) semantics, to enable threadsafe data structures within the library that "suspend" locking when a thread has exclusive ownership of the library. (in src/H5TSdlftt_mutex.[ch])
Initialize the threadsafe aspects of the H5FL package at library startup, when concurrency is enabled. (in src/H5.c)
Added new H5_global_t type, with H5_GLOBAL_INIT macro, to hold and initialize threadsafe globals with complex initialization that needs to be performed dynamically at runtime. (in src/H5private.h)
Added wrapper for atomic size_t variables. (in src/H5TSprivate.h and src/H5TSatomic.c)
Added new H5TS_bootstrap_g DLFTT mutex in src/H5TSint.c to support new threadsafe globals. (in src/H5TSint.c)
H5FL package changes: (in src/H5FL.c and src/H5FLprivate.h)
Testing:
Added new h5_setup_local_rand() support routine to initialize h5_local_rand() with gettimeofday() or a predefined seed value.
Expand test/tmisc.c, test_misc35(), to cover additional cases.
Added tts_h5fl() to ttsafe test, skipped by default for non-concurrency builds.
The tts_h5fl() testing generates multiple random test vectors of operations for each type of free list (regular, block, factory, and array) and then spawns threads that randomly chooses a set of test vectors to execute concurrently.