From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:42280) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SSDxx-0004kg-DF for qemu-devel@nongnu.org; Wed, 09 May 2012 16:58:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SSDxv-0008Bw-8I for qemu-devel@nongnu.org; Wed, 09 May 2012 16:58:32 -0400 Received: from e1.ny.us.ibm.com ([32.97.182.141]:49775) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SSDxv-00083r-3Y for qemu-devel@nongnu.org; Wed, 09 May 2012 16:58:31 -0400 Received: from /spool/local by e1.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 9 May 2012 16:58:20 -0400 Received: from d01relay03.pok.ibm.com (d01relay03.pok.ibm.com [9.56.227.235]) by d01dlp02.pok.ibm.com (Postfix) with ESMTP id 891366E8073 for ; Wed, 9 May 2012 16:56:28 -0400 (EDT) Received: from d01av02.pok.ibm.com (d01av02.pok.ibm.com [9.56.224.216]) by d01relay03.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id q49KuSxi126890 for ; Wed, 9 May 2012 16:56:28 -0400 Received: from d01av02.pok.ibm.com (loopback [127.0.0.1]) by d01av02.pok.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id q49KuPuO006012 for ; Wed, 9 May 2012 17:56:27 -0300 Message-ID: <4FAAD9F5.1090909@us.ibm.com> Date: Wed, 09 May 2012 15:56:21 -0500 From: Anthony Liguori MIME-Version: 1.0 References: <4FAAC3A3.5040503@siemens.com> <4FAAC521.5000907@msgid.tls.msk.ru> <4FAAC6B2.7040009@siemens.com> <4FAACA0A.5040602@us.ibm.com> <4FAACC0F.9080702@siemens.com> <4FAACD2F.30702@us.ibm.com> <4FAACF69.50600@siemens.com> In-Reply-To: <4FAACF69.50600@siemens.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 1.1] coroutine: Avoid ucontext usage on i386 Linux host List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jan Kiszka Cc: Kevin Wolf , Peter Maydell , Michael Tokarev , qemu-devel On 05/09/2012 03:11 PM, Jan Kiszka wrote: > On 2012-05-09 17:01, Anthony Liguori wrote: >> On 05/09/2012 02:57 PM, Jan Kiszka wrote: >>> On 2012-05-09 16:48, Anthony Liguori wrote: >>>> On 05/09/2012 02:34 PM, Jan Kiszka wrote: >>>>>> Can't we resort to the SIGUSR1 workaround for the time being, while >>>>>> no RT signals are in actual use, and just have the time to let the >>>>>> kernel side to fix the things up before some actual RTsig user will >>>>>> emerge in qemu? I think it is a bit more conservative approach, >>>>>> especially having in mind the minority of users this issue affects >>>>>> (only 32/64 mixed environment). I'd favor for this variant, and >>>>>> it looks like I'm the "main" 32/64bit user of qemu in this world :) >>>>> >>>>> Most conservative is definitely this patch, not switching to SIGUSR1, >>>>> hoping that no other RT signal user shows up until current kernel are no >>>>> longer in use. >>>> >>>> Sorry, how is using a totally different code path more conservative than using a >>>> different signal number? >>> >>> If the gthread version is not safe to use, why do we fall back to it? >> >> It's safe, but it's significantly slower. > > OK. Then what about sigaltstack (once fixed)? Is it also slower? I don't know, performance testing would need to be done. > If not, > can we converge over it? I would really hate staying with this time bomb > of broken RT signals unless someone tells me we will kick out all these > coroutines rather sooner than later. AFAICT, neither SIGUSR1 or SIGUSR2 are used today. We only use SIG_IPI today. We could easily #define SIG_IPI to SIGUSR1 unconditionally today. We used to use SIGUSR2 for posix-aio but that was ages ago. AFAICT, it's only used for sigaltstack now. I don't see where this "time bomb" comes from. I think it's perfect reasonable that if we end up needing more signals (after exhausting SIGUSR1/SIGUSR2) we simply require a fixed kernel for 32bit on 64bit. Regards, Anthony Liguori > > Jan >