news 2026/6/19 10:07:12

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/6/17 18:20:11

智能体:未来社会的核心竞争力

引言:为何必须学习智能体?在2025年的今天,人工智能已从概念走向现实,而智能体(Agent) 作为能够自主感知环境、决策并执行任务的AI系统,正成为驱动社会变革的核心力量。学习智能体,已…

作者头像 李华
网站建设 2026/6/17 1:06:45

这个CNN-LSTM融合模型真是我最近调试得最顺手的分类工具了。咱们直接上代码,先从数据预处理开始看

CNN-LSTM 分类,基于卷积神经网络(CNN)-长短期记忆神经网络(LSTM)数据分类预测 MATLAB(2020及以上版本以上)语言 中文注释清楚 非常适合科研小白,程序已经调试好,替换数据就可以直接使用 多特征输入单输出的二分类及多分类模型。 预测结果图…

作者头像 李华
网站建设 2026/6/17 4:25:41

开源社区治理终极指南:构建高效协作的完整方案

在当今开源生态中,Champ项目通过其3D参数化人体动画技术展示了技术创新与社区治理的完美结合。开源社区治理不仅是代码协作的框架,更是项目可持续发展的核心引擎。本文将为新手开发者和项目维护者提供一套完整的社区治理构建方案,帮助您从零开…

作者头像 李华
网站建设 2026/6/18 16:13:23

MakeMeAHanzi完整指南:免费获取9000+汉字笔画数据

MakeMeAHanzi完整指南:免费获取9000汉字笔画数据 【免费下载链接】makemeahanzi Free, open-source Chinese character data 项目地址: https://gitcode.com/gh_mirrors/ma/makemeahanzi 想要学习汉字书写却苦于没有标准笔画顺序参考?MakeMeAHanz…

作者头像 李华
网站建设 2026/6/14 3:05:55

狂飙突进的新能源车,需要一场人车信任的重建

真理总是越辩越明。作者 I 王彬封面 I F1:狂飙飞车当前的新能源车市场似乎陷入了一个怪圈。一方面,技术迭代持续提速,智能化成为今年车市主流,年初比亚迪就喊出了“智驾平权”的口号,年底高阶智能辅助驾驶已经杀入 15 …

作者头像 李华
网站建设 2026/6/15 19:15:03

Edge-TTS终极指南:免费文本转语音的完美解决方案

Edge-TTS终极指南:免费文本转语音的完美解决方案 【免费下载链接】edge-tts Use Microsoft Edges online text-to-speech service from Python WITHOUT needing Microsoft Edge or Windows or an API key 项目地址: https://gitcode.com/GitHub_Trending/ed/edge-…

作者头像 李华