[PATCH v2 2/3] wineusd.sys: Add new service to update user shared data continuously.

Rémi Bernon rbernon at codeweavers.com
Fri Apr 24 08:29:19 CDT 2020


On 4/24/20 3:22 PM, Paul Gofman wrote:
> On 4/24/20 16:06, Rémi Bernon wrote:
>> On 4/24/20 2:54 PM, Paul Gofman wrote:
>>>
>>
>> The problem with having a single page is that Wine is able to emulate
>> different windows versions for every process, and the so USD may
>> contain different data for every process. It would maybe be reduced to
>> one page per version or something like that but it's also simpler to
>> have a page per process.
> 
> Oh yeah, I see, thanks.
> 
>>
>>
>> But I also understand that some applications expect timestamps to be
>> updated very regularly. We could try to do that on every server
>> request, but at the risk that the regularity to be less accurate than
>> having a separate thread do the work. And having a separate thread in
>> wineserver for this sole purpose starts introducing concurrency
>> anyway, even if it's for a simple task, and I got the impression that
>> this is never going to be OK.
>>
> What I am missing is what can be bad about an independent thread
> sleeping and waking to update its own pages in memory. The rest of
> wineserver can even not share its memory with it, there is no great
> difference between thread itself (unless it wants to do share and sync
> something with the main thread) and a separate process, except for
> signal handling. Maybe signal handling is more difficult to isolate
> cleanly than I thought? If yes, maybe it would be easier to consider
> native separate process spawned by wineserver instead of going through
> Win service infrastructure?
> 

My understanding is that it would still possibly require some 
synchronization when a new process is created or destroyed, especially 
if we need a page per process.

And once you have a second thread, then why not a third for some other 
"simple" task, etc. As I understand it, the single thread wineserver is 
a principle which suffers from no exception for the sake of simplicity. 
And that will hold until the moment where there's no other way -but I 
don't see that happening soon.
-- 
Rémi Bernon <rbernon at codeweavers.com>



More information about the wine-devel mailing list