Alan, somebody,<br><br>Want to look into this? (I'm told it was sent to the list, but was eaten....)<br><br><br><div class="gmail_quote">On Tue, Jun 10, 2008 at 2:36 PM, Gary Zhu <<a href="mailto:Gzhu@ironplanet.com">Gzhu@ironplanet.com</a>> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div link="blue" vlink="purple" lang="EN-US">
<div>
<p>Is there any reason to NOT lock down paged memory, when
running memcached as daemon ? </p>
<p> </p>
<p>With current code, -d will effectively ignore –k. </p>
<p> </p>
<p>I re-arranged the current code as following:</p>
<p>From:</p>
<p> <span>mlockall</span></p>
<p><span> setuid</span></p>
<p><span> daemon</span></p>
<p><span> …child
process…</span></p>
<p><span> init</span></p>
<p> </p>
<p>To :</p>
<p style="text-indent: 9pt;"><span>daemon</span></p>
<p style="text-indent: 9pt;"><span> …child
process …</span></p>
<p style="text-indent: 9pt;"><span>mlockall</span></p>
<p style="text-indent: 9pt;"><span>setuid</span></p>
<p style="text-indent: 9pt;"><span>init</span></p>
<p style="text-indent: 9pt;"> </p>
<p style="text-indent: 9pt;">This made –d to work with –k.
</p>
<p> </p>
<p>The reason is that forked child process does not inherit
mlock. The modified code worked as expected on Solaris 10 and Linux 2.6.x
.</p>
<p style="text-indent: 9pt;"> </p>
<p>Let me know any downside of the change.</p>
<p> </p>
<p>- Gary</p>
<p> </p>
</div>
</div>
</blockquote></div><br>