]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
common/admin_socket: use POSIX timer for delayed signal delivery 68816/head
authorKefu Chai <k.chai@proxmox.com>
Fri, 8 May 2026 08:20:34 +0000 (16:20 +0800)
committerKefu Chai <k.chai@proxmox.com>
Fri, 8 May 2026 11:31:52 +0000 (19:31 +0800)
commitd97b7ccf77ee6f6e88ac78a3a9673ed46e711cf1
tree0d4c84ab70220b60df46e4691ca6f9a7b77f8608
parent5eb650394b1a692e75370dfa6d2f9776a9823d82
common/admin_socket: use POSIX timer for delayed signal delivery

AdminSocketRaise.AsyncReschedule was flaking on arm64:

  [ RUN      ] AdminSocketRaise.AsyncReschedule
  /ceph/src/test/admin_socket.cc:497: Failure
  Expected equality of these values:
    0
    sig2.count.load()
      Which is: 1
  [  FAILED  ] AdminSocketRaise.AsyncReschedule (1045 ms)

The old approach forked a child that polled the clock and called
kill() at the deadline.  The problem is: the deadline was computed
before fork(), so any fork latency ate directly into the timing
budget.  On a busy arm64 host that 50 ms margin just wasn't enough.

The fix is to let the kernel own the timer via timer_create(). No
child process, no polling, no fork overhead, and SIGCONT still works.

Signed-off-by: Kefu Chai <k.chai@proxmox.com>
src/common/admin_socket.cc