如何在塊設備驅動程序中禁用此功能? 我的意思是:正如在下面的文檔中提到的,我想將該「標誌」的值設置爲2.我該怎麼做?最好在塊設備驅動程序代碼中。如何禁用塊設備驅動程序中的請求合併?
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.
搜索內核樹QUEUE_FLAG_NOMERGES。當它設置爲2時,sysfs將在請求隊列中設置此標誌。 –
爲什麼要禁用它?如果您的驅動程序在合併的請求中無法正常工作,則它已損壞。 –
是的,我知道它已經壞了。我正在修復它。這就是爲什麼我想禁用請求合併。我懷疑網絡延遲與它有關。 – hebbo