1*4882a593Smuzhiyun=============== 2*4882a593Smuzhiyundm-queue-length 3*4882a593Smuzhiyun=============== 4*4882a593Smuzhiyun 5*4882a593Smuzhiyundm-queue-length is a path selector module for device-mapper targets, 6*4882a593Smuzhiyunwhich selects a path with the least number of in-flight I/Os. 7*4882a593SmuzhiyunThe path selector name is 'queue-length'. 8*4882a593Smuzhiyun 9*4882a593SmuzhiyunTable parameters for each path: [<repeat_count>] 10*4882a593Smuzhiyun 11*4882a593Smuzhiyun:: 12*4882a593Smuzhiyun 13*4882a593Smuzhiyun <repeat_count>: The number of I/Os to dispatch using the selected 14*4882a593Smuzhiyun path before switching to the next path. 15*4882a593Smuzhiyun If not given, internal default is used. To check 16*4882a593Smuzhiyun the default value, see the activated table. 17*4882a593Smuzhiyun 18*4882a593SmuzhiyunStatus for each path: <status> <fail-count> <in-flight> 19*4882a593Smuzhiyun 20*4882a593Smuzhiyun:: 21*4882a593Smuzhiyun 22*4882a593Smuzhiyun <status>: 'A' if the path is active, 'F' if the path is failed. 23*4882a593Smuzhiyun <fail-count>: The number of path failures. 24*4882a593Smuzhiyun <in-flight>: The number of in-flight I/Os on the path. 25*4882a593Smuzhiyun 26*4882a593Smuzhiyun 27*4882a593SmuzhiyunAlgorithm 28*4882a593Smuzhiyun========= 29*4882a593Smuzhiyun 30*4882a593Smuzhiyundm-queue-length increments/decrements 'in-flight' when an I/O is 31*4882a593Smuzhiyundispatched/completed respectively. 32*4882a593Smuzhiyundm-queue-length selects a path with the minimum 'in-flight'. 33*4882a593Smuzhiyun 34*4882a593Smuzhiyun 35*4882a593SmuzhiyunExamples 36*4882a593Smuzhiyun======== 37*4882a593SmuzhiyunIn case that 2 paths (sda and sdb) are used with repeat_count == 128. 38*4882a593Smuzhiyun 39*4882a593Smuzhiyun:: 40*4882a593Smuzhiyun 41*4882a593Smuzhiyun # echo "0 10 multipath 0 0 1 1 queue-length 0 2 1 8:0 128 8:16 128" \ 42*4882a593Smuzhiyun dmsetup create test 43*4882a593Smuzhiyun # 44*4882a593Smuzhiyun # dmsetup table 45*4882a593Smuzhiyun test: 0 10 multipath 0 0 1 1 queue-length 0 2 1 8:0 128 8:16 128 46*4882a593Smuzhiyun # 47*4882a593Smuzhiyun # dmsetup status 48*4882a593Smuzhiyun test: 0 10 multipath 2 0 0 0 1 1 E 0 2 1 8:0 A 0 0 8:16 A 0 0 49