Skip to content

Conversation

@navi-desu
Copy link
Member

  • misc: fix the exclusive lockfile fd remaining open in the caller of exec_service
  • openrc-run: properly wait for the exclusive flock in svc_wait and svc_exec
  • openrc: don't solve start dependencies, instead have services start their own dependencies, it simplifies the overall mechanism, aligns the code path of openrc with the codepath of rc-service, and i think that allows for better parallelism (not sure, need to test some more)

@navi-desu navi-desu force-pushed the parallel_rework branch 2 times, most recently from 3eed883 to fb3c6f9 Compare April 6, 2025 18:12
@navi-desu navi-desu force-pushed the parallel_rework branch 3 times, most recently from 844d529 to 75faaf3 Compare April 6, 2025 18:22
Copy link
Contributor

@N-R-K N-R-K left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The poll part of the changes look much better now.

Will review and test the rest of the changes sometime this week.

@navi-desu navi-desu force-pushed the parallel_rework branch 2 times, most recently from 1259a42 to 57b472c Compare April 6, 2025 19:56
@navi-desu navi-desu force-pushed the parallel_rework branch 2 times, most recently from 3490c8b to 65d07dc Compare April 6, 2025 23:39
@navi-desu
Copy link
Member Author

okay so, the changes to the dependency code can have some racy edge cases as it was, so i'll drop them for now and work on them again at a later date

so for now, let's just get the refactors for proper waiting in

@navi-desu navi-desu changed the title rework exclusive fd and parallel dependency code wait for exclusive fds properly Apr 6, 2025
it makes no sense for the parent to hold the lock, even with cloexec,
and that makes attempts to wait on flock useless. it only worked so far
due to busy-polling with open, so basically, we were waiting for an
unlink, not a lockfile.
and use alarm.2 for timing out, this means that instead of waking up
every 20ms and doing a few syscalls to check the lockfile, we wake up
only every 10s for warning about the timeout
@navi-desu navi-desu merged commit b64ab9c into master Apr 15, 2025
9 of 10 checks passed
@navi-desu navi-desu deleted the parallel_rework branch April 15, 2025 00:45
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.

3 participants