Commit 611112f
zram: add size class equals check into recompression
Patch series "zsmalloc/zram: configurable zspage size", v4.
Some use-cases and/or data patterns may benefit from larger zspages.
Currently the limit on the number of physical pages that are linked into a
zspage is hardcoded to 4. Higher limit changes key characteristics of a
number of the size classes, improving compactness of the pool and redusing
the amount of memory zsmalloc pool uses. More on this in 0002 commit
message.
This patch (of 9):
It makes no sense for us to recompress the object if it will be in the
same size class. We anyway don't get any memory gain. But, at the same
time, we get a CPU time overhead when inserting this object into zspage
and decompressing it afterwards.
Link: https://lkml.kernel.org/r/20221031054108.541190-2-senozhatsky@chromium.org
Signed-off-by: Alexey Romanov <avromanov@sberdevices.ru>
Reviewed-by: Sergey Senozhatsky <senozhatsky@chromium.org>
Signed-off-by: Sergey Senozhatsky <senozhatsky@chromium.org>
Cc: Minchan Kim <minchan@kernel.org>
Cc: Nitin Gupta <ngupta@vflare.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>1 parent 77e7eef commit 611112f
File tree
3 files changed
+28
-0
lines changed- drivers/block/zram
- include/linux
- mm
3 files changed
+28
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1632 | 1632 | | |
1633 | 1633 | | |
1634 | 1634 | | |
| 1635 | + | |
| 1636 | + | |
1635 | 1637 | | |
1636 | 1638 | | |
1637 | 1639 | | |
| |||
1656 | 1658 | | |
1657 | 1659 | | |
1658 | 1660 | | |
| 1661 | + | |
| 1662 | + | |
1659 | 1663 | | |
1660 | 1664 | | |
1661 | 1665 | | |
1662 | 1666 | | |
1663 | 1667 | | |
1664 | 1668 | | |
1665 | 1669 | | |
| 1670 | + | |
1666 | 1671 | | |
1667 | 1672 | | |
1668 | 1673 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
| 58 | + | |
| 59 | + | |
58 | 60 | | |
59 | 61 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1300 | 1300 | | |
1301 | 1301 | | |
1302 | 1302 | | |
| 1303 | + | |
| 1304 | + | |
| 1305 | + | |
| 1306 | + | |
| 1307 | + | |
| 1308 | + | |
| 1309 | + | |
| 1310 | + | |
| 1311 | + | |
| 1312 | + | |
| 1313 | + | |
| 1314 | + | |
| 1315 | + | |
| 1316 | + | |
| 1317 | + | |
| 1318 | + | |
| 1319 | + | |
| 1320 | + | |
| 1321 | + | |
| 1322 | + | |
| 1323 | + | |
1303 | 1324 | | |
1304 | 1325 | | |
1305 | 1326 | | |
| |||
0 commit comments