]> Gentwo Git Trees - linux/.git/commit
zram: factor out ZRAM_HUGE write
authorSergey Senozhatsky <senozhatsky@chromium.org>
Wed, 18 Dec 2024 06:34:21 +0000 (15:34 +0900)
committerAndrew Morton <akpm@linux-foundation.org>
Tue, 14 Jan 2025 06:41:04 +0000 (22:41 -0800)
commit485d11509d6d7da5202c9c03c5b580972f26f4bc
tree57e9a2ee21ccf3a7e2706f6cb26f079d376e9aa9
parent208b2c6833f733708c3651a2abcead54d9e8b7cc
zram: factor out ZRAM_HUGE write

zram_write_page() handles: ZRAM_SAME pages (which was already factored
out) stores, regular page stores and ZRAM_HUGE pages stores.

ZRAM_HUGE handling adds a significant amount of complexity.  Instead, we
can handle ZRAM_HUGE in a separate function.  This allows us to simplify
zs_handle allocations slow-path, as it now does not handle ZRAM_HUGE case.
ZRAM_HUGE zs_handle allocation, on the other hand, can now drop
__GFP_KSWAPD_RECLAIM because we handle ZRAM_HUGE in preemptible context
(outside of local-lock scope).

Link: https://lkml.kernel.org/r/20241218063513.297475-5-senozhatsky@chromium.org
Signed-off-by: Sergey Senozhatsky <senozhatsky@chromium.org>
Cc: Minchan Kim <minchan@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
drivers/block/zram/zram_drv.c