<div dir="ltr">I believe that timerfd is used automatically in the core if it detects a system supporting it. However, I don&#39;t know how to really be sure.. :) One thing though, if you just startup FS, if it doesn&#39;t try to do clock calibration during startup, I think it is using timerfd stuff, so that might be a way to &quot;know&quot;...<div>
<br></div><div>Also, when running FS, you can try timer_test command (inside FS console) and check out the results in there.</div><div><br></div><div>/Peter</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">
2013/8/29 Jayanth Acharya <span dir="ltr">&lt;<a href="mailto:jayachar88@gmail.com" target="_blank">jayachar88@gmail.com</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr"><div><div><div><div><div><div><div>Thanks Jeff. Reading the mod_timerfd wiki page, I see that there are 2 approaches to using timerfd, <br><br></div>1. Using the loadable module i.e. mod_timerfd (requiring me to build this module and then ensure it is loaded)<br>

</div>2. Using the support of timerfd now available in FS core itself (requiring me to just enable it in the switch.conf file)<br><br></div>By default neither of those 2 seem to be true. I am on what as the Git HEAD last week - 22nd Aug 2013, so pretty recent source. However, it when I adopted the 2nd approach, i.e. enable timerfd use in FS core, by enabling the config in switch.conf, it didn&#39;t have the desired effect. Perhaps indicating that my problems might not be limited to just the timer resolution !!<br>

<br></div>Using the method described here: <br><a href="http://www.advenage.com/topics/linux-timer-interrupt-frequency.php" target="_blank">http://www.advenage.com/topics/linux-timer-interrupt-frequency.php</a><br><br></div>
I tested and found that on my FS machine, the timer resolution available is already pretty good -- in the ~3KHz range, so shouldn&#39;t be an issue, if FS core is indeed correctly using timerfd.<br>
<br>---<br>kernel timer interrupt frequency is approx. 3401 Hz<br>jayachar@dabbian1:~$ ./timer_resolution_test<br>kernel timer interrupt frequency is approx. 3401 Hz<br>jayachar@dabbian1:~$ ./timer_resolution_test<br>kernel timer interrupt frequency is approx. 3448 Hz<br>

jayachar@dabbian1:~$ ./timer_resolution_test<br>kernel timer interrupt frequency is approx. 3021 Hz<br>jayachar@dabbian1:~$ ./timer_resolution_test<br>kernel timer interrupt frequency is approx. 3067 Hz<br>---<br><br></div>

I have already check that my kernel has the TIMERFD option enabled in the build, which explains (perhaps) the ~3KHz resolution I see.<br><br></div>So the question now is, is FS really using the timerfd logic in it&#39;s core properly, or do I need to try the mod_timerfd method as well !! (That&#39;s a rhetorical question... I will go ahead and try anyway, disabling the FS core option to use timerfd, as per the Wiki).<br>

<div><div><br></div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Aug 29, 2013 at 11:21 AM, Jeff Leung <span dir="ltr">&lt;<a href="mailto:jleung@v10networks.ca" target="_blank">jleung@v10networks.ca</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div link="blue" vlink="purple" lang="EN-US"><div><p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">If I can recall correctly, timerfd will be used automatically regardless in recent versions of FreeSWITCH if it’s available.<u></u><u></u></span></p>

<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"><u></u> <u></u></span></p><div style="border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt">

<div><div style="border:none;border-top:solid #b5c4df 1.0pt;padding:3.0pt 0in 0in 0in"><p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;">From:</span></b><span style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;"> <a href="mailto:freeswitch-users-bounces@lists.freeswitch.org" target="_blank">freeswitch-users-bounces@lists.freeswitch.org</a> [mailto:<a href="mailto:freeswitch-users-bounces@lists.freeswitch.org" target="_blank">freeswitch-users-bounces@lists.freeswitch.org</a>] <b>On Behalf Of </b>Jayanth Acharya<br>

<b>Sent:</b> Wednesday, August 28, 2013 9:35 PM<br><b>To:</b> FreeSWITCH Users Help<br><b>Subject:</b> [Freeswitch-users] CONFIG_HZ=1000 vs mod_timerfd -- preferred approach<u></u><u></u></span></p></div></div><div><div>

<p class="MsoNormal"><u></u> <u></u></p><div><div><div><p class="MsoNormal">Assuming that one has full control over the kernel configuration and FS build / config options, is there a preferred mechanism between the 2 for letting FS have access to high resolution timers, i.e.<u></u><u></u></p>

</div><ul type="disc"><li class="MsoNormal">CONFIG_HZ=1000<u></u><u></u></li><li class="MsoNormal">mod_timerfd<u></u><u></u></li></ul><p>This was one step I missed in my FS setup, and I think it might explain the extremely choppy, broken, garbled announcement I hear when I call into my gsmopen EP via phone.<u></u><u></u></p>

<p class="MsoNormal">J<u></u><u></u></p></div></div></div></div></div></div></div><br>_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org" target="_blank">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>
<a href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a><br>
<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br></blockquote></div><br></div>
<br>_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>
<a href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a><br>
<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br></blockquote></div><br></div>