Open wsong83 opened 3 months ago
So perhaps we do need to postpone releasing the locked cache set until all cache partitions, including the relocation buffer pool, are checked! This would cause extra conflict between transactions (so the relocation pool should be checked at the end rather than beginning to reduce its lock probability). Only hit() function needs to be protected.
This should not happen as no two transaction with the same prio can lock the same cache set at the same time. However, the hit() function should lock all partitions before giving up!
When multithread is enabled, how can we detect and avoid concurrent accesses to the same address? Especially when partitions are supported or dynamic remapping is supported? A cache block might be inserted to the partition already checked by the hit function, the dynamic relocation buffer, which leads to false negative. The cache block might be fetched and inserted duplicated!