-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Revert "partr: fix multiqueue resorting stability" #35589
Conversation
This reverts commit c23554a.
Hm, any idea why? I know I split out that commit so it could be bisected (and reverted) easily, but it'd be good to understand |
All the tasks have the same priority, so I think this was causing it to iterate through most of them on each operation. |
@kpamnany What is the right thing to do here to dequeue tasks in the right order without being O(n^2)? |
@JeffBezanson: What's the 'right' order? Originally partr used Looks like this has been changed to |
Because using <= causes the code to traverse a large part of the structure on each operation, making the scheduler O(n^2) and then we spend all of run time there. |
Have you confirmed that with profiling? If not, I should be able to finally get started on doing some of that this week. It shouldn't really happen that sifting consumes a lot of runtime. There are If you increase |
Yes. Try running this:
with 2 threads.
with
I admit this is a pathological case, but I don't think it's ok for the default scheduler to have any worst case this bad. |
Yes. There's a 7.5X slowdown with fib in the C partr as well. And we aren't even using the priorities right now AFAICT. This needs some thought. |
* origin/master: (833 commits) Improve typesubtract for tuples (#35600) Make searchsorted*/findnext/findprev return values of keytype (#32978) fix buggy rand(RandomDevice(), Bool) (#35590) remove `Ref` allocation on task switch (#35606) Revert "partr: fix multiqueue resorting stability" (#35589) exclude types with free variables from `type_morespecific` (#35555) fix small typo in NEWS.md (#35611) enable inline allocation of structs with pointers (#34126) SparseArrays: Speed up right-division by diagonal matrices (#35533) Allow hashing 1D OffsetArrays NEWS item for introspection macros (#35594) Special case empty covec-diagonal-vec product (#35557) [GCChecker] fix a few tests by looking through casts Use norm instead of abs in generic lu factorization (#34575) [GCChecker,NFC] run clang-format -style=llvm [GCChecker] fix tests and add Makefile Add introspection macros support for dot syntax (#35522) Specialize `union` for `OneTo` (#35577) add pop!(vector, idx, [default]) (#35513) bump Pkg version (#35584) ...
This reverts commit c23554a.
This caused pfib to run ~forever.