<span id="mailbox-conversation">What about using a lighter weight locking primitive such as one that does not require a syscall?</span><div class="mailbox_signature">- Daniel</div>
<br><br><div class="gmail_quote"><p>On Sat, Apr 5, 2014 at 5:24 PM, Ken Thomases <span dir="ltr"><<a href="mailto:ken@codeweavers.com" target="_blank">ken@codeweavers.com</a>></span> wrote:<br></p><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><p>On Apr 5, 2014, at 5:25 PM, Daniel Horn wrote:
<br><br>> The call to server_enter_uninterrupted_section in server_get_unix_fd
<br>> was causing 2 million syscalls over the span of several seconds when
<br>> launching many popular application suites and it was causing
<br>> significant performance overhead.
<br>> 
<br>> Switching those two lines resolves the problem entirely because the
<br>> cache is sized such that it nearly never misses.
<br><br>You can't call get_cached_fd() without entering the critical section because the critical section is protecting the fd cache.  Your patch opens the code up to race conditions and data inconsistency.
<br><br>-Ken
<br><br></p></blockquote></div><br>