android_kernel_samsung_sm8650/drivers/block/zram
Brian Geffon 94541bc3fb zram: always expose rw_page
Currently zram will adjust its fops to a version which does not contain
rw_page when a backing device has been assigned.  This is done to prevent
upper layers from assuming a synchronous operation when a page may have
been written back.  This forces every operation through bio which has
overhead associated with bio_alloc/frees.

The code can be simplified to always expose an rw_page method and only in
the rare event that a page is written back we instead will return
-EOPNOTSUPP forcing the upper layer to fallback to bio.

Link: https://lkml.kernel.org/r/20221003144832.2906610-1-bgeffon@google.com
Signed-off-by: Brian Geffon <bgeffon@google.com>
Reviewed-by: Sergey Senozhatsky <senozhatsky@chromium.org>
Cc: Minchan Kim <minchan@kernel.org>
Cc: Nitin Gupta <ngupta@vflare.org>
Cc: Rom Lemarchand <romlem@google.com>
Cc: Suleiman Souhlal <suleiman@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2022-10-12 18:51:50 -07:00
..
Kconfig zram: fix Kconfig dependency warning 2022-05-25 10:47:47 -07:00
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
zcomp.c zram: do not lookup algorithm in backends table 2022-07-03 18:08:50 -07:00
zcomp.h zram: Use local lock to protect per-CPU data 2020-05-28 10:31:10 +02:00
zram_drv.c zram: always expose rw_page 2022-10-12 18:51:50 -07:00
zram_drv.h zram: do not waste zram_table_entry flags bits 2022-10-03 14:03:09 -07:00