news 2026/4/18 2:22:09

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/17 1:14:35

电脑卡顿救星!永久免费,系统优化 清理垃圾 修复痕迹

给大家安利一款 Windows 系统性能分析优化神器 ——Advanced System Care! 软件下载地址 最绝的是它的过期时间标着 “从不”,相当于无限制永久免费使用,不用费心续费、不用鸡活 性价比直接拉满~宝子们!这款Advanced …

作者头像 李华
网站建设 2026/4/16 20:21:01

HTML转Figma完整教程:从网页到设计稿的终极解决方案

HTML转Figma工具是一款革命性的设计辅助软件,能够将任意网页的HTML结构自动转换为可编辑的Figma设计文件。这款由Builder.io团队开发的神器彻底改变了传统设计流程,让设计师不再需要手动重绘网页元素,大大提升了工作效率。无论你是设计新手还…

作者头像 李华
网站建设 2026/4/15 0:30:02

Maxar Open Data:5分钟掌握全球卫星影像数据分析

Maxar Open Data项目是一个开源的高分辨率卫星影像数据集,为研究人员、开发者和应急响应团队提供宝贵的数据资源。通过STAC(Spatial Temporal Asset Catalog)目录格式,该项目让全球自然现象监测变得简单易行。 【免费下载链接】ma…

作者头像 李华
网站建设 2026/4/11 7:47:41

来自一个CSDN萌新的感叹!!!

来自一个CSDN萌新的感叹!!!我只是一个CSDN的萌新!!!感觉CSDN是一个能让我进步的网站!!!感谢最近大家对我的支持!!!!

作者头像 李华
网站建设 2026/4/16 14:41:39

为什么你的VSCode远程调试总卡顿?,背后隐藏的6大元凶曝光

第一章:为什么你的VSCode远程调试总卡顿?在使用 VSCode 进行远程开发时,许多开发者都遇到过调试过程卡顿、响应延迟的问题。这不仅影响开发效率,还可能导致断点失效或变量无法正确加载。问题的根源往往不在于 VSCode 本身&#xf…

作者头像 李华