Skip to content
This repository was archived by the owner on Mar 22, 2023. It is now read-only.

Make syncthreads() in parallel_xexec multi-use#1062

Merged
igchor merged 1 commit intopmem:masterfrom
igchor:fix_parallel_xexec
Apr 15, 2021
Merged

Make syncthreads() in parallel_xexec multi-use#1062
igchor merged 1 commit intopmem:masterfrom
igchor:fix_parallel_xexec

Conversation

@igchor
Copy link
Copy Markdown
Contributor

@igchor igchor commented Apr 1, 2021

Previously syncthreads could only be used once and this was not
documented. This patch allows for having multiple synchronization
points in a function. This might useful for testing hazard pointers.


This change is Reviewable

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 1, 2021

Codecov Report

Merging #1062 (79ed022) into master (2bc7289) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1062   +/-   ##
=======================================
  Coverage   94.16%   94.16%           
=======================================
  Files          48       48           
  Lines        4751     4751           
=======================================
  Hits         4474     4474           
  Misses        277      277           
Flag Coverage Δ
tests_clang_debug_cpp17 93.57% <ø> (-0.07%) ⬇️
tests_gcc_debug 92.09% <ø> (+0.11%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
include/libpmemobj++/condition_variable.hpp 76.19% <0.00%> (-2.39%) ⬇️
...ude/libpmemobj++/container/concurrent_hash_map.hpp 94.51% <0.00%> (+0.15%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2bc7289...79ed022. Read the comment docs.

Copy link
Copy Markdown
Member

@lukaszstolarczuk lukaszstolarczuk left a comment

Choose a reason for hiding this comment

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

Reviewed 3 of 3 files at r1.
Reviewable status: all files reviewed, 3 unresolved discussions (waiting on @igchor)


tests/common/helpers_test.cpp, line 12 at r1 (raw file):

int
main()

pls add a short comment what's in this test


tests/common/helpers_test.cpp, line 26 at r1 (raw file):

			       counter++;

you could add info that new latch is allocated here (if that's meaningful - I'm not sure... ;) )


tests/common/helpers_test.cpp, line 31 at r1 (raw file):

			       syncthreads();
		       });
}

counter is still equal to concurrency * 2 at the end of main..? maybe we could assert that too

@igchor igchor force-pushed the fix_parallel_xexec branch from 98e990e to 4113de4 Compare April 1, 2021 16:19
Copy link
Copy Markdown
Contributor Author

@igchor igchor left a comment

Choose a reason for hiding this comment

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

Reviewable status: all files reviewed, 3 unresolved discussions (waiting on @lukaszstolarczuk)


tests/common/helpers_test.cpp, line 12 at r1 (raw file):

Previously, lukaszstolarczuk (Łukasz Stolarczuk) wrote…

pls add a short comment what's in this test

Done.


tests/common/helpers_test.cpp, line 26 at r1 (raw file):

Previously, lukaszstolarczuk (Łukasz Stolarczuk) wrote…

you could add info that new latch is allocated here (if that's meaningful - I'm not sure... ;) )

I think that should not matter here - the fact that we allocate new latch is an implementation detail, this should just work :)


tests/common/helpers_test.cpp, line 31 at r1 (raw file):

Previously, lukaszstolarczuk (Łukasz Stolarczuk) wrote…

counter is still equal to concurrency * 2 at the end of main..? maybe we could assert that too

Done.

@igchor igchor force-pushed the fix_parallel_xexec branch from 4113de4 to 08f9071 Compare April 1, 2021 16:19
Copy link
Copy Markdown
Member

@lukaszstolarczuk lukaszstolarczuk left a comment

Choose a reason for hiding this comment

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

:lgtm: (just fix CI)

Reviewed 1 of 1 files at r2.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @igchor)

@igchor igchor force-pushed the fix_parallel_xexec branch from 08f9071 to 9245622 Compare April 1, 2021 18:45
Copy link
Copy Markdown
Contributor Author

@igchor igchor left a comment

Choose a reason for hiding this comment

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

Done.

Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @igchor)

Copy link
Copy Markdown
Contributor

@KFilipek KFilipek left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewed 2 of 3 files at r1, 1 of 1 files at r3.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @igchor)

@igchor igchor force-pushed the fix_parallel_xexec branch 3 times, most recently from 052f360 to abac109 Compare April 14, 2021 12:52
Previously syncthreads could only be used once and this was not
documented. This patch allows for having multiple synchronization
points in a function. This might useful for testing hazard pointers.
@igchor igchor force-pushed the fix_parallel_xexec branch from abac109 to 79ed022 Compare April 14, 2021 13:47
Copy link
Copy Markdown
Member

@lukaszstolarczuk lukaszstolarczuk left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewed 1 of 1 files at r3, 2 of 2 files at r4.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @igchor)

@igchor igchor merged commit 485353b into pmem:master Apr 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants