Re: [PATCH RFC 6/6] PM / Hibernate: exclude all PageOffline() pages

From: David Hildenbrand
Date: Thu Nov 15 2018 - 07:29:57 EST


On 15.11.18 13:23, Michal Hocko wrote:
> On Wed 14-11-18 22:17:04, David Hildenbrand wrote:
> [...]
>> diff --git a/kernel/power/snapshot.c b/kernel/power/snapshot.c
>> index b0308a2c6000..01db1d13481a 100644
>> --- a/kernel/power/snapshot.c
>> +++ b/kernel/power/snapshot.c
>> @@ -1222,7 +1222,7 @@ static struct page *saveable_highmem_page(struct zone *zone, unsigned long pfn)
>> BUG_ON(!PageHighMem(page));
>>
>> if (swsusp_page_is_forbidden(page) || swsusp_page_is_free(page) ||
>> - PageReserved(page))
>> + PageReserved(page) || PageOffline(page))
>> return NULL;
>>
>> if (page_is_guard(page))
>> @@ -1286,6 +1286,9 @@ static struct page *saveable_page(struct zone *zone, unsigned long pfn)
>> if (swsusp_page_is_forbidden(page) || swsusp_page_is_free(page))
>> return NULL;
>>
>> + if (PageOffline(page))
>> + return NULL;
>> +
>> if (PageReserved(page)
>> && (!kernel_page_present(page) || pfn_is_nosave(pfn)))
>> return NULL;
>
> Btw. now that you are touching this file could you also make
> s@pfn_to_page@pfn_to_online_page@ please? We really do not want to touch
> offline pfn ranges in general. A separate patch for that of course.
>
> Thanks!
>

Sure thing, will look into that!

Thanks!

--

Thanks,

David / dhildenb