# US 2010/0169566 A1 · Dynamically switching command types to a mass storage drive

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2010/0169566 A1
- Document ID: US20100169566A1
- Status: Published application
- Kind: A1
- Application number: 12/590,192
- Filed: 2009-11-04
- Published: 2010-07-01
- Earliest claimed: 2008-12-30
- Assignees: Intel Corporation
- Inventors: Eng Hun Ooi
- Web page: https://patentgrep.com/patent/US20100169566A1

## CPC

- G06F 12/00: Accessing, addressing or allocating within memory systems or architectures (digital input from, or digital output to record carriers, e.g. to disk storage units, G06F3/06)
- G06F 3/061: {Improving I/O performance}
- G06F 3/0659: {Command handling arrangements, e.g. command buffers, queues, command scheduling}
- G06F 3/0676: {Magnetic disk device}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A method, device, and system are disclosed. In one embodiment method begins by receiving a first new mass storage disk access request. The method then determines the total number of access requests to the mass storage disk received in a window of time. If the total number of requests received over the period of time is greater than or equal to a request threshold number then a request frequency counter is decremented. Otherwise, the counter is incremented. The method continues by generating a legacy advanced technology attachment (ATA)-type command for the first new access request when the counter is greater than or equal to a counter threshold number. Otherwise, the method generates a native command queue (NCQ)-type command for the first new access request.

## Claims

### Claim 1

A method, comprising:
receiving a first new access request to a mass storage disk;
determining a total number of access requests to the mass storage disk received in a window of time, the window of time starting at a first point in time and ending at the time of the receipt of the first new access request;
decrementing a request frequency counter when the total number of access requests received over the period of time is greater than or equal to a request threshold number;
incrementing the request frequency counter when the total number of access requests received over the period of time is less than the request threshold number;
generating a legacy advanced technology attachment (ATA)-type command for the first new access request when the request frequency counter is greater than or equal to a request frequency counter threshold number; and
generating a native command queue (NCQ)-type command for the first new access request when the request frequency counter is less than the request frequency counter threshold number.

### Claim 2 (depends on 1)

The method of claim 1, further comprising:
determining if there is at least one pending access to the mass storage device that has not completed; and
when at least one pending request has not been completed, determining whether the at least one pending access is of a different type than the generated command, waiting for the current at least one pending request to be completed prior to sending the generated command to the mass storage disk.

### Claim 3 (depends on 2)

The method of claim 2, further comprising:
sending the generated command to the mass storage disk when the mass storage disk provides an indication that all of the at least one pending accesses have completed.

### Claim 4 (depends on 1)

The method of claim 1, further comprising:
receiving a second new access request to the mass storage disk;
resetting the request frequency counter when the second new access request is received at least predetermined lapsed time after the first new access request is received.

### Claim 5 (depends on 1)

The method of claim 1, further comprising:
restoring the request frequency counter to the request frequency counter threshold number when the request frequency counter is incremented past the request frequency counter threshold number.

### Claim 6 (depends on 1)

The method of claim 1, further comprising:
detecting whether the mass storage disk supports NCQ-type commands;
setting a driver of the mass storage drive to support dynamically changing the access request command type per request if the mass storage disk supports NCQ-type commands.

### Claim 7

A device, comprising:
storage driver logic to:
receive a first new access request to a mass storage disk;
determine a total number of access requests to the mass storage disk received in a window of time, the window of time starting at a first point in time and ending at the time of the receipt of the first new access request;
decrement a request frequency counter when the total number of access requests received over the period of time is greater than or equal to a request threshold number;
increment the request frequency counter when the total number of access requests received over the period of time is less than the request threshold number;
generate a legacy advanced technology attachment (ATA)-type command for the first new access request when the request frequency counter is greater than or equal to a request frequency counter threshold number; and
generate a native command queue (NCQ)-type command for the first new access request when the request frequency counter is less than the request frequency counter threshold number.

### Claim 8 (depends on 7)

