Messages in this thread | | | From | Pasha Tatashin <> | Subject | Re: [PATCH v4 3/5] mm: Defer ZONE_DEVICE page initialization to the point where we init pgmap | Date | Fri, 21 Sep 2018 20:14:32 +0000 |
| |
>>> + 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. >
| |