US 12,135,661 B2
Processing I/O commands using block size aware polling
Ran Peng, Beijing (CN); Yang Bai, Beijing (CN); Wenchao Cui, Beijing (CN); Yu Zhao, Beijing (CN); and Zhihao Yao, Beijing (CN)
Assigned to VMware LLC, Palo Alto, CA (US)
Filed by Vmware, Inc., Palo Alto, CA (US)
Filed on Jun. 28, 2022, as Appl. No. 17/851,357.
Prior Publication US 2023/0367726 A1, Nov. 16, 2023
Int. Cl. G06F 13/20 (2006.01); G06F 13/24 (2006.01)
CPC G06F 13/20 (2013.01) [G06F 13/24 (2013.01); G06F 2213/24 (2013.01); G06F 2213/40 (2013.01)] 20 Claims
OG exemplary drawing
 
1. A computer-implemented method, comprising:
creating, in a transport driver layer of a storage stack, a plurality of polling queues that process cached input/output (I/O) commands using a polling mode and a plurality of interrupt queues that process cached I/O commands in an interrupt mode;
receiving, from a core layer of the storage stack and by the transport driver layer, a plurality of I/O commands, the plurality of I/O commands comprising a first I/O command;
identifying a first value representing a total amount of unprocessed I/O commands in the transport driver layer;
identifying a second value representing an amount of unprocessed I/O commands in the transport driver layer with block sizes below a first threshold size;
calculating a ratio of the second value to the first value; and
if the ratio is larger than a threshold ratio, submitting the first I/O command to one of the plurality of polling queues; and
if the ratio is not larger than the threshold ratio:
determining a block size of the first I/O command;
if the block size of the first I/O command is not larger than a second threshold size, submitting the first I/O command to one of the plurality of polling queues; and
if the block size of the first I/O command is larger than the second threshold size, submitting the first I/O command to one of the interrupt queues.