On Sat, Apr 5, 2014 at 5:24 PM, Ken Thomases <ken@codeweavers.com> wrote:
On Apr 5, 2014, at 5:25 PM, Daniel Horn wrote:
> The call to server_enter_uninterrupted_section in server_get_unix_fd
> was causing 2 million syscalls over the span of several seconds when
> launching many popular application suites and it was causing
> significant performance overhead.
>
> Switching those two lines resolves the problem entirely because the
> cache is sized such that it nearly never misses.
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.
-Ken