Skip to content
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

Low risk Unix.select changes #5640

Merged

Conversation

edwintorok
Copy link
Contributor

@edwintorok edwintorok commented May 20, 2024

These do not convert to epoll, but instead:

  • converts selects with a delay to Thread.delay / Unix.sleepf (depending on whether the module links threads.posix already or not)
  • deletes one completely unnecessary select

There are a few more commits like this (e.g. replace one proxy function with another, or replace one Delay module with another, but I'd rather do more testing on those, even if they are seemingly low risk / correct).

For now feature/perf has already accumulated quite a few changes, that we should probably test + merge before putting more epoll content in (and then when we add epoll those same tests should still pass).

Draft PR, waiting on a BVT just in case.

snwoods and others added 2 commits May 20, 2024 17:32
Signed-off-by: Steven Woods <steven.woods@citrix.com>
This is a followup of this commit:
14fd0c9 ("CA-226177: Fix premature termination of cli")

That commit dropped the active monitoring of stunnel processes,
but kept the while-select loop.
That loop serves no purpose now, we can instead do a blocking Unix.read directly,
and get woken up when a packet arrives (this is the the single-threaded CLI, not the CLI server).

Signed-off-by: Edwin Török <edwin.torok@cloud.com>
@edwintorok edwintorok marked this pull request as ready for review May 21, 2024 16:05
@edwintorok edwintorok merged commit bf4c8e7 into xapi-project:feature/perf May 21, 2024
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants