gpt4 book ai didi

linux - 如何在 block 设备驱动程序中禁用请求合并?

转载 作者:太空宇宙 更新时间:2023-11-04 09:01:57 25 4
gpt4 key购买 nike

如何在 block 设备驱动程序中禁用此功能?我的意思是:如以下文档中所述,我想将该“标志”的值设置为 2。我该在哪里做?最好在 block 设备驱动程序代码中。

What:       /sys/block/<disk>/queue/nomerges
Date: January 2010
Contact:
Description:
Standard I/O elevator operations include attempts to
merge contiguous I/Os. For known random I/O loads these
attempts will always fail and result in extra cycles
being spent in the kernel. This allows one to turn off
this behavior on one of two ways: When set to 1, complex
merge checks are disabled, but the simple one-shot merges
with the previous I/O request are enabled. When set to 2,
all merge tries are disabled. The default value is 0 -
which enables all types of merge tries.

最佳答案

首先检查nomerges值-

              cat /sys/block/sda/queue/nomerges

如果它还不是 2,那么做:

              echo 2 > /sys/block/sda/queue/nomerges

关于linux - 如何在 block 设备驱动程序中禁用请求合并?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19578377/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com