<!DOCTYPE html><html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<Snipped><span style="white-space: pre-wrap">
</span>
<blockquote type="cite" cite="mid:PR3PR08MB585076DE53D0FEBFFDEE28999F942@PR3PR08MB5850.eurprd08.prod.outlook.com">
<pre class="moz-quote-pre" wrap=""></pre>
<blockquote type="cite">
<pre class="moz-quote-pre" wrap="">-unsigned int rte_get_next_lcore(unsigned int i, int skip_main, int wrap)
+#define LCORE_GET_LLC \
+ "ls -d /sys/bus/cpu/devices/cpu%u/cache/index[0-9] | sort -r
| grep -m1 index[0-9] | awk -F '[x]' '{print $2}' "
</pre>
</blockquote>
</blockquote>
<span style="white-space: pre-wrap">
</span>
<blockquote type="cite" cite="mid:PR3PR08MB585076DE53D0FEBFFDEE28999F942@PR3PR08MB5850.eurprd08.prod.outlook.com">
<pre class="moz-quote-pre" wrap="">This won't work for some SOCs.</pre>
</blockquote>
<p>Thank you for your response. please find our response and queries
below</p>
<blockquote type="cite" cite="mid:PR3PR08MB585076DE53D0FEBFFDEE28999F942@PR3PR08MB5850.eurprd08.prod.outlook.com">
<pre class="moz-quote-pre" wrap="">
How to ensure the index you got is for an LLC?</pre>
</blockquote>
<p>we referred to <a href="https://www.kernel.org/doc/html/latest/admin-guide/cputopology.html">How
CPU topology info is exported via sysfs — The Linux Kernel
documentation</a> and <a href="https://github.com/torvalds/linux/blob/master/Documentation/ABI/stable/sysfs-devices-system-cpu">linux/Documentation/ABI/stable/sysfs-devices-system-cpu
at master · torvalds/linux (github.com)</a> and</p>
<p><a href="https://zhiyisun.github.io/2016/06/25/Get-Cache-Info-in-Linux-on-ARMv8-64-bit-Platform.html">Get
Cache Info in Linux on ARMv8 64-bit Platform
(zhiyisun.github.io)</a>. Based on my current understanding on
bare metal 64Bit Linux OS (which is supported by most Distros),
the cache topology are populated into sysfs.</p>
<p></p>
<blockquote type="cite" cite="mid:PR3PR08MB585076DE53D0FEBFFDEE28999F942@PR3PR08MB5850.eurprd08.prod.outlook.com">
<pre class="moz-quote-pre" wrap=""> Some SOCs may only show upper-level caches here, therefore cannot be use blindly without knowing the SOC.</pre>
</blockquote>
Can you please help us understand
<p>1. if there are specific SoC which do not populate the
information at all? If yes are they in DTS? <br>
</p>
<p>2. If there are specific SoC which does not export to hypervisor
like Qemu or Xen?<br>
</p>
<p><br>
</p>
<p>We can work together to make it compatible.<br>
</p>
<blockquote type="cite" cite="mid:PR3PR08MB585076DE53D0FEBFFDEE28999F942@PR3PR08MB5850.eurprd08.prod.outlook.com">
<pre class="moz-quote-pre" wrap="">
Also, unacceptable to execute a shell script, consider implementing in C.</pre>
</blockquote>
As the intention of the RFC is to share possible API and Macro, we
welcome suggestions on the implementation as agreed with Stepehen. <br>
<blockquote type="cite" cite="mid:PR3PR08MB585076DE53D0FEBFFDEE28999F942@PR3PR08MB5850.eurprd08.prod.outlook.com">
<pre class="moz-quote-pre" wrap="">
--wathsala
</pre>
</blockquote>
</body>
</html>