> -----Original Message-----
> From: Dmitry Kozlyuk <[email protected]>
> Sent: Wednesday, October 20, 2021 3:34 AM
> To: Harman Kalra <[email protected]>
> Cc: [email protected]; Anatoly Burakov <[email protected]>;
> [email protected]; [email protected]; [email protected]
> Subject: [EXT] Re: [PATCH v4 1/7] malloc: introduce malloc is ready API
> 
> External Email
> 
> ----------------------------------------------------------------------
> 2021-10-20 01:01 (UTC+0300), Dmitry Kozlyuk:
> > 2021-10-20 00:05 (UTC+0530), Harman Kalra:
> > [...]
> > >  static unsigned
> > >  check_hugepage_sz(unsigned flags, uint64_t hugepage_sz)  { @@
> > > -1328,6 +1330,7 @@ rte_eal_malloc_heap_init(void)  {
> > >   struct rte_mem_config *mcfg = rte_eal_get_configuration()-
> >mem_config;
> > >   unsigned int i;
> > > + int ret;
> > >   const struct internal_config *internal_conf =
> > >           eal_get_internal_configuration();
> > >
> > > @@ -1369,5 +1372,16 @@ rte_eal_malloc_heap_init(void)
> > >           return 0;
> >
> > A secondary process exits here...
> >
> > >   /* add all IOVA-contiguous areas to the heap */
> > > - return rte_memseg_contig_walk(malloc_add_seg, NULL);
> > > + ret = rte_memseg_contig_walk(malloc_add_seg, NULL);
> > > +
> > > + if (ret == 0)
> > > +         malloc_ready = true;
> >
> > ...and never knows that malloc is ready.
> > But malloc is always ready for a secondary process.
> 
> That is, before returning 0 above for a secondary process malloc_ready
> should be set unconditionally.

Yes, thanks for catching this, I will fix it V5.

Reply via email to