On Thu, Mar 24, 2016 at 01:46:44AM +0200, Nikolay Nikolaev wrote:
> On Thu, Mar 24, 2016 at 12:19 AM, Bill Fischofer
> <bill.fischo...@linaro.org> wrote:
> >
> > Add odp_cpu_socket_id() and odp_cpu_socket_id_cpu() routines
> 
> I wonder how those are going to be implemented on non-NUMA systems
> like ThunderX?

I think you meant NUMA platform like ThunderX.

From HW perspective, any resources which explicitly connected by ODP
application (like passing odp_pool_t in odp_pktio_open)
should be on the same node for the optimal performance.

IMO, We should have "get socked id" function to know where the pktio is
physically connected up and then connect the resource chain from the
application.

But the issue here is that application need to know the pktio socket id
without opening it.

something like below in HW perspective.

socket_id = odp_pktio_socket_id()
pool = odp_pool_create(socket_id...)
pktio = odp_pktio_open(pool)

and to make sure to run odp_pktin_recv() on the socket_id which
was created earlier.

Jerin

> Jerin do you have any comments here?
> 
> regards,
> Nikolay Nikolaev
> 
> >
> >
> > Signed-off-by: Bill Fischofer <bill.fischo...@linaro.org>
> > ---
> >  include/odp/api/spec/cpu.h | 25 +++++++++++++++++++++++++
> >  1 file changed, 25 insertions(+)
> >
> > diff --git a/include/odp/api/spec/cpu.h b/include/odp/api/spec/cpu.h
> > index f0e20c4..d383c3b 100644
> > --- a/include/odp/api/spec/cpu.h
> > +++ b/include/odp/api/spec/cpu.h
> > @@ -36,6 +36,31 @@ extern "C" {
> >  int odp_cpu_id(void);
> >
> >  /**
> > + * CPU socket id
> > + *
> > + * Returns the socket id associated with the calling CPU on NUMA systems.
> > + * Socket ID numbering is system specific.
> > + *
> > + * @return Socket ID of the calling CPU
> > + * @retval ODP_SOCKET_ID_ANY If the caller is not running on a NUMA system.
> > + */
> > +uint32_t odp_cpu_socket_id(void);
> > +
> > +/**
> > + * CPU socket id of designated CPU
> > + *
> > + * Returns the socket id associated with a specific CPU on NUMA systems.
> > + * Socket ID numbering is system specific.
> > + *
> > + * @param cpu_id ID of the CPU for which socket ID information is 
> > requested.
> > + *
> > + * @return Socket ID of the designated CPU
> > + * @retval ODP_SOCKET_ID_ANY If the specified CPU is unknown or caller is
> > + *                           not running on a NUMA system.
> > + */
> > +uint32_t odp_cpu_socket_id_cpu(int cpu_id);
> > +
> > +/**
> >   * CPU count
> >   *
> >   * Report the number of CPU's available to this ODP program.
> > --
> > 2.5.0
> >
> > _______________________________________________
> > lng-odp mailing list
> > lng-odp@lists.linaro.org
> > https://lists.linaro.org/mailman/listinfo/lng-odp
_______________________________________________
lng-odp mailing list
lng-odp@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/lng-odp

Reply via email to