From: Christian Borntraeger Subject: Re: [PATCH 2/6] kvm-s390: use hrtimer for clock wakeup from idle Date: Thu, 7 May 2009 12:34:58 +0200 Message-ID: <200905071234.58511.borntraeger@de.ibm.com> References: <1241534358-32172-1-git-send-email-ehrhardt@linux.vnet.ibm.com> <200905061436.13071.borntraeger@de.ibm.com> <4A02B5B4.6050701@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Cc: ehrhardt@linux.vnet.ibm.com, kvm@vger.kernel.org, Carsten Otte To: Avi Kivity Return-path: Received: from mtagate4.uk.ibm.com ([195.212.29.137]:42703 "EHLO mtagate4.uk.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753471AbZEGKfA (ORCPT ); Thu, 7 May 2009 06:35:00 -0400 Received: from d06nrmr1806.portsmouth.uk.ibm.com (d06nrmr1806.portsmouth.uk.ibm.com [9.149.39.193]) by mtagate4.uk.ibm.com (8.14.3/8.13.8) with ESMTP id n47AZ0fk032860 for ; Thu, 7 May 2009 10:35:00 GMT Received: from d06av04.portsmouth.uk.ibm.com (d06av04.portsmouth.uk.ibm.com [9.149.37.216]) by d06nrmr1806.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v9.2) with ESMTP id n47AYxY63014810 for ; Thu, 7 May 2009 11:34:59 +0100 Received: from d06av04.portsmouth.uk.ibm.com (loopback [127.0.0.1]) by d06av04.portsmouth.uk.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id n47AYxbQ022829 for ; Thu, 7 May 2009 11:34:59 +0100 In-Reply-To: <4A02B5B4.6050701@redhat.com> Content-Disposition: inline Sender: kvm-owner@vger.kernel.org List-ID: Am Thursday 07 May 2009 12:19:32 schrieb Avi Kivity: > Makes sense. > > Back when irqsave/irqrestore were expensive on x86 (P4 days, I think it > was ~100 cycles) there was talk of using a software irq disable flag > instead of using the hardware support. So > > - local_irq_disable() sets a flag > > - interrupt handlers check the flag, if set they schedule the interrupt > handler and return immediately > > - local_irq_restore() clears the flag and fires and scheduled handlers > > Now these operations are pretty cheap on x86, but maybe that can apply > to s390. Interesting idea. Nevertheless, I dont think it improve our situation. The affected instructions (stosm and stnsm) are more expensive than compare and swap, but its nowhere near the ~100 cycles of P4. Christian