lkml.org 
[lkml]   [2018]   [Sep]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH v4 3/5] mm: Defer ZONE_DEVICE page initialization to the point where we init pgmap
Date

>>> +        page->pgmap = pgmap;
>>> +        page->hmm_data = 0;
>>
>> __init_single_page()
>>    mm_zero_struct_page()
>>
>> Takes care of zeroing, no need to do another store here.
>
> The problem is __init_singe_page also calls INIT_LIST_HEAD which I
> believe sets the prev pointer which overlaps with hmm_data.

Indeed it does:

INIT_LIST_HEAD(&page->lru); overlaps with hmm_data, and before
list_del(&page->lru); was called to remove from the list.

And now I see you also mentioned about this in comments. I also prefer
having it zeroed instead of left poisoned or uninitialized. The change
looks good.

Thank you,
Pavel

>
>>
>> Looks good otherwise.
>>
>> Reviewed-by: Pavel Tatashin <pavel.tatashin@microsoft.com>
>>
>
> Thanks for the review.
>
\
 
 \ /
  Last update: 2018-09-21 22:15    [W:0.069 / U:0.124 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site