Messages in this thread | | | From | "Metzger, Markus T" <> | Date | Tue, 15 Sep 2009 13:07:26 +0100 | Subject | RE: [patch] x86, perf_counter, bts: optimize BTS overflow handling |
| |
>-----Original Message----- >From: Pavel Machek [mailto:pavel@ucw.cz] >Sent: Tuesday, September 15, 2009 1:34 PM >To: Metzger, Markus T >Cc: mingo@elte.hu; tglx@linutronix.de; hpa@zytor.com; markus.t.metzger@gmail.com; linux- >kernel@vger.kernel.org; a.p.zijlstra@chello.nl >Subject: Re: [patch] x86, perf_counter, bts: optimize BTS overflow handling > >On Tue 2009-09-08 08:31:10, Markus Metzger wrote: >> Draining the BTS buffer on a buffer overflow interrupt takes too long >> resulting in a kernel lockup when tracing the kernel. > >Wait. If 'takes too long' leads to 'lockup'...solution is not making >it faster. Solution should be making kernel robust -- maybe disable >tracing when it can't keep up or something...? or maybe disabling >interrupt until you handle the previous one...? > Pavel
Maybe I got the term 'lockup' wrong? The symptom is that the system gets slower and then seems to freeze. When I disable tracing in such a frozen system (via a debugger), it recovers. When I attached the debugger, one core had been busy processing the BTS overflow, the other core had been waiting for an smp call response.
BTS overflow interrupts are processed one after the other. BTS is disabled as long as we handle the interrupt. We do not trace overflow handling; but we trace all the rest.
The problem as I see it is that the kernel generates too much trace and it takes too long to generate samples out of it so that it does not make progress, any more - or very very slow progress.
Optimizing sample generation allows it to make progress fast enough.
regards, markus.
--------------------------------------------------------------------- Intel GmbH Dornacher Strasse 1 85622 Feldkirchen/Muenchen Germany Sitz der Gesellschaft: Feldkirchen bei Muenchen Geschaeftsfuehrer: Douglas Lusk, Peter Gleissner, Hannes Schwaderer Registergericht: Muenchen HRB 47456 Ust.-IdNr. VAT Registration No.: DE129385895 Citibank Frankfurt (BLZ 502 109 00) 600119052
This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies.
| |