Re: [PATCH v3 2/4] PM: hibernate: make direct map manipulations more explicit

2020-11-03 Thread Mike Rapoport
On Tue, Nov 03, 2020 at 05:39:16PM +0300, Kirill A. Shutemov wrote: > On Tue, Nov 03, 2020 at 02:13:50PM +0200, Mike Rapoport wrote: > > > > + > > > > + if (WARN_ON(ret)) > > > > > > _ONCE? > > > > I've changed it to pr_warn() after David said people enable panic on > > warn in prod

Re: [PATCH v3 2/4] PM: hibernate: make direct map manipulations more explicit

2020-11-03 Thread Kirill A. Shutemov
On Tue, Nov 03, 2020 at 02:13:50PM +0200, Mike Rapoport wrote: > On Tue, Nov 03, 2020 at 02:08:16PM +0300, Kirill A. Shutemov wrote: > > On Sun, Nov 01, 2020 at 07:08:13PM +0200, Mike Rapoport wrote: > > > diff --git a/kernel/power/snapshot.c b/kernel/power/snapshot.c > > > index 46b1804c1ddf..054c

Re: [PATCH v3 2/4] PM: hibernate: make direct map manipulations more explicit

2020-11-03 Thread Mike Rapoport
On Tue, Nov 03, 2020 at 02:08:16PM +0300, Kirill A. Shutemov wrote: > On Sun, Nov 01, 2020 at 07:08:13PM +0200, Mike Rapoport wrote: > > diff --git a/kernel/power/snapshot.c b/kernel/power/snapshot.c > > index 46b1804c1ddf..054c8cce4236 100644 > > --- a/kernel/power/snapshot.c > > +++ b/kernel/powe

Re: [PATCH v3 2/4] PM: hibernate: make direct map manipulations more explicit

2020-11-03 Thread Kirill A. Shutemov
On Sun, Nov 01, 2020 at 07:08:13PM +0200, Mike Rapoport wrote: > diff --git a/kernel/power/snapshot.c b/kernel/power/snapshot.c > index 46b1804c1ddf..054c8cce4236 100644 > --- a/kernel/power/snapshot.c > +++ b/kernel/power/snapshot.c > @@ -76,6 +76,32 @@ static inline void hibernate_restore_protect

Re: [PATCH v3 2/4] PM: hibernate: make direct map manipulations more explicit

2020-11-02 Thread Mike Rapoport
On Mon, Nov 02, 2020 at 10:19:36AM +0100, David Hildenbrand wrote: > On 01.11.20 18:08, Mike Rapoport wrote: > > From: Mike Rapoport > > > > When DEBUG_PAGEALLOC or ARCH_HAS_SET_DIRECT_MAP is enabled a page may be > > not present in the direct map and has to be explicitly mapped before it > > cou

Re: [PATCH v3 2/4] PM: hibernate: make direct map manipulations more explicit

2020-11-02 Thread David Hildenbrand
On 01.11.20 18:08, Mike Rapoport wrote: From: Mike Rapoport When DEBUG_PAGEALLOC or ARCH_HAS_SET_DIRECT_MAP is enabled a page may be not present in the direct map and has to be explicitly mapped before it could be copied. Introduce hibernate_map_page() that will explicitly use set_direct_map_{

[PATCH v3 2/4] PM: hibernate: make direct map manipulations more explicit

2020-11-01 Thread Mike Rapoport
From: Mike Rapoport When DEBUG_PAGEALLOC or ARCH_HAS_SET_DIRECT_MAP is enabled a page may be not present in the direct map and has to be explicitly mapped before it could be copied. Introduce hibernate_map_page() that will explicitly use set_direct_map_{default,invalid}_noflush() for ARCH_HAS_SE