[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <30dddfb1-388c-a593-0987-73e821216da9@redhat.com>
Date: Mon, 12 Jul 2021 09:41:26 +0200
From: David Hildenbrand <david@...hat.com>
To: Michal Hocko <mhocko@...e.com>, Evan Green <evgreen@...omium.org>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Pavel Machek <pavel@....cz>, Alex Shi <alexs@...nel.org>,
Alistair Popple <apopple@...dia.com>,
Jens Axboe <axboe@...nel.dk>,
Johannes Weiner <hannes@...xchg.org>,
Joonsoo Kim <iamjoonsoo.kim@....com>,
"Matthew Wilcox (Oracle)" <willy@...radead.org>,
Miaohe Lin <linmiaohe@...wei.com>,
Minchan Kim <minchan@...nel.org>,
Vlastimil Babka <vbabka@...e.cz>, linux-kernel@...r.kernel.org,
linux-mm@...ck.org, linux-api@...r.kernel.org
Subject: Re: [PATCH v2] mm: Enable suspend-only swap spaces
On 12.07.21 09:03, Michal Hocko wrote:
> [Cc linux-api]
>
> On Fri 09-07-21 10:50:48, Evan Green wrote:
>> Currently it's not possible to enable hibernation without also enabling
>> generic swap for a given swap area. These two use cases are not the
>> same. For example there may be users who want to enable hibernation,
>> but whose drives don't have the write endurance for generic swap
>> activities.
>>
>> Add a new SWAP_FLAG_NOSWAP that adds a swap region but refuses to allow
>> generic swapping to it. This region can still be wired up for use in
>> suspend-to-disk activities, but will never have regular pages swapped to
>> it.
>
> Could you expand some more on why a strict exclusion is really
> necessary? I do understand that one might not want to have swap storage
> available all the time but considering that swapon is really a light
> operation so something like the following should be a reasonable
> workaround, no?
> swapon storage/file
> s2disk
> swapoff storage
I'm certainly not a hibernation expert, but I'd guess this can also be
triggered by HW events, so from the kernel and not only from user space
where your workaround would apply.
--
Thanks,
David / dhildenb
Powered by blists - more mailing lists