lkml.org 
[lkml]   [2021]   [Mar]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v6 3/4] x86/vmemmap: Handle unpopulated sub-pmd ranges
On Thu, Mar 11, 2021 at 01:29:39PM -0800, Dave Hansen wrote:
> On 3/9/21 1:40 PM, Oscar Salvador wrote:
> > +static void __meminit vmemmap_use_new_sub_pmd(unsigned long start, unsigned long end)
> > +{
> > + /*
> > + * Could be our memmap page is filled with PAGE_UNUSED already from a
> > + * previous remove. Make sure to reset it.
> > + */
> > + vmemmap_use_sub_pmd(start);
> > +
> > + /*
> > + * Mark with PAGE_UNUSED the unused parts of the new memmap range
> > + */
> > + if (!IS_ALIGNED(start, PMD_SIZE))
> > + memset((void *)start, PAGE_UNUSED,
> > + start - ALIGN_DOWN(start, PMD_SIZE));
> > + if (!IS_ALIGNED(end, PMD_SIZE))
> > + memset((void *)end, PAGE_UNUSED,
> > + ALIGN(end, PMD_SIZE) - end);
> > +}
> > +#endif
>
> This is apparently under both CONFIG_SPARSEMEM_VMEMMAP and
> CONFIG_MEMORY_HOTPLUG #ifdefs. It errors out at compile-time with this
> config: https://sr71.net/~dave/intel/config-mmotm-20210311

It seems that mmotm still has v5.
v6 (this one) fixed that up. I basically moved the code out of
MEMORY_HOTPLUG #ifdefs.

I could not reproduce your error on v6.


--
Oscar Salvador
SUSE L3

\
 
 \ /
  Last update: 2021-03-11 22:51    [W:0.067 / U:0.004 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site