Re: Fix SWSUSP & !SWAP

Martin J. Bligh
2003-04-23T23:55:40Z

>> > From: Martin J. Bligh [mailto:mbligh@aracnet.com]
>> > Can't you just create a pre-reserved separate swsusp area on
>> > disk the size
>> > of RAM (maybe a partition rather than a file to make things
>> > easier), and
>> > then you know you're safe (basically what Marc was
>> > suggesting, except pre-allocated)? Or does that make me the
>> > prince of all evil? ;-)
>> >
>> > However much swap space you allocate, it can always all be
>> > used, so that seems futile ...
>>
>> This is what Other OSes do, and I believe this is the correct path.
>> Using swap for swsusp is a clever hack but not a 100% solution.
>
> Well, for normal use its clearly inferior -- suspend partition is unused
> when it could be used for speeding system up by swapping out unused
> stuff.
>
> OtherOS approach is better because it can guarantee suspend-to-disk
> for critical situations like overheat or battery-critical.
>
> But we can get best of both worlds if we OOM-kill during critical
> suspend. [If suspend partition was not used for swapping, machine
> would *already* OOM-killed someone, so we are only improving stuff].

OK ... but at least having the *option* to have a separate reserved
area would be nice, no? For most people, RAM is just a tiny amount
of their disk space ... and damn, does it make the code simpler ;-)

M.