news 2026/6/10 3:06:54

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/6 9:57:24

基于灰色预测模型的预测算法研究:探讨不确定性与数学建模的交融

预测算法一:灰色预测模型灰色预测是对含有已知信息又含有不确定信息的系统进行预测,就是对一定范围内变化的、与时间有关的灰色过程进行预测; 注:1、提供灰色预测相关论文已经学习资料,提供数学建模指导 2、Matlab代码…

作者头像 李华
网站建设 2026/6/9 18:04:24

嵌入式存储革命:littlefs核心架构深度解析与实战应用

嵌入式存储革命:littlefs核心架构深度解析与实战应用 【免费下载链接】littlefs A little fail-safe filesystem designed for microcontrollers 项目地址: https://gitcode.com/GitHub_Trending/li/littlefs 在当今嵌入式系统蓬勃发展的时代,微控…

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

GLM-4.5-FP8大模型快速部署指南:从零到精通

GLM-4.5-FP8是智谱AI推出的3550亿参数混合专家大语言模型,采用创新的FP8精度格式,为开发者提供高效推理解决方案。本文面向技术新手和普通开发者,通过实操步骤和成本分析,帮助您快速掌握这一前沿AI技术。 【免费下载链接】GLM-4.5…

作者头像 李华
网站建设 2026/6/9 18:54:15

PiKVM OS自定义构建终极指南:打造你的专属远程管理平台

PiKVM OS自定义构建终极指南:打造你的专属远程管理平台 【免费下载链接】pikvm Open and inexpensive DIY IP-KVM based on Raspberry Pi 项目地址: https://gitcode.com/gh_mirrors/pi/pikvm 你是否曾经想过,能否拥有一个完全按照自己需求定制的…

作者头像 李华
网站建设 2026/6/10 12:28:11

直接扩频序列通信技术仿真与设计实验 实验设计m序列和gold序列在不同信道当中进行仿真

直接扩频序列通信技术仿真与设计实验 实验设计m序列和gold序列在不同信道当中进行仿真,最后得出关于信噪比和误码率的规律。 扩频序列实验、码序列、通信工程课程设计、matlab,附带报告一份。 深夜的实验室键盘声噼里啪啦响着,老张盯着屏幕里…

作者头像 李华