论文标题

AnyCall:快速,灵活的系统通用聚合

AnyCall: Fast and Flexible System-Call Aggregation

论文作者

Gerhorst, Luis, Herzog, Benedict, Reif, Stefan, Schröder-Preikschat, Wolfgang, Hönig, Timo

论文摘要

操作系统依靠系统调用来允许将隔离过程与内核和其他流程进行控制。每个系统呼叫都包含从无私人用户模式到特权内核模式的处理器模式开关。尽管处理器模式开关是确保系统完整性的基本隔离机制,但它们在处理器状态的一部分无效时会引起直接和间接的性能成本。近年来,高性能网络和存储硬件使用户/内核过渡开销用于io繁重的应用程序。更糟糕的是,现代处理器的安全漏洞(例如,崩溃)促使内核缓解措施进一步增加了过渡开销。为了将系统调用来自用户/内核转换的调用,我们提出了AnyCall,它使用内核编译器在内核模式下执行安全检查的用户字节码。这允许仅使用单个用户/内核过渡,与错误检查和处理逻辑交织在一起。我们已经根据Linux内核的EBPF子系统实现了AnyCall。我们的评估表明,使用AnyCall使用AnyCall的速度最多可快55倍,并且即使仅由AnyCall运行的最小代码的最小部分也可以将实际应用程序加速24%。

Operating systems rely on system calls to allow the controlled communication of isolated processes with the kernel and other processes. Every system call includes a processor mode switch from the unprivileged user mode to the privileged kernel mode. Although processor mode switches are the essential isolation mechanism to guarantee the system's integrity, they induce direct and indirect performance costs as they invalidate parts of the processor state. In recent years, high-performance networks and storage hardware has made the user/kernel transition overhead the bottleneck for IO-heavy applications. To make matters worse, security vulnerabilities in modern processors (e.g., Meltdown) have prompted kernel mitigations that further increase the transition overhead. To decouple system calls from user/kernel transitions we propose AnyCall, which uses an in-kernel compiler to execute safety-checked user bytecode in kernel mode. This allows for very fast system calls interleaved with error checking and processing logic using only a single user/kernel transition. We have implemented AnyCall based on the Linux kernel's eBPF subsystem. Our evaluation demonstrates that system call bursts are up to 55 times faster using AnyCall and that real-world applications can be sped up by 24% even if only a minimal part of their code is run by AnyCall.

扫码加入交流群

加入微信交流群

微信交流群二维码

扫码加入学术交流群,获取更多资源