-
Notifications
You must be signed in to change notification settings - Fork 340
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
Eliminate some obviously useless threading #4219
Conversation
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.
Hi @alexpyattaev - The PR description and code changes don't match; the problem description refers to sigverify but the actual diff is touching rocksdb.
Ignoring that and responding to the rocksdb changes, I still think wiring things up to be configurable (on the CLI for now since that is where everything else is) is the right move for now to allow some customization & leave an escape hatch for later.
I have #4214 which does that; I opened this a couple days ago but didn't add reviewers and/or draw attention to it in light of the holidays. I think our efforts were mostly tangential here, but we can make sure to coordinate better in Slack to avoid any duplicated efforts moving forwards
c6c5abb
to
70d6e58
Compare
Sorry I have pushed the wrong diff. Should not make PRs late at night. Especially the "small and trivial" ones. |
I'm not sure if this function can actually get called in production, but if you look at agave/core/src/sigverify_stage.rs Lines 35 to 36 in e3f99e6
|
I guess the whole point was to save resources by skipping verify in some debug/devel runs. I guess if we are dealing with truly huge numbers of packets parallelizing it may still be wise. Changed to act same as the "real" version, which works without nested parallel iterators. |
5e7394b
to
05e51ee
Compare
05e51ee
to
f6ec641
Compare
Yeah, this seems like a reasonable change; make it somewhat match the real one. Would you mind updating the problem description / summary of changes to more accurately reflect the new change ? I know this is a fairly minor change, but I think it is nice to have PR descriptions match the underlying code change incase we're bisecting or doing something else that involves looking through history |
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.
LGTM
Problem
pub fn ed25519_verify_disabled(batches: &mut [PacketBatch]) in perf/src/sigverify.rs
does pretty much no work (sets a boolean flag for each Packet in PacketBatch) and yet it creates doubly nested parallel iterators to achieve this results. It further does this on rayon's global thread pool so it is impossible to do accounting on this activity.
Summary of Changes
Changed the function to set the flags in single flattened iterator using appropriate pool, this also matches the behavior of ed25519_verify for consistency.