[PATCH] ntdll: Don't enter uninterrupted section when get_cached_fd hits

Ken Thomases ken at codeweavers.com
Sat Apr 5 19:24:30 CDT 2014


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




More information about the wine-devel mailing list