> Only one discard at a time switches the generation of an L2 page and > waits for the previous one to drain. Others queue behind it and then > do the same one by one, so N discards of clusters mapped by one L2 > page take N drain cycles under write load. This is the common case: > discards updating the same L2 page complete its writeback together > and come to process_indexes_end() in one batch. > > A discard, which finds a switch in progress while no write is counted > in the new generation yet, has exactly the same writes to wait for as > the discard which switched. Let it join: wait for the same previous > generation instead of queueing for its own switch. If that generation > is already empty, nothing is in flight and the discard goes on > immediately. > > Count the discards waiting for the previous generation instead of > keeping a flag, and allow the next switch when the last of them is > released. > > https://virtuozzo.atlassian.net/browse/VSTOR-154659 > Feature: dm-qcow2: block device over QCOW2 files driver > Signed-off-by: Andrey Zhadchenko <[email protected]>
Sashiko has reviewed this patch and found no issues. It looks great! -- Sashiko AI review ยท https://sashiko.vzint.dev/#/patchset/[email protected]?part=3 _______________________________________________ Devel mailing list [email protected] https://lists.openvz.org/mailman/listinfo/devel
