gpu-compute: Fix TLB coalescer starvation
Currently, we are storing coalesced accesses in
an std::unordered_map indexed by a tick index, i.e.
issue tick / coalescing window. If there are
multiple coalesced requests, at different tick
indexes, to the same virtual address, then the
TLB coalescer will issue just the first one.
However, std::unordered_map is not a sorted
container and we issue coalesced requests by iterating
through such container. This means that the coalesced
request sent in TLBCoalescer::processProbeTLBEvent is
not necessarly the oldest one. Because of this, in
cases of high contention the oldest coalesced request
will have a huge TLB access latency.
To fix this issue, we will use an std::map which is
a sorted container and therefore guarantees the
oldest coalesced request will be sent first.
Reviewed-by: Matt Sinclair <firstname.lastname@example.org>
Reviewed-by: Matthew Poremba <email@example.com>
Maintainer: Matt Sinclair <firstname.lastname@example.org>
Tested-by: kokoro <email@example.com>
1 file changed