3 ms·
The summary is good :-) Two details. First, cloning a complete page and calling remap_file_pages() only occurs once on a given page, so if a number of transac
by arigo 13y ago
The summary is good :-)
Two details. First, cloning a complete page and calling remap_file_pages() only occurs once on a given page, so if a number of transactions repeatedly modify the same objects, they will already be in un-shared pages (the page are tentatively shared again during major collection only).
And second, about the exact time at which "read-write" conflicts are found: when we commit, we know which objects we modified, so we can check if someone else has read them and abort that other thread instead. We never need to walk the list of all read objects: it is enough to check if some (smaller number of) objects were read or not by another thread. So the "list" of all read objects is implemented as a byte mask over all objects.
- lifeisstillgood 13y ago>> someone more knowledgeable will write in to correct me. >> (Armin Rigo, do you read Hacker News?) Why was I even thinking this might not happen :-)