Merging copy offload

Kernel support for copy offload is a feature that has been floating around in limbo for a decade or more at this point; it has been implemented along the way, but never merged. The idea is that the host system can simply ask a block storage device to copy some data within the device and it will do so without further involving the host; instead of reading data into the host so that it can be written back out again, the device circumvents that process. At the 2023 Linux Storage, Filesystem, Memory-Management and BPF Summit, Nitesh Shetty led a storage and filesystem session to discuss the current status of a patch set that he and others have been working on, with an eye toward getting something merged fairly soon.

内核对“拷贝卸载(copy offload)”功能的支持已经悬而未决十多年了;这项功能曾经有过一些实现,但始终没有被合并。它的核心思想是由主机系统向块存储设备发送一个命令,要求设备在自身内部执行数据拷贝,而无需主机参与;也就是说,不再需要将数据读入主机再写出,而是由设备自身绕过这个过程直接完成拷贝。在 2023 年的 Linux 存储、文件系统、内存管理和 BPF 峰会上,Nitesh Shetty 主持了一场关于存储和文件系统的讨论,探讨了他和其他人正在推进的一个补丁集的当前状态,并希望它能在不久的将来被合并。

The overall concept of copy offload is that you issue a command to a device and it copies the data from one place on the device to another, though the copy can also be between NVMe namespaces on a device. The advantages are in saving CPU resources, PCI bandwidth, and, on fabrics, network bandwidth, because the copy stays local to the device. The first approach was from Martin Petersen in 2014, which was ioctl()-based; another, which was based on using two BIOs, was developed by Mikulas Patocka in 2015. The ioctl() approach had problems with scalability, Shetty said. Petocka's approach was compatible with the device mapper, but neither of the two patch sets gained any traction in the community.

“拷贝卸载”的总体概念是向设备发出一个命令,让它把数据从设备上的某个位置拷贝到另一个位置(也可以是在 NVMe 设备的两个命名空间之间进行拷贝)。其优势在于节省 CPU 资源、PCI 带宽,以及在使用网络结构时节省网络带宽,因为数据拷贝过程完全在设备内部进行。Martin Petersen 在 2014 年提出了第一个实现方案,基于 ioctl();另一种方法则是在 2015 年由 Mikulas Patocka 开发,采用两个 BIO 的方式。Shetty 表示,ioctl() 的方式存在可扩展性问题;Patocka 的方法可以与 device mapper 兼容,但这两个补丁集都未能在社区中获得实际进展。

In 2021

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

mounter625

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值