Commit 02d9139
f2fs: fix to freeze GC and discard threads quickly
Suspend can fail if kernel threads do not freeze for a while.
f2fs_gc and f2fs_discard threads can perform long-running operations
that prevent them from reaching a freeze point in a timely manner.
This patch adds explicit freezing checks in the following locations:
1. f2fs_gc: Added a check at the 'retry' label to exit the loop quickly
if freezing is requested, especially during heavy GC rounds.
2. __issue_discard_cmd: Added a 'suspended' flag to break both inner and
outer loops during discard command issuance if freezing is detected
after at least one command has been issued.
3. __issue_discard_cmd_orderly: Added a similar check for orderly discard
to ensure responsiveness.
These checks ensure that the threads release locks safely and enter the
frozen state.
Signed-off-by: Daeho Jeong <[email protected]>
Reviewed-by: Chao Yu <[email protected]>
Signed-off-by: Jaegeuk Kim <[email protected]>1 parent 7b9161a commit 02d9139
2 files changed
Lines changed: 21 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1895 | 1895 | | |
1896 | 1896 | | |
1897 | 1897 | | |
| 1898 | + | |
| 1899 | + | |
| 1900 | + | |
| 1901 | + | |
| 1902 | + | |
1898 | 1903 | | |
1899 | 1904 | | |
1900 | 1905 | | |
1901 | 1906 | | |
1902 | 1907 | | |
1903 | 1908 | | |
| 1909 | + | |
1904 | 1910 | | |
1905 | 1911 | | |
1906 | 1912 | | |
| |||
1974 | 1980 | | |
1975 | 1981 | | |
1976 | 1982 | | |
| 1983 | + | |
| 1984 | + | |
| 1985 | + | |
| 1986 | + | |
1977 | 1987 | | |
1978 | 1988 | | |
1979 | 1989 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1606 | 1606 | | |
1607 | 1607 | | |
1608 | 1608 | | |
| 1609 | + | |
| 1610 | + | |
| 1611 | + | |
1609 | 1612 | | |
1610 | 1613 | | |
1611 | 1614 | | |
| |||
1645 | 1648 | | |
1646 | 1649 | | |
1647 | 1650 | | |
| 1651 | + | |
1648 | 1652 | | |
1649 | 1653 | | |
1650 | 1654 | | |
| |||
1675 | 1679 | | |
1676 | 1680 | | |
1677 | 1681 | | |
| 1682 | + | |
| 1683 | + | |
| 1684 | + | |
| 1685 | + | |
| 1686 | + | |
1678 | 1687 | | |
1679 | 1688 | | |
1680 | 1689 | | |
| |||
1694 | 1703 | | |
1695 | 1704 | | |
1696 | 1705 | | |
1697 | | - | |
| 1706 | + | |
| 1707 | + | |
1698 | 1708 | | |
1699 | 1709 | | |
1700 | 1710 | | |
| |||
0 commit comments