Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750998AbWEPBaf (ORCPT ); Mon, 15 May 2006 21:30:35 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1750999AbWEPBaf (ORCPT ); Mon, 15 May 2006 21:30:35 -0400 Received: from e2.ny.us.ibm.com ([32.97.182.142]:1409 "EHLO e2.ny.us.ibm.com") by vger.kernel.org with ESMTP id S1750972AbWEPBae (ORCPT ); Mon, 15 May 2006 21:30:34 -0400 From: Darren Hart Organization: IBM Linux Technology Center To: Ingo Molnar Subject: Re: rt20 scheduling latency testcase and failure data Date: Mon, 15 May 2006 18:30:22 -0700 User-Agent: KMail/1.9.1 Cc: Lee Revell , lkml , Thomas Gleixner , Mike Galbraith , Steven Rostedt , Florian Schmidt References: <200605121924.53917.dvhltc@us.ibm.com> <200605131601.31880.dvhltc@us.ibm.com> <20060515081341.GB24523@elte.hu> In-Reply-To: <20060515081341.GB24523@elte.hu> MIME-Version: 1.0 Content-Disposition: inline Content-Type: Multipart/Mixed; boundary="Boundary-00=_vsSaEX7aHog1xZz" Message-Id: <200605151830.23544.dvhltc@us.ibm.com> Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 28698 Lines: 535 --Boundary-00=_vsSaEX7aHog1xZz Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Content-Disposition: inline On Monday 15 May 2006 01:13, Ingo Molnar wrote: > > have you tried to use the latency tracer to capture this latency? It is > programmable to a high degree. (I've attached trace-it.c that shows how > to use it) > ... > looking at the highlevel traces should give you a quick idea of what's > going on, and then you can zoom into the time period that triggers the > long latency. (but feel free to also send these traces to us, preferably > in bzip2 -9 format.) Following Ingo's example I have included the modified test case (please see the original mail for librt.h) that starts the trace before each sleep and disables it after we wake up. If we have missed a period, we print the trace. My initial trace (lt_01.log.bz2) contained entries like the following: -0 2...1 24us!: default_idle (cpu_idle) -0 2D..1 1609us : smp_apic_timer_interrupt (c0100c80 0 0) -0 2...1 1635us!: default_idle (cpu_idle) -0 2D..1 4756us : smp_apic_timer_interrupt (c0100c80 0 0) I noticed the that there were long latencies (as high as 3ms) all related to irq handling in the idle loop. I thought it might have something to do with the CPU going into some kind of a sleep state and taking a long time to wake up. John Stultz suggested I boot with idle=poll. The idle=poll trace (lt_02.log.bz2) had much smaller maximum latencies, like the following: -0 0D..1 1341us+: write_watchdog_counter (nmi_watchdog_tick) -0 0D..1 1441us : do_nmi (poll_idle) -0 0D..1 1445us+: write_watchdog_counter (nmi_watchdog_tick) -0 0D..1 1545us : do_nmi (poll_idle) All the longest latencies were related to the nmi watchdogs. Booting with idle=poll nmi_watchdog=0 unfortunately seemed to return to the original behavior - so perhaps the second test was just a fluke. This trace (lt_03.log.bz2) had entries like the following: -0 1...1 19us!: poll_idle (cpu_idle) -0 1D..1 1089us : smp_apic_timer_interrupt (c0100ccf 0 0) -0 1...1 1113us!: poll_idle (cpu_idle) -0 1D..1 4765us : smp_apic_timer_interrupt (c0100ccf 0 0) sched_la-2978 1D... 4798us!: init_fpu (math_state_restore) sched_la-2978 1D... 5088us : smp_apic_timer_interrupt (4b3b98e8 0 0) sched_la-2978 1D.h. 5103us!: irq_exit (smp_apic_timer_interrupt) sched_la-2978 1.... 5719us > sys_clock_gettime (00000001 b7f65378 0000007b) Finally I booted with idle=poll and nmi_watchdog=0. The very first run failed, (I've noticed that the first iteration seems to always hit PERIOD MISSED! while the second usually passes fine). It's still running a 1M iteration run with no more failures so far (100K so far). The latency tracer is a very interesting tool. I have a few questions/assumptions I'd like to run by you to make sure I understand the output of the latency trace: o ! in the delay column means there is a long latency here? o + in the delay column means there is a > 1us latency here? o > means entering the kernel from a sys_call? o < means returning from the sys_call? o : is not < or > o Why do I only see ~5ms of trace when it appears that I am seeing more like ~25ms between the time when I start and stop the trace? o What are the maximum latencies that get printed to /var/log/messages? What exacly do they measure? From what point to what point? -- Darren Hart IBM Linux Technology Center Realtime Linux Team --Boundary-00=_vsSaEX7aHog1xZz Content-Type: application/x-bzip2; name="lt_01.log.bz2" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="lt_01.log.bz2" QlpoOTFBWSZTWXERh4QAPSF/gH7+EAhob//3b2/fZL/v/+RgGL6n3t99OT6evndtvPfaI+97K9s9 3vTx17u8K96w9fFjg1oBFQpkChbKrCqRpoUAUaZZCfABaCSKaNEamymoe1Mk8SYxT1AepgQZMgYE HqPU9QNTyZEVAkaAGgAAAAAAAAADTakEmmTVDIA0AADQAAAAAACTUSZEE1NT1Mp5JgjQaNAeo0ME GQAepnqjQIkkIanqj09SGjaFPTSNNMjT0amRk2k09TynqGmgB6giSEBNCGp6EJ6hqng1RkeoGQAB oA9QMmvuip1wRA2WVV3oXMBFqDYCqKV3cGcZM1HhszabtjYWlLIzV33LVdJfvW5rKRAlVsZ/V1/x plq9ONqo7cxFS+K1BQDgioAVrHdIwgIAfzAVAPfEPyvN7ucH0zxivkH6FCmmm8CyNhpGzgTKSQz+ f1CC4Plvg/7oL5O/K4kwlPt52UZpt9ZQmJRDAYlAsc3XC+0APIKAQW+LSALcILSe/k1fAV+R9HvZ J34JPGImQO7zSXrW0g2vqWq9vK+JthceXE3FRuVUlU2qBYTNN1Ua/pJUBmxoMRIIbEVV4+qTIYBs Z7O1bVWCtl9VdNeOrwBk0yWS8I8jjaYSb6uwUa2yY2osTmq01AHQQIEAYXHndWvcCqVl+85tinFn CYJAJAJAJAJAJAJDhs30QhWixV0GzvSSzma8mtTZpFXoaC1xvWE2BImIobaVVVTNOCcbWZWOCpS7 MbjpmvyR1QckeSSaRkOHr5DnzYTewLKc7GOL8cBOH3tuMHa+Uk3YGAPvDCLEjFIgoo/A001J0JRU WNjcUAbBYCYgGxEwYKAceq8uLkTyQQFsBoQ9oyEqIckFqcilSSWNMlIwiKEKRZBkoV/N6c7IoYkg rAIkjIRYAYELWNXHZUEDw8z/329bdBBaqHrVFRqvmaAZs/bUaK9+XbwN/t2P1oIw2dAQAAH8ziFb KRP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JTEKI1FJKYrGI lDEdZqEwACh5fOch5+ro8EuMDlqSqoSvcxXsGpuXu63ZGILCzg9zNlCcdaesu9FDgSQvIOczHETu 85vdjkqquxZGDjp8zNobjO+MusNKoVkCJVnN5lbNbcZxni5BxIIo4reNKrPC+WraKrcUaUrCliW1 JaVQ2C8tW0UUldpFZta48srFEdA3pI7GBihzmpNQB6bDGTVarL0Xh5u+VHvZujVBKkSoqdc2Lg2b pVWzIrSR5XGhOElx7vanKlHnL4t46s0rJRljd2xtHIklZesWFNcwc5KeUtjHaO+cRfIDSjusx7XM w5W0y842ObcF3C1DnIDRLdwZN8yjAy5UzMl0sT3UzG+0nXROLiSW+jp0Owa0D2EnmE7x8zQ3dzhE SDm0dtQPX3q8UyTDQgtIJoJyShooKAQwH0g3yCCZdg3BTBA5ooDrvONSVIsTTxNt9oQgIXbSCfAM nro6oFRI1b/xdyRThQkHERh4QA== --Boundary-00=_vsSaEX7aHog1xZz Content-Type: application/x-bzip2; name="lt_02.log.bz2" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="lt_02.log.bz2" QlpoOTFBWSZTWQs8WvkAgHN/gH7+EAhob//3b2//ZL/v/+RgId9Pvtuu81vh2R7DfdtvAB8733Tf UTDOXCzBIKCRLsZrO47kT2kr0VEvCrIS21Hd3EqpVAUFm0AVSl9Yq6ZQnwAAA+53wkSSeRCbRGmU 9DRNlNMID1AAAANAeoNBKAaKUFKeU0wCNDQZGA0AIMmIyGmnqGgkaVUoZNDAmTQaaZDQNGmIyGEZ MINDCGEmkUVNqnqaeoyTEzQCYJiM1DACMAmBNMmgiSCJiKeibSmASNqaZCep+pHqeo9T1HlG0n6p hANN6oClJECaaaTImNSnpMhtTCaaAaD1ND1MgBoAd/jE/+yIe2yj543sSqWsW0a00lEQhwNN2Y8v H+tnK87uGWk8OaC7hvmbJenlvpIBCt2OXx9H5rco792UQY3VdSUMQJG8xIQotFkGwiAov/cFFRf4 xD92Dz9vV9UjSSBaQRFUX1Jx6nqk/m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MONTJkhCTa0ccLm5o44XNzRxwuaeJO5p4njm5o44XC5uaEcLm5 oO4XNzRxwubmjjhc3NDRpJvazv293bHaCNEaYay0NNNNNbdBNUiNEcHNUmHCObeCREsuCTiW7g4I OOZcHNUt3BwcHGHMuDgg45lwc1Sccy5t4JESjhc08S08S2pqvrONzeknGnlhZrSKgQaGFGiMDA0Q mSDgjm4ODg7m5lwcEHHBwQcc3cHBBxwcEHHN3BwcHJuZcHBBxwcHBxxzLg4I5uZcHBARrSHAgyrF sJ3ucd3T1I6V2K4yqtYo7Ta6HXOu7VVUt5JJJLklySSSSSSSSSTpJKNWdo7u70XEdO5vaLs6piZV 5fPT7GvV6cPldtVVbupJJJJJclqSSS1JckkhLeqqrd3UkklqS5JJJJJJJJJJJJRuYpntfgVx2PcK JvO46F0rZieuouYvc7IKiqVl5PV20r6Yswg6NMnX6dmw0ibvJyO7Zunqvgg5zSPNPFveVSru3MzE klyS5LUkklqVKUpSlVCdlIqssi8jAhDwMeNJbouNjQ0irbziwvS99LI+z5bfXniODiwZUNSnNeNp a01AXA/XLfiMqWxxx5HWjTAZIoh+EQED24OhaALVrVSxLE+GbAe9MQKQjxISH8hxJ/6eKg2FjvSL uSKcKEgFni18gA== --Boundary-00=_vsSaEX7aHog1xZz Content-Type: application/x-bzip2; name="lt_03.log.bz2" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="lt_03.log.bz2" QlpoOTFBWSZTWToejzQAL0R/gH7+EAhob//3b2/fZL/v/+RgFV9ffJ8Pu3sJ99eeg3dk7dyy56Pe bNt3r3O1SMqOjXLyNEjmzFtuzAByHWEK61vgDc+EkQhMNU9UabTyjQE08oGgZNAxNAADTT1Ain6N BqqQeoAaAAAAeiAAAAAASmIkSaaTKekaHqA0AAAAAAAD1AEKUFTaKfqammyJo0Gg0PUNAAABoAAA RJTRMIET0o9TelM1PSBoaYho09RoBkNBo0NBEkTQTSZMgp6aRqaZoTIZADQD01AAaA5eIqf+iCB6 LCgHl5hRkxBW0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LEVSkkUijroTqCvMQOBkIvABNxXWwEG VGgM1SkXYDtHkUctEhFNtyvFXTgnqVE5IcxDcUe0A9lsNtcrMpiFE5BgQ5GMrMiYMjznATcAMNPd yG7GsQ/a1z3TESde097Ug4BaZ5SpzFYMuJOVNZTAq6BCy7abGMHZNbqYslY+K4ZUXuHmGFGMbEsp O1qzgEVdUndPl3cw5cXZrBIrDkqampzFcREY5i5eA0vMPVqvZGxOkuM0DVWgOXSCbJQuaGxIQJAe yYiLWHALh2tVKLZAkPVjFMsSocJUoeIQo4CEng0rUwiyahliFBYjGrBLjCnY4qcxNpSbJRtVUO8G pbKkkktZNwBeNcKGSzDLWoUu1PNNN5eQ6uEjlbyYsFXudG1Npow1Bh3NNNNluo0N/D3gAg9jR3qB 9PlXyTdMZojSCaCa0oaKCi8OkG2AYbQ0BTBfJFV3XnVKkWJq6W7oaEICFtEE/YNb6qO1AqJGof8X ckU4UJA6Ho80 --Boundary-00=_vsSaEX7aHog1xZz Content-Type: text/x-csrc; charset="iso-8859-15"; name="sched_latency_lkml.c" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="sched_latency_lkml.c" /* Filename: sched_latency_lkml.c * Author: Darren Hart * Description: Measure the latency involved with periodic scheduling. * Compilation: gcc -O2 -g -D_GNU_SOURCE -I/usr/include/nptl -I -L/usr/lib/nptl -lpthread -lrt -lm sched_latency_lkml.c -o sched_latency_lkml * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * Copyright (C) IBM Corporation, 2006 * * 2006-May-10: Initial version by Darren Hart */ #include #include #include #include "librt.h" #define PRIO 98 //#define PERIOD 17*NS_PER_MS //#define ITERATIONS 100 #define ITERATIONS 10000 #define PERIOD 5*NS_PER_MS #define PASS_US 100 #define LATENCY_TRACE 1 #ifdef LATENCY_TRACE #define latency_trace_enable() \ system("echo 0 > /proc/sys/kernel/trace_all_cpus"); \ system("echo 1 > /proc/sys/kernel/trace_enabled"); \ system("echo 0 > /proc/sys/kernel/trace_freerunning"); \ system("echo 0 > /proc/sys/kernel/trace_print_at_crash"); \ system("echo 1 > /proc/sys/kernel/trace_user_triggered"); \ system("echo 0 > /proc/sys/kernel/trace_verbose"); \ system("echo 0 > /proc/sys/kernel/preempt_max_latency"); \ system("echo 0 > /proc/sys/kernel/preempt_thresh"); \ system("[ -e /proc/sys/kernel/wakeup_timing ] && echo 1 > /proc/sys/kernel/wakeup_timing"); \ system("echo 1 > /proc/sys/kernel/mcount_enabled"); #define latency_trace_start() gettimeofday(0,1) #define latency_trace_stop() gettimeofday(0,0) #define latency_trace_print() system("cat /proc/latency_trace"); #else #define latency_trace_enable() do { } while (0) #define latency_trace_start() do { } while (0) #define latency_trace_stop() do { } while (0) #define latency_trace_print() do { } while (0) #endif nsec_t start; int retval; void *periodic_thread(void *arg) { struct thread *t = (struct thread *)arg; int i; int delay, avg_delay = 0, start_delay, min_delay = 0x7FFFFFF, max_delay = 0; int failures = 0; nsec_t next=0, now=0, sched_delta=0, delta=0, prev=0; retval = 0; prev = start; next = start; now = rt_gettime(); start_delay = (now - start)/NS_PER_US; printf("ITERATION DELAY(US) MAX_DELAY(US) FAILURES\n"); printf("--------- --------- ------------- --------\n"); for (i = 1; i <= ITERATIONS; i++) { /* wait for the period to start */ next += PERIOD; prev = now; now = rt_gettime(); if (i > 1) latency_trace_stop(); if (next < now) { printf("\n\nPERIOD MISSED!\n"); printf(" scheduled delta: %8llu us\n", sched_delta/1000); printf(" actual delta: %8llu us\n", delta/1000); printf(" latency: %8llu us\n", (delta-sched_delta)/1000); printf("---------------------------------------\n"); printf(" previous start: %8llu us\n", (prev-start)/1000); printf(" now: %8llu us\n", (now-start)/1000); printf(" scheduled start: %8llu us\n", (next-start)/1000); printf("next scheduled start is in the past!\n"); retval = 1; latency_trace_print(); break; } latency_trace_start(); sched_delta = next - now; /* how long we should sleep */ delta = 0; do { rt_nanosleep(next - now); delta += rt_gettime() - now; /* how long we did sleep */ now = rt_gettime(); } while (now < next); /* start of period */ now = rt_gettime(); delay = (now - start - (nsec_t)i*PERIOD)/NS_PER_US; if (delay < min_delay) min_delay = delay; if (delay > max_delay) max_delay = delay; if (delay > PASS_US) failures++; avg_delay += delay; /* continuous status ticker */ //printf("%9i %9i %13i %8i\r", i, delay, max_delay, failures); //fflush(stdout); busy_work_ms(1); } avg_delay /= ITERATIONS; printf("\n\n"); printf("Start Latency: %4d us: %s\n", start_delay, start_delay < PASS_US ? "PASS" : "FAIL"); printf("Min Latency: %4d us: %s\n", min_delay, min_delay < PASS_US ? "PASS" : "FAIL"); printf("Avg Latency: %4d us: %s\n", avg_delay, avg_delay < PASS_US ? "PASS" : "FAIL"); printf("Max Latency: %4d us: %s\n", max_delay, max_delay < PASS_US ? "PASS" : "FAIL"); printf("Failed Iterations: %d\n\n", failures); return NULL; } int main(int argc, char *argv[]) { int per_id, mas_id; printf("-------------------------------\n"); printf("Scheduling Latency\n"); printf("-------------------------------\n\n"); printf("Running %d iterations with a period of %d ms\n", ITERATIONS, PERIOD/NS_PER_MS); printf("Expected running time: %d s\n\n", (nsec_t)ITERATIONS*PERIOD/NS_PER_SEC); latency_trace_enable(); start = rt_gettime(); per_id = create_fifo_thread(periodic_thread, (void*)0, PRIO); join_thread(per_id); join_threads(); return retval; } --Boundary-00=_vsSaEX7aHog1xZz-- - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/