Apparatus and method for ensuring forward progress in coherent I/O systems
First Claim
1. A computer system, comprising:
- a cache having a plurality of cache lines, each cache line associated with a snapshot state and a first requestor waiting for the cache line; and
a cache controller that obtains the cache line from a remote source, marks the cache line in the snapshot state when the cache line is snooped out of the cache after the first requestor requests the data and before the cache line is read by the first requestor, and allows only the first requester to read the cache line.
3 Assignments
0 Petitions
Accused Products
Abstract
A snapshot mechanism that includes an apparatus and method for tracking DMA read requests for cacheable data that can be altered before the data is returned to a requesting I/O device is herein disclosed. Attributes that uniquely identify the original I/O device and DMA read request are stored in a cache tag unit. A read lock is set when a request is made to obtain the requested data when it is not resident in a local cache. When the cache line containing the requested data is snooped out and the read lock is set, then the cache line is set in a snapshot state. The snapshot state assures that only the original I/O device receives the read data when it has been altered subsequent to the time the original DMA read request was made. Once the data is returned to the original I/O device, the cache line is invalidated in order to prevent another I/O device from reading the stale data. Prefetched data is marked as such and cannot be marked as snapshot data.
82 Citations
8 Claims
-
1. A computer system, comprising:
-
a cache having a plurality of cache lines, each cache line associated with a snapshot state and a first requestor waiting for the cache line; and
a cache controller that obtains the cache line from a remote source, marks the cache line in the snapshot state when the cache line is snooped out of the cache after the first requestor requests the data and before the cache line is read by the first requestor, and allows only the first requester to read the cache line. - View Dependent Claims (2, 3, 4)
wherein the cache controller invalidates the cache line after the first requestor reads the cache line. -
3. The apparatus of claim 1,
the cache line associated with a prefetch state; wherein the cache controller marks the cache line in the snapshot state when the cache line is not associated with a prefetch state.
-
4. The apparatus of claim 1,
the cache line associated with a read lock that is set once the first requestor requests the data; wherein the cache controller marks the cache line in the snapshot state when the read lock is set.
-
-
5. A method for operating a computer system, the method comprising the steps of:
-
providing a cache having a plurality of cache lines, each cache line associated with a snapshot state;
receiving a request from a first device for the cache line;
obtaining the cache line from a remote source;
marking the cache line in the snapshot state when another device claims ownership of the cache line; and
returning the cache line only to the first device. - View Dependent Claims (6, 7, 8)
invalidating the cache line.
-
-
7. The method of claim 5,
wherein the cache line is associated with a read lock; -
the obtaining step comprising the step of setting the read lock of the cache line; and
the marking step comprising the step of not marking the cache line in the snapshot state when the read lock for the cache line is not set.
-
-
8. The method of claim 5,
associating a prefetch state with the cache line; - and
the marking step comprising the step of not marking the cache line in the snapshot state when the cache line is associated with a prefetch state.
- and
Specification