A computer system includes a home node and one or more remote nodes coupled by
a node interconnect. The home node includes a local interconnect, a node controller
coupled between the local interconnect and the node interconnect, a home system
memory, a memory directory including a plurality of entries, and a memory controller
coupled to the local interconnect, the home system memory and the memory directory.
The memory directory includes a plurality of entries that each provide an indication
of whether or not an associated data granule in the home system memory has a corresponding
cache line held in at least one remote node. The memory controller includes demand
invalidation circuitry that, responsive to a data request for a requested data
granule in the home system memory, reads an associated entry in the memory directory
and issues an invalidating command to at least one remote node holding a cache
line corresponding to the requested data granule. In addition, the memory controller
includes directory scrubbing logic that, independently of any data request, periodically
reads entries in the memory directory and, responsive to an entry indicating at
least one remote node holds a cache line corresponding to the associated data granule,
issues a flush query to the at least one remote node to request deallocation of
the cache line corresponding to the associated data granule.