Skip to content

RFC Additional function in swapfile.c (needed for swap suspend)

Rafael J. Wysocki lkml 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest2 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2Additional function in swapfile.c (needed for swap suspend)include/linux/swap.h mm/swapfile.c+21 -00 replies
2/2Additional function in swapfile.c (needed for swap suspend)kernel/power/swsusp.c+19 -650 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC][PATCH -mm 0/2] Additional function in swapfile.c (needed for swap suspend)

Hi,

To implement the image-writing part of swsusp in the user space and maintain the compatibility with the in-kernel implementation we need to be able to ask the kernel to allocate a swap page from specific swap partition. For this purpose we need a function allowing us to specify the swap partition to allocate from.

Moreover, if we had such a function, we could change the in-kernel implementation of swsusp to avoid locking of the swap devices that are not used for suspend and this would allow us to simplify the code quite a bit.

The first of the following two patches adds such a function, and the second of them shows what can be done in swsusp if that function is available.

All of your comments and/or suggestions will be appreciated.

Greetings,
Rafael