Skip to content

refactor(signal-util,time-util): trivial cleanups for signal table and usleep_safe#68

Open
deepin-ci-robot wants to merge 1 commit into
deepin-community:masterfrom
deepin-ci-robot:backport/fix-signal-util-align-table
Open

refactor(signal-util,time-util): trivial cleanups for signal table and usleep_safe#68
deepin-ci-robot wants to merge 1 commit into
deepin-community:masterfrom
deepin-ci-robot:backport/fix-signal-util-align-table

Conversation

@deepin-ci-robot

@deepin-ci-robot deepin-ci-robot commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Summary

Trivial cleanups from upstream: align signal table formatting and optimize usleep_safe() to return immediately for zero delay.

  • Align the static_signal_table[] array elements by adding whitespace to make the assignment operators line up vertically.
  • Make usleep_safe() return immediately if the requested delay is zero, avoiding an unnecessary clock_nanosleep() syscall.

Changes

  • Add debian/patches/refactor-signal-time-util-trivial-cleanups.patch
  • Remove debian/patches/fix-signal-util-align-table.patch
  • Modify debian/patches/series
  • Modify debian/changelog

Upstream

Generated-By: glm-5-turbo
Co-Authored-By: deepin-ci-robot packages@deepin.org

@deepin-ci-robot

Copy link
Copy Markdown
Contributor Author

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign liujianqiang-niu for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@github-actions

Copy link
Copy Markdown

TAG Bot

TAG: 255.2-4deepin37
EXISTED: no
DISTRIBUTION: unstable

@lionheartyu

Copy link
Copy Markdown
Contributor

这个PR有两个commit 你只拉取了一个

@st0nie

st0nie commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

上游PR是systemd/systemd#30531
你参考这个弄

@lionheartyu

Copy link
Copy Markdown
Contributor

你的changelog的时间错了 改个正确的时间。

…d usleep_safe

Align the static_signal_table[] array elements by adding whitespace
to make the assignment operators line up vertically.

Make usleep_safe() return immediately if the requested delay is zero,
avoiding an unnecessary clock_nanosleep() syscall.

Changes:
  - Add debian/patches/refactor-signal-time-util-trivial-cleanups.patch
  - Remove debian/patches/fix-signal-util-align-table.patch
  - Modify debian/patches/series
  - Modify debian/changelog

Upstream: systemd/systemd#30531

Generated-By: glm-5-turbo
Co-Authored-By: deepin-ci-robot <packages@deepin.org>
@deepin-ci-robot deepin-ci-robot changed the title fix(signal-util): align signal table formatting refactor(signal-util,time-util): trivial cleanups for signal table and usleep_safe Jun 16, 2026
@deepin-ci-robot deepin-ci-robot force-pushed the backport/fix-signal-util-align-table branch from 70e7564 to efc2eee Compare June 16, 2026 05:47
@lionheartyu

lionheartyu commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

对系统的实际提升:

1:(usleep_safe 提前返回)

减少一次 clock_nanosleep() 系统调用(用户态→内核态切换约需数百纳秒)
systemd 作为 PID 1,生命周期贯穿整个系统运行期,高频路径上的微小优化有累积效果
对依赖精确定时的子系统(如 timer unit、watchdog)更友好,不会引入不必要的调度延迟
2:(信号表对齐)

对运行时无任何提升,编译后产物完全相同。

总体来说,这修改属于低风险、小收益的改进—— 有实际(但微小)的性能意义, 纯粹是维护性改善。真正的系统级提升来自在极端情况下(大量定时器触发、批量进程管理)减少的无效系统调用积累。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants