Linux:禁用NVMe设备的中断合并

我正在testing启用了中断合并的NVMe设备,并将其禁用。

NVMe协议定义了可以传递给设备的中断合并参数,而在免费的BSD中,nvme模块具有这些参数来configuration:

dev.nvme.0.int_coal_time (R/W) Interrupt coalescing timer period in microseconds. Set to 0 to disable. dev.nvme.0.int_coal_threshold (R/W) Interrupt coalescing threshold in number of command comple- tions. Set to 0 to disable. 

linux下,我似乎无法看到以太网适配器之外的任何中断合并(中断调节),所以我想知道是否我完全看错了地方。

看看Linux内核源代码,没有提到这一点。

但是你可以用nvme-cli工具来读写它:

 > nvme get-feature /dev/nvme0n1 -f 8 get-feature:0x8 (Interrupt Coalescing), Current value:00000000 

并设置它:

 > nvme set-feature /dev/nvme0n1 -f 8 -v 100 set-feature:08 (Interrupt Coalescing), value:0x000064 

查看NVMe规范,find需要填写的实际位,因为这些是原始值,这里没有什么真正的设置。