From: David Hildenbrand <david@redhat.com>
To: Vlastimil Babka <vbabka@suse.cz>,
Andrew Morton <akpm@linux-foundation.org>
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
Alexander Potapenko <glider@google.com>,
Kees Cook <keescook@chromium.org>,
Michal Hocko <mhocko@kernel.org>,
Mateusz Nosek <mateusznosek0@gmail.com>,
Laura Abbott <labbott@kernel.org>
Subject: Re: [PATCH 3/3] mm, page_alloc: reduce static keys in prep_new_page()
Date: Wed, 28 Oct 2020 09:38:25 +0100 [thread overview]
Message-ID: <1d131524-6383-fb37-00e7-ba52ae6de66b@redhat.com> (raw)
In-Reply-To: <38de5bb0-5559-d069-0ce0-daec66ef2746@suse.cz>
On 27.10.20 18:41, Vlastimil Babka wrote:
> On 10/27/20 2:32 PM, Vlastimil Babka wrote:
>> So my conclusion:
>> - We can remove PAGE_POISONING_NO_SANITY because it only makes sense with
>> PAGE_POISONING_ZERO, and we can use init_on_free instead
>
> Note for this we first have to make sanity checking compatible with
> hibernation, but that should be easy as the zeroing variants already
> paved the way. The patch below will be added to the next version of
> the series:
>
> From 44474ee27c4f5248061ea2e5bbc2aeefc91bcdfc Mon Sep 17 00:00:00 2001
> From: Vlastimil Babka <vbabka@suse.cz>
> Date: Tue, 27 Oct 2020 18:25:17 +0100
> Subject: [PATCH] kernel/power: allow hibernation with page_poison sanity
> checking
>
> Page poisoning used to be incompatible with hibernation, as the state of
> poisoned pages was lost after resume, thus enabling CONFIG_HIBERNATION forces
> CONFIG_PAGE_POISONING_NO_SANITY. For the same reason, the poisoning with zeroes
> variant CONFIG_PAGE_POISONING_ZERO used to disable hibernation. The latter
> restriction was removed by commit 1ad1410f632d ("PM / Hibernate: allow
> hibernation with PAGE_POISONING_ZERO") and similarly for init_on_free by commit
> 18451f9f9e58 ("PM: hibernate: fix crashes with init_on_free=1") by making sure
> free pages are cleared after resume.
>
> We can use the same mechanism to instead poison free pages with PAGE_POISON
> after resume. This covers both zero and 0xAA patterns. Thus we can remove the
> Kconfig restriction that disables page poison sanity checking when hibernation
> is enabled.
I haven't fully dived into the details, but the idea it sounds sane to me.
--
Thanks,
David / dhildenb
next prev parent reply other threads:[~2020-10-28 8:38 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-26 17:33 [PATCH 0/3] optimize handling of memory debugging parameters Vlastimil Babka
2020-10-26 17:33 ` [PATCH 1/3] mm, page_alloc: do not rely on the order of page_poison and init_on_alloc/free parameters Vlastimil Babka
2020-10-27 9:03 ` David Hildenbrand
2020-10-27 9:58 ` Vlastimil Babka
2020-10-27 9:58 ` David Hildenbrand
2020-10-28 8:31 ` Mike Rapoport
2020-10-26 17:33 ` [PATCH 2/3] mm, page_poison: use static key more efficiently Vlastimil Babka
2020-10-27 9:07 ` David Hildenbrand
2020-10-30 16:27 ` Luis Chamberlain
2020-10-30 22:56 ` Vlastimil Babka
2020-11-11 13:29 ` Luis Chamberlain
2020-10-26 17:33 ` [PATCH 3/3] mm, page_alloc: reduce static keys in prep_new_page() Vlastimil Babka
2020-10-27 9:10 ` David Hildenbrand
2020-10-27 11:05 ` Vlastimil Babka
2020-10-27 13:32 ` Vlastimil Babka
2020-10-27 17:41 ` Vlastimil Babka
2020-10-28 8:38 ` David Hildenbrand [this message]
2020-10-29 17:37 ` Alexander Potapenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1d131524-6383-fb37-00e7-ba52ae6de66b@redhat.com \
--to=david@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=glider@google.com \
--cc=keescook@chromium.org \
--cc=labbott@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mateusznosek0@gmail.com \
--cc=mhocko@kernel.org \
--cc=vbabka@suse.cz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).