qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Thread safety of coroutine-sigaltstack


From: Paolo Bonzini
Subject: Re: Thread safety of coroutine-sigaltstack
Date: Wed, 20 Jan 2021 17:50:48 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0

On 20/01/21 17:26, Max Reitz wrote:
Now, this all seems obvious to me, but I’m wondering... If coroutine-sigaltstack really couldn’t create coroutines concurrently,
 why wouldn’t we have noticed before?  I mean, this new backup case
is kind of a stress test, yes, but surely we would have seen the
problem already, right?  That’s why I’m not sure whether my analysis
is correct.

Probably the BQL was hiding the issue?

Anyway, I’ve attached a patch that wraps the whole
SIGUSR2 handling section in a mutex, and that makes 256 pass reliably
with Vladimir’s async backup series.  Besides being unsure whether
the problem is really in coroutine-sigaltstack, I also don’t know
whether getting out the big guns and wrapping everything in the mutex
is the best solution.  So, it’s an RFC, I guess.

I think that's fine.  The coroutine pool will hide scalability issues.

Paolo




reply via email to

[Prev in Thread] Current Thread [Next in Thread]