-
Notifications
You must be signed in to change notification settings - Fork 1
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
CP-52225: Misc improvements #3
CP-52225: Misc improvements #3
Conversation
a2a64d6
to
172fcad
Compare
Added another cleanup commit |
Are there any limitations to the minimum supported version of OCaml imposed by the Xen project? Otherwise I'm happy to support 4.14 as the minimum |
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.
Requiring higher versions of OCaml is acceptable
Figured out some XenRT issues and re-testing this |
This is draft but has green ticks - merge it? |
no, I've discovered issues while testing and am figuring out a fix |
Please review the fixup commit - I've missed - try Poll.poll_select (spec_fds @ inset) outset [] timeout
+ try Poll.poll_select cons.poll_status timeout so this required some workarounds. This is currently running BST+BVT and looks good (and confirmed manually to work). |
Passed Ring3 BST+BVT. |
af9b41a
to
9e792c4
Compare
86ff9e1
to
23f618b
Compare
Fixed the merge conflict. @edwintorok could you please let me know if there's anything blocking on your side or if the remaining comments are just suggestions? I haven't seen the discussed functions take up a significant amount of samples in flamegraphs so didn't undertake any further microoptimizations here. |
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.
Not necessarily a blocker, but there are 2 small improvements that could be made: drop an unneeded let _
, and replace the mutable spec_fds
with parameter passing (avoid changing spec_fds from immutable to mutable).
2cc1805
to
7ecc609
Compare
Testing the latest changes - looks like something is broken.... |
7ecc609
to
2cc1805
Compare
Spent most of the day debugging the issues last optimizations (not allocating a new event every time) introduced to no avail, so I'm reverting them back. Current version looks good in BST+BVT |
No need to maintain interface compatibility with select anymore, allocate an array of connection's poll status and modify that instead of allocating an array, three lists, and a hash table on each iteration of the main listening loop. Signed-off-by: Andrii Sultanov <[email protected]>
Signed-off-by: Frediano Ziglio <[email protected]>
String.fold_left and String.starts_with are available since OCaml 4.13 Signed-off-by: Andrii Sultanov <[email protected]>
2cc1805
to
7064d59
Compare
BST+BVT passed, squashed the fixup, merging. |
CP-52225 - poll: Reduce unnecessary allocations
No need to maintain interface compatibility with select anymore,
allocate an array of connection's poll status and modify that instead of
allocating an array, three lists, and a hash table on each iteration of
the main listening loop.
poll_select optimizations remove 10% of samples from the entire xenstore loop during a stress-test at creating 512 VMs: