日期范围
62
其它讨论数
其它分析 success作者:Hongling Zeng2026/04/21 15:071 封邮件

[PATCH RESEND v2] sched: adjust the layout of the cfs_bandwith structure to save memory

Hongling Zeng 提交的 v2 补丁基于 pahole 输出,重排 kernel/sched/sched.h 中 cfs_bandwidth 结构字段,将三个 u8 标志位前移到 lock 之后,消除 padding hole 中的 8 字节,把结构大小从 240 字节降到 232 字节。代价是 period_timer 跨 cacheline 0/1 边界,作者已论证其非热路径。v2 仅修正 commit message 措辞,代码层无改动,已获得 Ben Segall 的 Reviewed-by。

lore
其它分析 success作者:zenghongling2026/03/20 15:201 封邮件

[PATCH RESEND v2] sched: adjust the layout of the cfs_bandwith structure to save memory

这是一个纯结构性 layout 优化 patch:把 struct cfs_bandwidth 中三个 u8 状态位挪到 raw_spinlock_t lock 后面,利用自然对齐 hole 把结构体从 240 字节压到 232 字节。代价是 period_timer 现在跨 64 字节 cacheline 边界,但作者强调该路径本就不热。属于 kernel/sched/sched.h 的轻量 cleanup,无功能或并发语义变化。

lore
每页
上一页13 / 13下一页