Commit be04c14
Mike Snitzer
dm: use op specific max_sectors when splitting abnormal io
Split abnormal IO in terms of the corresponding operation specific
max_sectors (max_discard_sectors, max_secure_erase_sectors or
max_write_zeroes_sectors).
This fixes a significant dm-thinp discard performance regression that
was introduced with commit e2dd8ac ("dm bio prison v1: improve
concurrent IO performance"). Relative to discard: max_discard_sectors
is used instead of max_sectors; which fixes excessive discard splitting
(e.g. max_sectors=128K vs max_discard_sectors=64M).
Tested by discarding an 1 Petabyte dm-thin device:
lvcreate -V 1125899906842624B -T test/pool -n thin
time blkdiscard /dev/test/thin
Before this fix (splitting discards every 128K): ~116m
After this fix (splitting discards every 64M) : 0m33.460s
Reported-by: Zorro Lang <zlang@redhat.com>
Fixes: 06961c4 ("dm: split discards further if target sets max_discard_granularity")
Requires: 13f6fac ("dm: allow targets to require splitting WRITE_ZEROES and SECURE_ERASE")
Fixes: e2dd8ac ("dm bio prison v1: improve concurrent IO performance")
Signed-off-by: Mike Snitzer <snitzer@kernel.org>1 parent 722d908 commit be04c14
1 file changed
Lines changed: 16 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1172 | 1172 | | |
1173 | 1173 | | |
1174 | 1174 | | |
1175 | | - | |
| 1175 | + | |
| 1176 | + | |
1176 | 1177 | | |
1177 | 1178 | | |
1178 | 1179 | | |
| |||
1186 | 1187 | | |
1187 | 1188 | | |
1188 | 1189 | | |
1189 | | - | |
| 1190 | + | |
1190 | 1191 | | |
1191 | 1192 | | |
1192 | 1193 | | |
1193 | 1194 | | |
1194 | 1195 | | |
1195 | | - | |
| 1196 | + | |
1196 | 1197 | | |
1197 | 1198 | | |
1198 | 1199 | | |
| |||
1581 | 1582 | | |
1582 | 1583 | | |
1583 | 1584 | | |
1584 | | - | |
| 1585 | + | |
| 1586 | + | |
1585 | 1587 | | |
1586 | 1588 | | |
1587 | 1589 | | |
1588 | 1590 | | |
1589 | | - | |
| 1591 | + | |
1590 | 1592 | | |
1591 | 1593 | | |
1592 | 1594 | | |
| |||
1623 | 1625 | | |
1624 | 1626 | | |
1625 | 1627 | | |
| 1628 | + | |
1626 | 1629 | | |
1627 | 1630 | | |
1628 | 1631 | | |
1629 | 1632 | | |
1630 | 1633 | | |
| 1634 | + | |
1631 | 1635 | | |
1632 | | - | |
| 1636 | + | |
1633 | 1637 | | |
1634 | 1638 | | |
1635 | 1639 | | |
| 1640 | + | |
1636 | 1641 | | |
1637 | | - | |
| 1642 | + | |
1638 | 1643 | | |
1639 | 1644 | | |
1640 | 1645 | | |
| 1646 | + | |
1641 | 1647 | | |
1642 | | - | |
| 1648 | + | |
1643 | 1649 | | |
1644 | 1650 | | |
1645 | 1651 | | |
| |||
1654 | 1660 | | |
1655 | 1661 | | |
1656 | 1662 | | |
1657 | | - | |
| 1663 | + | |
| 1664 | + | |
1658 | 1665 | | |
1659 | 1666 | | |
1660 | 1667 | | |
| |||
0 commit comments