Methods for context switching within a disk controller
First Claim
1. A method of context switching within a disk controller, comprising:
- storing a first context in a first memory coupled to a first disk controller processor;
storing a second context in a second memory, the second memory configurable as both a random access memory and a first-in-first-out (FIFO) memory;
using the first disk controller processor, managing a first transfer operation related to the first context, wherein the first transfer operation transfers data from a disk drive to a communication link;
determining that the disk drive has fallen behind the communication links ability to receive data;
suspending the first transfer operation;
swapping the first context from the first memory with the second context stored in the second memory, wherein the first context is stored at an address location in the second memory identified by a write pointer, wherein the address identified by the write pointer is changed based at least in part on the size of the first context;
using the first disk controller processor, managing a second transfer operation corresponding to the second context;
restoring the first context to the first memory from the second memory after completing at least a portion of the second transfer operation;
completing the first transfer operation; and
transferring disk data between the second memory and a buffer memory in a first-in-first-out manner.
4 Assignments
0 Petitions
Accused Products
Abstract
The present invention is related to methods and systems for context switching within a disk controller, allowing controller processors to efficiently switch between multiple tasks. In a first mode, a first memory is used to temporarily store data being transferred between a disk storage device coupled to the disk controller and a bus coupled to the disk controller. The transfer is managed by a disk controller processor. A first context is stored in a second memory coupled to the disk controller processor. In a second mode, the first memory is used to store a second context for later use by the disk controller processor. At least a portion of the first context information stored in the second memory is swapped with at least a portion of the second context information stored in the first memory at least partly in response to a first event. The swapped portion is then swapped back to the second memory in response to a second event.
-
Citations
21 Claims
-
1. A method of context switching within a disk controller, comprising:
-
storing a first context in a first memory coupled to a first disk controller processor;
storing a second context in a second memory, the second memory configurable as both a random access memory and a first-in-first-out (FIFO) memory;
using the first disk controller processor, managing a first transfer operation related to the first context, wherein the first transfer operation transfers data from a disk drive to a communication link;
determining that the disk drive has fallen behind the communication links ability to receive data;
suspending the first transfer operation;
swapping the first context from the first memory with the second context stored in the second memory, wherein the first context is stored at an address location in the second memory identified by a write pointer, wherein the address identified by the write pointer is changed based at least in part on the size of the first context;
using the first disk controller processor, managing a second transfer operation corresponding to the second context;
restoring the first context to the first memory from the second memory after completing at least a portion of the second transfer operation;
completing the first transfer operation; and
transferring disk data between the second memory and a buffer memory in a first-in-first-out manner. - View Dependent Claims (2, 3, 4, 5, 6, 7)
-
-
8. A method of context switching within a disk controller, comprising;
-
storing a first context in a first memory coupled to a first disk controller processor;
storing a second context in a second memory, the second memory configurable as both a random access memory and a first-in-first-out (FIFO) memory;
using the first disk controller processor, managing a first transfer operation related to the first context, wherein the first transfer operation transfers data from a disk drive to a communication link;
determining that the disk drive has fallen behind the communication links ability to receive data;
suspending the first transfer operation;
swapping the first context from the first memory with the second context stored in the second memory, wherein the first context is stored at an address location in the second memory identified by a write pointer;
using the first disk controller processor, managing a second transfer operation corresponding to the second context;
restoring the first context to the first memory from the second memory after completing at least a portion of the second transfer operation;
completing the first transfer operation;
transferring disk data between the second memory and a buffer memory in a first-in-first-out manner; and
modifying a buffer transfer count when transferring data between the second memory and the buffer memory, wherein the buffer transfer count is related to amount of data transferred from the second memory to the buffer memory, while the buffer transfer count is unaltered when performing the context swap. - View Dependent Claims (9, 10, 11, 12, 13, 14)
-
-
15. A method of context switching within a disk controller, comprising:
-
storing a first context in a first memory coupled to a first disk controller processor;
storing a second context in a second memory, the second memory configurable as both a random access memory and a first-in-first-out (FIFO) memory;
using the first disk controller processor, managing a first transfer operation related to the first context, wherein the first transfer operation transfers data from a disk drive to a communication link;
determining that the disk drive has fallen behind the communication links ability to receive data;
suspending the first transfer operation;
swapping the first context from the first memory with the second context stored in the second memory, wherein the first context is stored at an address location in the second memory identified by a write pointer and modifying a FIFO usage count, the FIFO usage count related to the amount of the used locations in the second memory, when swapping the first context into the second memory, based at least in part on the size of the first context;
using the first disk controller processor, managing a second transfer operation corresponding to the second context;
restoring the first context to the first memory from the second memory after completing at least a portion of the second transfer operation;
completing the first transfer operation; and
transferring disk data between the second memory and a buffer memory in a first-in-first-out manner. - View Dependent Claims (16, 17, 18, 19, 20, 21)
-
Specification