news 2026/4/15 9:41:41

Slab allocator: sheaves and any-context allocations - 2

作者头像

张小明

前端开发工程师

1.2k 24
文章封面图
Slab allocator: sheaves and any-context allocations - 2

kmalloc() for any context
适用于任意上下文的 kmalloc()

Alexei Starovoitov then took over to run a joint session with the BPF track on work toward creating a version of kmalloc() (which is part of the slab allocator) that can be called from BPF programs in any context. Some BPF attachment points, including tracepoints, can be invoked from any context, even non-maskable interrupts (NMIs). The system's freedom to satisfy allocation requests can be highly constrained in those contexts, so care must be taken. The BPF subsystem has, for a few years, used a custom allocator to fill this need, but there is a desire to reduce the number of allocators (and object caches) in the kernel. See this article for an overview of his proposed solution.

随后,Alexei Starovoitov 接手主持了一场与 BPF 方向联合的会议,讨论创建一种可在任意上下文中从 BPF 程序调用的 kmalloc() 版本(kmalloc() 是 slab 分配器的一部分)。某些 BPF 挂载点(包括 tracepoints)可能在任何上下文中被调用,甚至是在不可屏蔽中断(NMI)中。在这些上下文里,系统满足内存分配请求的自由度受到极大限制,因此必须格外谨慎。BPF 子系统多年来一直使用一个自定义分配器来满足这一需求,但内核社区希望减少内核中分配器(以及对象缓存)的数量。关于他提出的解决方案概览,可参见相关文章。

Starovoitov began by thanking Babka for the 2024 LSFMM+BPF session on the slab allocator, without which he would not have had the courage to attempt this work. There are, he said, a lot of wrappers around the slab allocator in the kernel; there are different excuses for the existence of each. For BPF, the primary excuse was the need to be able to allocate in any context; performance is also important,

版权声明: 本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若内容造成侵权/违法违规/事实不符,请联系邮箱:809451989@qq.com进行投诉反馈,一经查实,立即删除!
网站建设 2026/4/1 8:23:04

智能科学与技术毕设新颖的项目选题建议

文章目录🚩 1 前言1.1 选题注意事项1.1.1 难度怎么把控?1.1.2 题目名称怎么取?1.2 选题推荐1.2.1 起因1.2.2 核心- 如何避坑(重中之重)1.2.3 怎么办呢?🚩2 选题概览🚩 3 项目概览题目1 : 大数据电商用户行为…

作者头像 李华
网站建设 2026/4/14 19:32:38

GameAISDK:让游戏AI开发从“技术难题“变成“创意催化剂“

还在为游戏AI开发的复杂性而头疼吗?🤔 传统的游戏AI开发往往需要投入大量时间在底层算法实现和调试上,而GameAISDK的出现彻底改变了这一局面。这款基于图像的游戏AI自动化框架,让开发者能够专注于游戏体验本身,而不是陷…

作者头像 李华
网站建设 2026/4/12 8:15:52

PbRL | 近两年论文阅读的不完全总结

🍵 PbRL] Deep reinforcement learning from human preferences (Christiano 2017)信息:PbRL 开山之作,NeurIPS 2017,提出了 PrefPPO。arxiv:https://arxiv.org/abs/1706.03741博客:PbRL | Christiano 2017…

作者头像 李华