Re: [PATCH v4 3/5] mm: Defer ZONE_DEVICE page initialization to the point where we init pgmap

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>>> +        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@xxxxxxxxxxxxx>
>>
> 
> Thanks for the review.
> 




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux