docs: Enhance README files with examples of GPU scheduling and memory offloading using BPF struct_ops

This commit is contained in:
Littlefisher
2026-01-11 02:41:29 -08:00
parent c1d56c531f
commit 48afb3265d
4 changed files with 4 additions and 4 deletions

View File

@@ -26,7 +26,7 @@ Enter **kfuncs (BPF Kernel Functions)**. By defining your own kfuncs within kern
Best of all, you achieve this without modifying the core kernel, keeping your system stable and your code safe.
In this tutorial, we'll show you how to define custom kfuncs to fill any gaps in eBPF's capabilities. We'll walk through creating a kernel module that introduces new kfuncs and demonstrate how to use them in your eBPF programs. Whether you're looking to overcome performance bottlenecks or need features the eBPF runtime doesn't offer, custom kfuncs can unlock new possibilities for your projects.
In this tutorial, we'll show you how to define custom kfuncs to fill any gaps in eBPF's capabilities. We'll walk through creating a kernel module that introduces new kfuncs and demonstrate how to use them in your eBPF programs. Whether you're looking to overcome performance bottlenecks or need features the eBPF runtime doesn't offer, custom kfuncs can unlock new possibilities for your projects. For instance, kfuncs are also used to implement GPU scheduling and memory offloading extensions with eBPF in GPU drivers (see [LPC 2024 talk](https://lpc.events/event/19/contributions/2168/) and the [gpu_ext project](https://github.com/eunomia-bpf/gpu_ext)).
## Understanding kfunc: Extending eBPF Beyond Helpers

View File

@@ -24,7 +24,7 @@
最棒的是,你可以在不修改核心内核的情况下实现这一目标,保持系统的稳定性和代码的安全性。
在本教程中,我们将展示如何定义自定义 kfunc 以填补 eBPF 功能的任何空白。我们将逐步讲解如何创建一个引入新 kfunc 的内核模块,并演示如何在 eBPF 程序中使用它们。无论你是希望克服性能瓶颈,还是需要 eBPF 运行时未提供的功能,自定义 kfunc 都能为你的项目解锁新的可能性。
在本教程中,我们将展示如何定义自定义 kfunc 以填补 eBPF 功能的任何空白。我们将逐步讲解如何创建一个引入新 kfunc 的内核模块,并演示如何在 eBPF 程序中使用它们。无论你是希望克服性能瓶颈,还是需要 eBPF 运行时未提供的功能,自定义 kfuncs 都能为你的项目解锁新的可能性。例如kfuncs 也被用于在 GPU 驱动中通过 eBPF 实现 GPU 调度和内存卸载扩展(请参阅 [LPC 2024 演讲](https://lpc.events/event/19/contributions/2168/) 和 [gpu_ext 项目](https://github.com/eunomia-bpf/gpu_ext))。
## 理解 kfunc扩展 eBPF 超越辅助函数