news 2026/8/20 22:09:28

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/8/21 8:47:33

12月应季食谱

🥣南瓜豆腐西红柿蔬菜汤-晚餐🥬食材: 🎃贝贝南瓜🧈嫩豆腐🍅西红柿🍄木耳🥬青菜🧂盐🌶️白胡椒粉🍲营养:🥕南瓜富含β-胡萝…

作者头像 李华
网站建设 2026/8/21 6:33:09

Windows安装Maven

一、什么是 MavenMaven是一个基于POM模型的项目管理和构建自动化工具,其核心是通过一份配置文件,实现依赖管理和标准化的构建流程。对于Java开发者而言,Maven不是一个可选项,而是一个基础设施。它极大地降低了项目管理的复杂度&am…

作者头像 李华
网站建设 2026/8/21 9:33:19

Blender重网格革命:QRemeshify打造完美四边形拓扑的实战指南

Blender重网格革命:QRemeshify打造完美四边形拓扑的实战指南 【免费下载链接】QRemeshify A Blender extension for an easy-to-use remesher that outputs good-quality quad topology 项目地址: https://gitcode.com/gh_mirrors/qr/QRemeshify 在3D建模领域…

作者头像 李华
网站建设 2026/8/21 20:19:02

Ls-dyna聚能爆破研究:聚能射流击穿钢板的二维模型及破坏形式分析

Ls-dyna 聚能爆破.研究聚能射流击穿钢板,本模型为二维模型,研究聚能射流对钢板的破坏形式.可查看聚能射流的应力变化情况聚能射流击穿钢板这玩意儿在军工和采矿领域可是硬核技术。今天咱们用LS-DYNA整点干货,手把手教你怎么用二维模型观察射…

作者头像 李华
网站建设 2026/8/21 2:45:22

传感器学习(day12):宝马夜视系统揭秘:MEMS传感器技术解析

每日更新教程,评论区答疑解惑,小白也能变大神!" 目录 第一部分:宝马夜视系统的技术解析与应用实践 1.1 发展历程与战略布局 1.2 核心技术原理:远红外线(FIR)的选择 1.3 系统功能与性能…

作者头像 李华
网站建设 2026/8/20 16:57:26

3步搞定Inno Setup中文界面:让安装程序说中文的终极指南

3步搞定Inno Setup中文界面:让安装程序说中文的终极指南 【免费下载链接】Inno-Setup-Chinese-Simplified-Translation :earth_asia: Inno Setup Chinese Simplified Translation 项目地址: https://gitcode.com/gh_mirrors/in/Inno-Setup-Chinese-Simplified-Tra…

作者头像 李华