The device of claim 7, wherein the storage driver logic is further operable to:
determine if there is at least one pending access to the mass storage device that has not completed; and
when at least one pending request has not been completed, determining whether the at least one pending access is of a different type than the generated command, wait for the current at least one pending request to be completed prior to sending the generated command to the mass storage disk.

### Claim 9 (depends on 8)

The device of claim 8, wherein the storage driver logic is further operable to:
send the generated command to the mass storage disk when the mass storage disk provides an indication that all of the at least one pending accesses have completed.

### Claim 10 (depends on 7)

The device of claim 7, wherein the storage driver logic is further operable to:
receive a second new access request to the mass storage disk;
reset the request frequency counter when the second new access request is received at least predetermined lapsed time after the first new access request is received.

### Claim 11 (depends on 7)

The device of claim 7, wherein the storage driver logic is further operable to:
restore the request frequency counter to the request frequency counter threshold number when the request frequency counter is incremented past the request frequency counter threshold number.

### Claim 12 (depends on 7)

The device of claim 7, wherein the storage driver logic is further operable to:
detect whether the mass storage disk supports NCQ-type commands;
set a driver of the mass storage drive to support dynamically changing the access request command type per request if the mass storage disk supports NCQ-type commands.

### Claim 13

A system, comprising:
a memory to store an operating system;
a mass storage disk;
and storage driver logic to:
receive a first new access request to the mass storage disk from the operating system;
determine a total number of access requests to the mass storage disk received in a window of time, the window of time starting at a first point in time and ending at the time of the receipt of the first new access request;
decrement a request frequency counter when the total number of access requests received over the period of time is greater than or equal to a request threshold number;
increment the request frequency counter when the total number of access requests received over the period of time is less than the request threshold number;
generate a legacy advanced technology attachment (ATA)-type command for the first new access request when the request frequency counter is greater than or equal to a request frequency counter threshold number; and
generate a native command queue (NCQ)-type command for the first new access request when the request frequency counter is less than the request frequency counter threshold number.

### Claim 14 (depends on 13)

The system of claim 13, wherein the storage driver logic is further operable to:
determine if there is at least one pending access to the mass storage device that has not completed; and
when at least one pending request has not been completed, determining whether the at least one pending access is of a different type than the generated command, wait for the current at least one pending request to be completed prior to sending the generated command to the mass storage disk.

### Claim 15 (depends on 14)

The system of claim 14, wherein the storage driver logic is further operable to:
send the generated command to the mass storage disk when the mass storage disk provides an indication that all of the at least one pending accesses have completed.

### Claim 16 (depends on 13)

The system of claim 13, wherein the storage driver logic is further operable to:
receive a second new access request to the mass storage disk;
reset the request frequency counter when the second new access request is received at least predetermined lapsed time after the first new access request is received.

### Claim 17 (depends on 13)

The system of claim 13, wherein the storage driver logic is further operable to:
restore the request frequency counter to the request frequency counter threshold number when the request frequency counter is incremented past the request frequency counter threshold number.

### Claim 18 (depends on 13)

The system of claim 13, wherein the storage driver logic is further operable to:
detect whether the mass storage disk supports NCQ-type commands;
set a driver of the mass storage drive to support dynamically changing the access request command type per request if the mass storage disk supports NCQ-type commands.

### Claim 19

A method, comprising:
receiving a new access request to a mass storage disk;
determining a total number of access requests to the mass storage disk received in a window of time, the window of time starting at a first point in time and ending at the time of the receipt of the new access request;
generating a native command queue (NCQ)-type command for the new access request when the total number of access requests received over the period of time is greater than or equal to a request threshold number; and
generating a legacy advanced technology attachment (ATA)-type command for the new access request when the total number of access requests received over the period of time is less than the request threshold number.

### Claim 20 (depends on 1)

The method of claim 1, further comprising:
waiting for the current pending requests to be completed prior to sending the generated command to the mass storage disk when the current pending requests are of a different type than the generated command.

### Claim 21 (depends on 1)

The method of claim 1, further comprising:
detecting whether the mass storage disk supports NCQ-type commands;
setting a driver to support dynamically changing the access request command type per request if the mass storage disk supports NCQ-type commands.
