lkml.org 
[lkml]   [2020]   [May]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 04/10] power: separate PageHighMem() and PageHighMemZone() use case
On Wed, Apr 29, 2020 at 12:26:37PM +0900, js1304@gmail.com wrote:
> index 6598001..be759a6 100644
> --- a/kernel/power/snapshot.c
> +++ b/kernel/power/snapshot.c
> @@ -1227,7 +1227,7 @@ static struct page *saveable_highmem_page(struct zone *zone, unsigned long pfn)
> if (!page || page_zone(page) != zone)
> return NULL;
>
> - BUG_ON(!PageHighMem(page));
> + BUG_ON(!PageHighMemZone(page));

The above check already checks for the highmem zone. So if we want
to keep the BUG_ON it needs stay PageHighMem to make sense. That being
said I'd rather remove it entirelẏ.

> - BUG_ON(PageHighMem(page));
> + BUG_ON(PageHighMemZone(page));

Same here.

> @@ -1529,7 +1529,7 @@ static unsigned long preallocate_image_pages(unsigned long nr_pages, gfp_t mask)
> if (!page)
> break;
> memory_bm_set_bit(&copy_bm, page_to_pfn(page));
> - if (PageHighMem(page))
> + if (PageHighMemZone(page))
> alloc_highmem++;
> else
> alloc_normal++;

I don't fully understand the log here. Can Pavel or Rafael clarify
why swsupst would care about the exact zone?

\
 
 \ /
  Last update: 2020-05-01 14:23    [W:1.575 / U:0.080 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site