# US 2021/0334008 A1 · Apparatus and method for executing background operations using rotational position sorting

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

- Number: US 2021/0334008 A1
- Document ID: US20210334008A1
- Status: Published application
- Kind: A1
- Application number: 16/855,041
- Filed: 2020-04-22
- Published: 2021-10-28
- Earliest claimed: 2020-04-22
- Assignees: Seagate Technology LLC
- Applicants: Seagate Technology LLC
- Inventors: Abhay T. Kataria; LingZhi Yang; Jonathan H. Ormsby
- Web page: https://patentgrep.com/patent/US20210334008A1

## CPC

- G06F 3/0611: {in relation to response time}
- G06F 3/061: {Improving I/O performance}
- G06F 3/0653: {Monitoring storage devices or systems}
- G06F 3/0659: {Command handling arrangements, e.g. command buffers, queues, command scheduling}
- G06F 3/0676: {Magnetic disk device}
- G06N 3/0499: Feedforward networks
- G06N 3/08: Learning methods
- G06N 3/09: Supervised learning
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS

## Abstract

A background operation is internally triggered by firmware of a disk drive. During a training phase defined by a. first time period, access latency of host commands is monitored during rotational position sorting command selection. During a sorting phase after the training phase, a sorting threshold is defined based on the access latencies measured during the training phase. The background command is selected for execution in the sorting phase if the seek and rotational latency is less than the sorting threshold.

## Claims

### Claim 1

A method, comprising:
determining a background command to be performed on a disk drive, the background command internally triggered by firmware of the disk drive;
during a training phase defined by a first time period, determining a sorting threshold of the background command based on at least seek and rotational latencies of host commands during rotational position sorting command selection, the sorting threshold comprisin an allowable latency of the host commands, a value of the sorting threshold being selected to minimize an expected impact to execution of the host commands caused by inserting the background commands into a command queue that sorts both the background command and the host commands;
adding the background command to the command queue using the sorting threshold; and
in a sorting phase defined by a second time period, selecting the background command for execution by the disk drive if a current seek and rotational latency is less than the sorting threshold.

### Claim 2 (depends on 1)

The method of claim 1, wherein the training phase utilizes a neural network that takes the seek and rotational latencies of the host commands as inputs and determines the sorting threshold.

### Claim 3 (depends on 1)

The method of claim 1, wherein the sorting threshold is the maximum of:
a preliminary sorting threshold; and
a minimum value of the rotational latency measured in the training phase multiplied by a factor that is greater than one.

### Claim 4 (depends on 1)

The method of claim 1, wherein if the background command is not selected during the second time period, the background command is selected for execution as soon as possible.

### Claim 5 (depends on 1)

The method of claim 1, wherein the command queue is a disk queue, wherein host commands targeting disk operations are also placed in the disk queue with the background command, the host commands also being selected via the rotational position sorting command selection.

### Claim 6 (depends on 1)

The method of claim 1, wherein the first e period is between 0.5 seconds and 2.0 seconds.

### Claim 7 (depends on 1)

The method of claim 1, wherein the background command is part of a background task performed over one or more full tracks of the disk drive and starts at an arbitrary sector of the one or more full tracks, wherein the background task is broken into a plurality of atomic operations that are spread evenly over time, the atomic operations including the background command.

### Claim 8

A method comprising:
determining a background command to be performed on a disk drive, the background command internally triggered by firmware of the disk drive;
during a training phase defined by a first time period, monitoring access latency of host commands during rotational position sorting command selection;
defining a sorting threshold based on the access latencies measured during the training phase, the sorting threshold comprising an allowable latency of the host commands, a value of the sorting threshold being selected to minimize an expected impact to execution of the host commands caused by inserting the background commands into a command queue that sorts both the background command and the host commands; and
during a sorting phase after the training phase selecting the background command for execution if the seek and rotational latency is less than the sorting threshold.

### Claim 9 (depends on 8)

The method of claim 8, wherein the training phase utilizes a neural network that takes the seek and rotational latencies of the host commands as inputs and minimizes a cost function, the minimized cost function providing the sorting threshold that minimizes expected impacts to the host commands during the training phase.

### Claim 10 (depends on 8)

The method of claim 8, wherein the sorting phase occurs over a sorting time period, and if the background command is not selected during the sorting time period, the background command is selected for execution as soon as possible.

### Claim 11 (depends on 8)

The method of claim 8, wherein the sorting threshold is the maximum of:
a preliminary sorting threshold; and
a minimum value of a rotational latency measured in the training phase multiplied by a factor that is greater than one.

### Claim 12 (depends on 8)

The method of claim 8, wherein if the background command is not selected during the sorting phase, the background command is selected for execution as soon as possible after the sorting phase.

### Claim 13 (depends on 8)

The method of claim 8, wherein host commands targeting disk operations are also placed in a disk queue with the background command, the host commands also being selected via the rotational position sorting command selection.

### Claim 14 (depends on 8)

The method of claim 8, wherein the training phase is between 0.5 seconds and 2.0 seconds.

### Claim 15 (depends on 8)

The method of claim 8, wherein the background command is part of a background task performed over one or more full tracks of the disk drive and starts at an arbitrary sector of the one or more full tracks, wherein the background task is broken into a plurality of atomic operations that are spread evenly over time, the atomic operations including the background command.

### Claim 16

A disk drive, comprising:
a host interface configured to receive host commands that are processed by a command queue of the disk drive;
a controller coupled to the host interface and configured to:
determine a background command to be performed on the disk drive, the background command internally triggered by firmware of the disk drive;
during a training phase defined by a first time period, determine a sorting threshold of the background command based on at least seek and rotational latencies of the host commands during command selection, the sorting threshold comprising an allowable latency of the host commands, a value of the sorting threshold being selected to minimize an expected impact to execution of the host commands caused by inserting the background commands into a command queue that sorts both the background command and the host commands;
adding the background command to the command queue using the sorting threshold; and
in a sorting phase defined by a second time period, selecting the background command for execution by the disk drive if a. current seek and rotational latency is less than the sorting threshold.

### Claim 17 (depends on 16)

The disk drive of claim 16, wherein the training phase utilizes a neural network that takes the seek and rotational latencies of the host commands as inputs and minimizes a cost function, the minimized cost function providing the sorting threshold that minimizes expected impacts to the host commands during the training phase.

### Claim 18 (depends on 16)

The disk drive of claim 16, wherein the sorting threshold is the maximum of:
a preliminary sorting threshold; and
a minimum value of the rotational latency measured in the training phase multiplied by a factor that is greater than one.

### Claim 19 (depends on 16)

The disk drive of claim 16, wherein if the background command is not selected during the second time period, the background is selected for execution as soon as possible.

### Claim 20 (depends on 16)

The disk drive of claim 16, wherein the background command is part of a background task performed over one or more full tracks of the disk drive and starts at an arbitrary sector of the one or more full tracks, wherein the background task is broken into a plurality of atomic operations that are spread evenly over time, the atomic operations including the background command.
