DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] Feature Discussion: CPU topology detection on FreeBSD
@ 2021-01-28  4:07 Oscar Zhao
  2021-01-29 10:05 ` Bruce Richardson
  0 siblings, 1 reply; 6+ messages in thread
From: Oscar Zhao @ 2021-01-28  4:07 UTC (permalink / raw)
  To: dev

Hello dpdk devs,

I would like to discuss the feasibility of implementing CPU topology detection on FreeBSD. Currently both eal_cpu_core_id() and eal_cpu_socket_id() in rte_eal library always return 0 on FreeBSD, making NUMA-aware development impossible without resorting to external libraries or system APIs.

The CPU topology information is available via sysct kern.sched.topology_spec. The only issue is that the return value is an XML formatted object (see https://forums.freebsd.org/threads/number-of-cpus-and-cores.41299/). (https://forums.freebsd.org/threads/number-of-cpus-and-cores.41299/) I'm not sure how feasible it is to parse XML inside DPDK.

On a side note, obtaining the physical NUMA node id of a core is easy - sysctl dev.cpu.[cpu#].%domain returns the corresponding node id but I have yet found a straightforward way to detect hyperthreads besides the XML thing.

Oscar

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-02-10 16:02 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-28  4:07 [dpdk-dev] Feature Discussion: CPU topology detection on FreeBSD Oscar Zhao
2021-01-29 10:05 ` Bruce Richardson
2021-01-29 12:52   ` Burakov, Anatoly
2021-01-29 13:45     ` Bruce Richardson
2021-02-10 16:01       ` Burakov, Anatoly
2021-01-29 22:24     ` Oscar Zhao

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).