summaryrefslogtreecommitdiff
path: root/include/linux/stackprotector.h
diff options
context:
space:
mode:
authorSergey Senozhatsky <senozhatsky@chromium.org>2025-03-03 05:03:20 +0300
committerAndrew Morton <akpm@linux-foundation.org>2025-03-17 08:06:35 +0300
commit7e1b0212d4d59281a80c836841539a91b724bf24 (patch)
tree8d6f90d1fdcdbe232bf5f4609360930cee4392b6 /include/linux/stackprotector.h
parentb0624f0b223420047625eaff66af9e9d6d3df85f (diff)
downloadlinux-7e1b0212d4d59281a80c836841539a91b724bf24.tar.xz
zram: move post-processing target allocation
Allocate post-processing target in place_pp_slot(). This simplifies scan_slots_for_writeback() and scan_slots_for_recompress() loops because we don't need to track pps pointer state anymore. Previously we have to explicitly NULL the point if it has been added to a post-processing bucket or re-use previously allocated pointer otherwise and make sure we don't leak the memory in the end. We are also fine doing GFP_NOIO allocation, as post-processing can be called under memory pressure so we better pick as many slots as we can as soon as we can and start post-processing them, possibly saving the memory. Allocation failure there is not fatal, we will post-process whatever we put into the buckets on previous iterations. Link: https://lkml.kernel.org/r/20250303022425.285971-12-senozhatsky@chromium.org Signed-off-by: Sergey Senozhatsky <senozhatsky@chromium.org> Cc: Hillf Danton <hdanton@sina.com> Cc: Kairui Song <ryncsn@gmail.com> Cc: Minchan Kim <minchan@kernel.org> Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Cc: Yosry Ahmed <yosry.ahmed@linux.dev> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'include/linux/stackprotector.h')
0 files changed, 0 insertions, 0 deletions