-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Equalize arena slots #1436
base: master
Are you sure you want to change the base?
Equalize arena slots #1436
Conversation
Previously arena::my_references served for performance optimization, quota on number of workers was provided by occupy_free_slot</*as_worker*/true>() logic. In the patch arena::my_references is used for following to the reserved_for_masters limit.
db0bea2
to
c744fcb
Compare
@Alexandr-Konovalov Please, fix the copyright year and spelling. |
Thanks, done. |
if (!same_arena) { | ||
index1 = a->occupy_free_slot</*as_worker */false>(*td); | ||
index1 = a->occupy_free_slot(*td); | ||
is_worker_slot = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why we unset the flag?
I did not get the idea: how we distinguish if external thread occupied the workers slot.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point, here can be a problem place. Logic behind is_worker_slot = false;
is that the calling thread got index1
slot as a master, so not consuming from quota of workers slots. Is it the invalid reasoning?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What if there are more external threads than reserved slots then these external threads will take slots from workers quota.
Am I missing something?
Issue: #1281
Build on openSUSE 15.5: CC=gcc-11 CXX=g++-11 cmake -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_STANDARD=20 -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON ../..
cmake --build . --verbose --config Release -j8
ctest --timeout 180 --build-config Release -R test_scheduler_mix --repeat-until-fail 32000 |
To reproduce this hangs, a small and random third-party load on the CPU is required. |
Yes. I can't give you access to the computer, but I can run gdb and run the commands you suggested. |
Oh, thank you. Looking at the backtraces for the hang would be very helpful! |
OS: Debian 12 Build information:
Backtraces:
|
Any news? |
I able to reproduce your error report locally. Besides this, no news. |
Any news? |
Description
Previously arena::my_references served for performance optimization, quota on number of workers was provided by
occupy_free_slot</*as_worker*/true>()
logic. In the patcharena::my_references
is used for maintenance of thereserved_for_masters
limit.Fixes # - issue number(s) if exists
Type of change
Choose one or multiple, leave empty if none of the other choices apply
Add a respective label(s) to PR if you have permissions
Tests
Documentation
Breaks backward compatibility
Notify the following users
List users with
@
to send notificationsOther information