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

Daniel Horn danielrh at dropbox.com
Sat Apr 5 19:36:13 CDT 2014


What about using a lighter weight locking primitive such as one that does not require a syscall?- Daniel

On Sat, Apr 5, 2014 at 5:24 PM, Ken Thomases <ken at 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20140405/96c68db3/attachment.html>


More information about the wine-devel mailing list