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?