Skip to content

Admin Improvements#15559

Merged
Ashod merged 4 commits intomainfrom
private/ash/admin
Apr 21, 2026
Merged

Admin Improvements#15559
Ashod merged 4 commits intomainfrom
private/ash/admin

Conversation

@Ashod
Copy link
Copy Markdown
Contributor

@Ashod Ashod commented Apr 17, 2026

  • wsd: manage Admin singleton explicitly
  • wsd: use deadline-based poll in Admin
  • wsd: use chrono in Admin
  • wsd: minor Admin cleanup

@Ashod Ashod changed the title private/ash/admin Admin Improvements Apr 17, 2026
@Ashod Ashod requested a review from caolanm April 17, 2026 12:52
@Ashod Ashod force-pushed the private/ash/admin branch from a8fde6e to efcfe6f Compare April 18, 2026 16:26
Comment thread net/Socket.hpp Outdated
/// Takes the deadline, instead of a timeout.
/// Note: will *not* return until the deadline expires, or upon
/// hitting an error. Always polls at least once. Returns last rc.
int poll(std::chrono::steady_clock::time_point deadline)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is a change to common Socket poll bundled along with every thing else. I can imagine its perfectly fine for Admin, but is it ok for everything else?

I mean was it that before this wakeup() would cause a poll to end, and now it doesn't and other users may depend on the original behaviour? Or am I just confused by the three different things called poll() and only Admin uses this variant?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This is the first and only use of the deadline-based poll() overload. The original poll() (called from this one) still behaves as normal. This overload was implemented but unused.

We can't blindly replace the regular one with this overload. Agreed.

Copy link
Copy Markdown
Contributor

@caolanm caolanm left a comment

Choose a reason for hiding this comment

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

Fine by me then, there is some conflicts in the meantime. Maybe we should rename one of the "poll" to be "pollUntilDeadline" or something like that

@github-project-automation github-project-automation Bot moved this from To Review to To Test in Collabora Online Apr 20, 2026
Ashod added 4 commits April 20, 2026 20:05
With a function-local static instance
there are all sorts of life-time management
issues. The explicit approach resolves them,
or at least gives us controls to resolve them.

Change-Id: I66c2ec276b1594f20ddb159d9e00bbbfdaae43d4
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
Change-Id: I438dd99ca189f8edcd19538414447b74ba5e8010
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
The admin needs to check the time for a
number of things to do/update, which are
not cheap. Since the Admin already knows
when the soonest it'll need to take action
next, there is no point in executing the
time checks on every poll when we know
the answer (it's not time until the
already calculated time).

Now we ask poll to only get back to
us when the pre-calculated deadline
has reached. So spurious wakes wouldn't
cost any extra cycles.

Change-Id: I78774d40c0cc962b08a7aaeef929945eb34a1b36
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
Change-Id: I8e12c43b6a648a6cbcaa9b0650272ca3727e9add
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
@Ashod Ashod force-pushed the private/ash/admin branch from efcfe6f to 2370ffc Compare April 21, 2026 00:30
@Ashod Ashod merged commit 55cb54a into main Apr 21, 2026
13 of 14 checks passed
@Ashod Ashod deleted the private/ash/admin branch April 21, 2026 03:22
@github-project-automation github-project-automation Bot moved this from To Test to Done in Collabora Online Apr 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants