AnyCall:快速灵活的系统调用聚合
AnyCall: Fast and Flexible System-Call Aggregation
摘要:
操作系统依赖于系统调用来允许独立进程与内核和其他进程的受控通信。每个系统调用都包括从非特权用户模式到特权内核模式的处理器模式切换。虽然处理器模式切换是保证系统完整性的基本隔离机制,但它们会导致直接和间接的性能成本,因为它们会使部分处理器状态无效。近年来,高性能网络和存储硬件使得用户/内核转换开销成为IO繁重应用程序的瓶颈。更糟糕的是,现代处理器中的安全漏洞(例如,Meltdown)促使内核采取缓解措施,这进一步增加了转换开销。为了将系统调用与用户/内核转换解耦,我们提出了AnyCall,它使用内核编译器在内核模式下执行安全检查的用户字节码。这允许非常快速的系统调用与错误检查和处理逻辑交错,仅使用单个用户/内核转换。我们基于Linux内核的eBPF子系统实现了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.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。