Hi Julien, > -----Original Message----- > From: Julien Grall <jul...@xen.org> > Sent: 2021年8月13日 20:38 > To: Penny Zheng <penny.zh...@arm.com>; xen-devel@lists.xenproject.org; > sstabell...@kernel.org > Cc: Bertrand Marquis <bertrand.marq...@arm.com>; Wei Chen > <wei.c...@arm.com>; nd <n...@arm.com> > Subject: Re: [PATCH V4 05/10] xen/arm: static memory initialization > > Hi Penny, > > On 28/07/2021 11:27, Penny Zheng wrote: > > +/* Static memory initialization */ > > +static void __init init_staticmem_pages(void) > > +{ > > + unsigned int bank; > > + > > + /* TODO: Considering NUMA-support scenario. */ > > I forgot to ask about this. What do you expect to be different with NUMA? >
From our current NUMA implementation, I think there is no difference between NUMA and Non-NUMA system for static allocation. Maybe in the future, we will add some checks to warning user about cross-nodes configuration. But now, I think it's better for Penny to remove this comment. > > + for ( bank = 0 ; bank < bootinfo.static_mem.nr_banks; bank++ ) > > + { > > + unsigned long bank_start = > PFN_UP(bootinfo.static_mem.bank[bank].start); > > + unsigned long bank_size = > PFN_DOWN(bootinfo.static_mem.bank[bank].size); > > + unsigned long bank_end = bank_start + bank_size; > > + > > + if ( bank_end <= bank_start ) > > + return; > > + > > + free_staticmem_pages(mfn_to_page(_mfn(bank_start)), > > + bank_size, false); > > + } > > +} > > + > > Cheers, > > -- > Julien Grall