arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 1304.0012cs.DC
收藏

利用内存保护防止零拷贝操作

Using Memory-Protection to Simplify Zero-copy Operations

Russell Power

摘要:

高性能网络(例如Infiniband)依赖于零拷贝操作来提高性能。零复制操作,顾名思义,避免了为发送和接收数据而复制缓冲区。相反,硬件设备直接读取和写入应用程序指定的存储器区域。由于这些网络的发送和接收速度几乎与机器内部的内存总线相同,因此零拷贝操作对于许多应用程序来说都是实现峰值性能所必需的。不幸的是,使用零拷贝API编程是一个巨大的痛苦。用户必须小心避免使用可能被设备访问的缓冲区。通常,这会导致意大利面条代码(在使用之前检查对缓冲区的每次访问),或者阻塞操作(这几乎破坏了零复制的全部意义)。我们表明,通过滥用内存保护硬件,我们可以提供两全其美:一个简单的零拷贝机制,允许非阻塞发送和接收,同时防止不正确的访问。

英文摘要:

High performance networks (e.g. Infiniband) rely on zero-copy operations for performance. Zero-copy operations, as the name implies, avoid copying buffers for sending and receiving data. Instead, hardware devices directly read and write to application specified areas of memory. Since these networks can send and receive at nearly the same speed as the memory bus inside machines, zero-copy operations are necessary to achieve peak performance for many applications. Unfortunately, programming with zero-copy APIs is a *giant pain*. Users must carefully avoid using buffers that may be accessed by a device. Typically this either results in spaghetti code (where every access to a buffer is checked before usage), or blocking operations (which pretty much defeat the whole point of zero-copy). We show that by abusing memory protection hardware, we can offer the best of both worlds: a simple zero-copy mechanism which allows for non-blocking send and receives while protecting against incorrect accesses.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