linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* swap and hibernation files
@ 2019-08-23 19:46 Chris Murphy
  2019-08-25  5:35 ` Andrei Borzenkov
  0 siblings, 1 reply; 2+ messages in thread
From: Chris Murphy @ 2019-08-23 19:46 UTC (permalink / raw)
  To: Btrfs BTRFS; +Cc: Omar Sandoval

Found this:
https://github.com/systemd/systemd/issues/11939#issuecomment-471684411

Is it possible to support hibernation with swapfiles with this new
interface? My understanding is that's only a feature of uswsusp, near
as I can tell.

Advantage is it can mean the space reservation for hibernation and
swap files can be made dynamically as needed rather than making a
large 1:1 RAM to swap partition that maybe isn't needed or desired
based on the use case and workload. Instead of making these decisions
in advance at installation time, make them on demand. Plus, people
sometimes add memory and a previously created hibernation partition
will now be sized incorrectly.

Mostly I'm just curious if it's possible as part of already planned work.

-- 
Chris Murphy

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: swap and hibernation files
  2019-08-23 19:46 swap and hibernation files Chris Murphy
@ 2019-08-25  5:35 ` Andrei Borzenkov
  0 siblings, 0 replies; 2+ messages in thread
From: Andrei Borzenkov @ 2019-08-25  5:35 UTC (permalink / raw)
  To: Chris Murphy, Btrfs BTRFS; +Cc: Omar Sandoval

23.08.2019 22:46, Chris Murphy пишет:
> Found this:
> https://github.com/systemd/systemd/issues/11939#issuecomment-471684411
> 
> Is it possible to support hibernation with swapfiles with this new
> interface? My understanding is that's only a feature of uswsusp, near
> as I can tell.
> 

This is directly supported by kernel, see resume_offset= kernel
parameter. The problem on btrfs is to compute physical on-disk location
of swap file because standard interface used by systemd returns virtual
location in btrfs address space.

> Advantage is it can mean the space reservation for hibernation and
> swap files can be made dynamically as needed rather than making a
> large 1:1 RAM to swap partition that maybe isn't needed or desired
> based on the use case and workload. Instead of making these decisions
> in advance at installation time, make them on demand. Plus, people
> sometimes add memory and a previously created hibernation partition
> will now be sized incorrectly.
> 
> Mostly I'm just curious if it's possible as part of already planned work.
> 

This is already supported by systemd if you compute disk location
manually. See PR linked from the issue you mentioned.

Whether systemd should explicitly support btrfs special case is probably
better discussed on systemd list.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-08-25  5:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-23 19:46 swap and hibernation files Chris Murphy
2019-08-25  5:35 ` Andrei Borzenkov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).