On Tue, Nov 10, 2020 at 11:50:52AM +0100, Alexander Gordeev wrote: > > > static void __vmemmap_use_sub_pmd(unsigned long start, unsigned long end) > > > { > > >+ unsigned long size = min(end - start, sizeof(struct page)); > > >+ > > > /* > > > * As we expect to add in the same granularity as we remove, it's > > > * sufficient to mark only some piece used to block the memmap page from > > > * getting removed (just in case the memmap never gets initialized, > > > * e.g., because the memory block never gets onlined). > > > */ > > >- memset(__va(start), 0, sizeof(struct page)); > > >+ memset(__va(start), 0, size); > > > } > > > static void vmemmap_use_sub_pmd(unsigned long start, unsigned long end) > > > > > > > I don't really see a need for that. Can you spell out one possible > > configuration that would trigger that in the future? It's sounds > > very unlikely and I have the feeling there might be more to change > > at other points. > > No configuration in mind. But dependency on struct page is the only > obstacle that prevents the whole thing to become generic (unless I > am missing something). Moreover, the memset() would not be needed > also - just a single non-PAGE_UNUSED word within [start..end) should > be enough. Well, I agree with David here - so not applying.