<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Aptos;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
font-size:12.0pt;
font-family:"Aptos",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
span.EmailStyle19
{mso-style-type:personal-reply;
font-family:"Aptos",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:11.0pt;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt">Hi Dmitry,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">If I use grub for hugepages will the hugepages always be contiguous and we won’t see the mapping to memsegs issue?<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">I am investigating your option 2 you provided to see how much VIRT memory increases.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">Best Regards,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">Ed<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">From:</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"> Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
<br>
<b>Sent:</b> Saturday, September 7, 2024 4:36 PM<br>
<b>To:</b> Lombardo, Ed <Ed.Lombardo@netscout.com><br>
<b>Cc:</b> users <users@dpdk.org><br>
<b>Subject:</b> Re: hugepage mapping to memseg failure<o:p></o:p></span></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0" width="100%" style="width:100.0%;background:#97D700">
<tbody>
<tr>
<td style="padding:3.75pt 3.75pt 3.75pt 3.75pt">
<p class="MsoNormal" align="center" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;text-align:center">
<strong><span style="font-family:"Arial",sans-serif;color:black">External Email:</span></strong><span style="font-family:"Arial",sans-serif;color:black"> This message originated outside of NETSCOUT. Do not click links or open attachments unless you recognize
the sender and know the content is safe.</span><span style="color:black"><o:p></o:p></span></p>
</td>
</tr>
</tbody>
</table>
</div>
<div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt">Hi Ed, <o:p></o:p></p>
<div>
<div>
<p class="MsoNormal">On Fri, Sep 6, 2024, 16:43 Lombardo, Ed <<a href="mailto:Ed.Lombardo@netscout.com" target="_blank">Ed.Lombardo@netscout.com</a>> wrote:<o:p></o:p></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">The rte_eal_init() arguments are:<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">‘app_name, -c0x2, -n4, --socket-mem=2048, --legacy-mem, --no-telemetry’<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Could it be that the hugpages are not contiguous and reboot clears this issue, not able to confirm.<o:p></o:p></p>
</div>
</div>
</blockquote>
</div>
</div>
<div>
<p class="MsoNormal">Yes, this is likely the root cause. Since you're building DPDK yourself, you can print cur->physaddr around line 900 (see the link below). In legacy mode, DPDK leaves "holes" (unused elements) in memory segment lists between pages that
are not physically contiguous. Because in your case the segment list has only two elements, there is no room for two segments for two hugepages plus a hole segment between them.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><a href="https://urldefense.com/v3/__http:/git.dpdk.org/dpdk/tree/lib/eal/linux/eal_memory.c*n832__;Iw!!Nzg7nt7_!B063yUJ-LVej5lTsv6gheha4kgXi82WclmIX3OgY_6c5BaWYh9OxqpMNNAkIbCDLGWTc8Vc5CQDqOMooFHKBNysj3Aw$" target="_blank">http://git.dpdk.org/dpdk/tree/lib/eal/linux/eal_memory.c#n832</a><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Your options then are:<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">- not using legacy memory mode;<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">- increasing *_MAX_MEM_MB_* constants to 3072 (will also increase VIRT). <o:p></o:p></p>
</div>
</div>
</div>
</body>
</html>