Memory coherence with early store completion
In an aspect, an apparatus comprises a writer agent, wherein the writer agent may obtain exclusive access to at least one coherence granule of shared memory with respect to one or more other agents. The writer agent may mark, at the writer agent, completion of a store of the at least one coherence granule prior to receipt of data for the at least one coherence granule from the shared memory. The writer agent may receive the data from the shared memory for the at least one coherence granule. The writer agent may store the data at a local cache of the writer agent. The writer agent may modify the data at the writer agent.
1 . A method executed by a writer agent to maintain memory coherence, comprising:
obtaining exclusive access to at least one coherence granule of shared memory with respect to one or more other agents;
marking, at the writer agent, completion of a store of the at least one coherence granule prior to receipt of data for the at least one coherence granule from the shared memory, wherein the marking causes snoop responses for the at least one coherence granule to be deferred until after data for the at least one coherence granule is received and modified at the writer agent;
receiving the data from the shared memory for the at least one coherence granule;
storing the data at a local cache of the writer agent; and
modifying the data at the writer agent.
2 . The method of claim 1 , further comprising:
preventing access to the at least one coherence granule at the writer agent by the one or more other agents at least until the data has been modified at the writer agent.
3 . The method of claim 1 , wherein:
the shared memory comprises
system memory,
cache memory of a common cache,
local cache memory of at least one agent of the one or more other agents, or
any combination thereof.
4 . The method of claim 1 , wherein:
the data received from the shared memory is obtained under control of a home agent.
5 . The method of claim 1 , wherein:
the at least one coherence granule has a size smaller than a single cache line.
6 . A method executed by a writer agent to maintain memory coherence, comprising:
requesting, from a home agent, exclusive access to at least one coherence granule of a shared memory, wherein the shared memory is configured for access to multiple agents;
receiving, from the home agent, an indication that the writer agent has exclusive access to the at least one coherence granule of the shared memory, wherein the indicating causes snoop responses for the at least one coherence granule to be deferred until after data for the at least one coherence granule is received and modified at the writer agent;
indicating, at the writer agent, completion of a store of the at least one coherence granule prior to receiving data stored in the at least one coherence granule of the shared memory;
storing the data received from the shared memory in a local cache of the writer agent; and
modifying, at the writer agent, the data stored in the local cache.
7 . The method of claim 6 , further comprising:
receiving, from the home agent, a snoop request for access to the at least one coherence granule in the local cache by at least one agent of the multiple agents; and
responding to the snoop request only after modifying the data stored in the local cache.
8 . The method of claim 6 , further comprising:
executing, at the writer agent, write operations associated with data stores younger than data stores associated with the at least one coherence granule for which the writer agent has exclusive access.
9 . The method of claim 6 , wherein:
the at least one coherence granule has a same size as a single cache line.
10 . The method of claim 6 , wherein:
the at least one coherence granule has a size smaller than a single cache line.
11 . The method of claim 6 , wherein:
the data received from the shared memory is obtained from a cache of at least one agent of the multiple agents.
12 . The method of claim 6 , is wherein:
the shared memory comprises
system memory,
cache memory of a common cache,
cache memory of at least one agent of the multiple agents, or
any combination thereof.
13 . An apparatus comprising a writer agent, wherein the writer agent is configured to:
obtain exclusive access to at least one coherence granule of shared memory with respect to one or more other agents, wherein the shared memory is configured for access by the one or more other agents;
mark completion of a store of the at least one coherence granule prior to receipt of data for the at least one coherence granule from the shared memory, wherein the marking causes snoop responses for the at least one coherence granule to be deferred until after data for the at least one coherence granule is received and modified at the writer agent;
receive the data from the shared memory for the at least one coherence granule;
storing the data received from the shared memory at a local cache of the writer agent; and
modifying the data at the writer agent.
14 . The apparatus of claim 13 , wherein:
obtaining exclusive access to the at least one coherence granule of the shared memory comprises:
requesting, from a home agent, exclusive access to the at least one coherence granule of the shared memory; and
receiving, from the home agent, an indication that the writer agent has exclusive access to the at least one coherence granule of the shared memory.
15 . The apparatus of claim 13 , wherein the writer agent is further configured to:
store the data received from the shared memory in a local cache.
16 . The apparatus of claim 13 , wherein the writer agent is further configured to:
receive, from a home agent, a snoop request for access to the at least one coherence granule stored in the local cache by at least one agent of the one or more other agents; and
respond to the snoop request only after modifying the data stored in the local cache.
17 . The apparatus of claim 13 , wherein the writer agent is further configured to:
perform write operations associated with data stores younger than data stores associated with the at least one coherence granule for which the writer agent has exclusive access.
18 . The apparatus of claim 13 , wherein:
the local cache is accessible to at least one of the one or more other agents.
19 . The apparatus of claim 13 , wherein:
the writer agent is configured to obtain the data from the shared memory under control of a home agent.
20 . The apparatus of claim 13 , wherein:
the shared memory includes one or more local caches at one or more of the other agents.
21 . A writer agent, comprising:
means for obtaining exclusive access to at least one coherence granule of shared memory with respect to one or more other agents;
means for marking, at the writer agent, completion of a store of the at least one coherence granule prior to receipt of data for the at least one coherence granule from the shared memory, wherein the marking causes snoop responses for the at least one coherence granule to be deferred until after data for the at least one coherence granule is received and modified at the writer agent;
means for receiving the data from the shared memory for the at least one coherence granule;
means for storing the data at a local cache of the writer agent; and
means for modifying the data at the writer agent.
22 . A non-transitory computer-readable medium storing computer-executable instructions that, when executed by a writer agent, cause the writer agent to:
obtain exclusive access to at least one coherence granule of shared memory with respect to one or more other agents;
mark, at the writer agent, completion of a store of the at least one coherence granule prior to receipt of data for the at least one coherence granule from the shared memory;
receive the data from the shared memory for the at least one coherence granule;
store the data at a local cache of the writer agent; and
modify the data at the writer agent.