news 2026/5/11 23:29:03

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/5/10 13:37:13

BasePopup:Android弹窗开发的终极解决方案

BasePopup:Android弹窗开发的终极解决方案 【免费下载链接】BasePopup Android下打造通用便捷的PopupWindow弹窗库 项目地址: https://gitcode.com/gh_mirrors/ba/BasePopup 在Android应用开发中,弹窗功能是不可或缺的重要组成部分。无论是简单的…

作者头像 李华
网站建设 2026/5/11 6:16:29

Kafka入门:从初识到Spring Boot实战

回顾完RabbitMQ,再跟我一起回顾下Kafka ~一、Kafka介绍1. 什么是Kafka?Kafka是由Apache软件基金会开发的分布式流处理平台,最初由LinkedIn公司设计,现已成为大数据领域核心的消息中间件。它能处理实时数据流,支持高吞吐…

作者头像 李华
网站建设 2026/5/11 6:16:33

VMD-Python:在Python环境中轻松驾驭分子模拟的强大工具

VMD-Python:在Python环境中轻松驾驭分子模拟的强大工具 【免费下载链接】vmd-python Installable VMD as a python module 项目地址: https://gitcode.com/gh_mirrors/vm/vmd-python VMD-Python项目将著名的Visual Molecular Dynamics(VMD&#x…

作者头像 李华
网站建设 2026/5/10 18:05:29

思源宋体WOFF2压缩优化实战:从25MB到8MB的极致瘦身指南

思源宋体WOFF2压缩优化实战:从25MB到8MB的极致瘦身指南 【免费下载链接】source-han-serif Source Han Serif | 思源宋体 | 思源宋體 | 思源宋體 香港 | 源ノ明朝 | 본명조 项目地址: https://gitcode.com/gh_mirrors/sou/source-han-serif 你是否曾经因为思…

作者头像 李华
网站建设 2026/5/11 7:36:45

OpenUSD场景格式优化终极指南:USDZ与glTF深度解析

OpenUSD场景格式优化终极指南:USDZ与glTF深度解析 【免费下载链接】OpenUSD Universal Scene Description 项目地址: https://gitcode.com/GitHub_Trending/ope/OpenUSD 在3D内容创作与分发领域,OpenUSD作为通用场景描述框架,其场景格…

作者头像 李华