From: Dan Magenheimer Subject: RE: million cycle interrupt Date: Tue, 14 Apr 2009 17:10:55 +0000 (GMT) Message-ID: <49a04d05-4593-4fc6-9941-1aa54515d1dc@default> References: Mime-Version: 1.0 Content-Type: text/plain; charset=Windows-1252 Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: dan.magenheimer@oracle.com, Keir Fraser , "Tian, Kevin" , "Xen-Devel (E-mail)" List-Id: xen-devel@lists.xenproject.org > I'll take a look at that next. It appears that the call to smp_timer_broadcast_ipi() in timer_interrupt() is the cycle hog. And it definitely appears to be a scaleability problem! maxcpus=3D4: avg=3D1600, max=3D15000 (cycles, rounded) maxcpus=3D5: avg=3D2000, max=3D24000 maxcpus=3D6: avg=3D83000, max=3D244000 maxcpus=3D7: avg=3D198000, max=3D780000 maxcpus=3D8: avg=3D310000, max=3D1027000 The load is a 4vcpu PV EL5u2 32-bit domain continually compiling linux-2.6.28 with -j80. I killed the load after only a few minutes, so the max might get worse. On the other hand, just booting dom0 seems to put max in about the same range. Dan > -----Original Message----- > From: Dan Magenheimer=20 > Sent: Tuesday, April 14, 2009 9:39 AM > To: Keir Fraser; Tian, Kevin; Xen-Devel (E-mail) > Subject: RE: [Xen-devel] million cycle interrupt >=20 >=20 > > You could validate that quite easily by adding your own timer=20 > > read wrapped > > in TSC reads. Actually a PIT read, even though it requires=20 > > multiple accesses > > over the ISA bus, should take less than 10us. >=20 > I'll take a look at that next. Taking average as > well as max, the timer_interrupt interrupt is > AVERAGING over 300K cycles (with 8 processors). > This interrupt is 100Hz, correct? If so, that means > a full 1% of one processor's cycles are spent > processing timer_interrupts! >=20 > The MSI interrupts have large max, but the average > is relatively small (under 5000 cycles). It still > would be nice to know what is causing the max > value, especially since it only occurs for me with > more than 4 processors. >=20 > But first, Keir, would you take this patch so that this > kind of issue can be more easily diagnosed in the future? > If you're worried about the extra two global variable > reads, you could wrap an "#ifndef NDEBUG" around it > (with #else #define opt_measure_irqs 0), but it might > be nice to have this diagnostic capability in released > code. >