From owner-svn-src-head@FreeBSD.ORG Sat Sep 18 11:01:17 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BD3D31065675; Sat, 18 Sep 2010 11:01:17 +0000 (UTC) (envelope-from Daan@vehosting.nl) Received: from VM01.VEHosting.nl (vm01.vehosting.nl [85.17.51.140]) by mx1.freebsd.org (Postfix) with ESMTP id 6E1208FC20; Sat, 18 Sep 2010 11:01:17 +0000 (UTC) Received: from [192.168.45.11] (180-161.ftth.onsbrabantnet.nl [88.159.161.180]) (authenticated bits=0) by VM01.VEHosting.nl (8.14.3/8.13.8) with ESMTP id o8IAYKtN061136; Sat, 18 Sep 2010 12:34:20 +0200 (CEST) (envelope-from Daan@vehosting.nl) From: Daan Vreeken Organization: VEHosting.nl To: Alexander Motin Date: Sat, 18 Sep 2010 12:34:17 +0200 User-Agent: KMail/1.9.10 References: <201009130725.o8D7PZX8073399@svn.freebsd.org> In-Reply-To: <201009130725.o8D7PZX8073399@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <201009181234.17851.Daan@vehosting.nl> x-ve-auth-version: mi-1.0.3 2008-05-30 - Copyright (c) 2008 - Daan Vreeken - VEHosting x-ve-auth: authenticated as 'pa4dan' on VM01.VEHosting.nl Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r212541 - in head/sys: amd64/amd64 amd64/include dev/acpica i386/i386 i386/include kern mips/include mips/mips pc98/pc98 powerpc/aim powerpc/booke powerpc/include powerpc/powerpc sparc6... X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Sep 2010 11:01:17 -0000 Hi Alexander, On Monday 13 September 2010 09:25:35 Alexander Motin wrote: > Author: mav > Date: Mon Sep 13 07:25:35 2010 > New Revision: 212541 > URL: http://svn.freebsd.org/changeset/base/212541 > > Log: > Refactor timer management code with priority to one-shot operation mode. > The main goal of this is to generate timer interrupts only when there is > some work to do. When CPU is busy interrupts are generating at full rate > of hz + stathz to fullfill scheduler and timekeeping requirements. But > when CPU is idle, only minimum set of interrupts (down to 8 interrupts > per second per CPU now), needed to handle scheduled callouts is executed. > This allows significantly increase idle CPU sleep time, increasing effect > of static power-saving technologies. Also it should reduce host CPU load on > virtualized systems, when guest system is idle. [snip] When re-basing an ARM system running an older -current with local patches/additions to a more recent version of -current (around 2010-09-16-ish) I found out that the resulting kernel stopped booting. To factor out our local changes I've tried to boot a 'SHEEVAPLUG' kernel without modifications. This kernel also fails to boot. It just stops right after : ... ehci0: mem 0xf1050000-0xf1050fff irq 48,19 on simplebus0 ehci0: [FILTER] ehci0: [ITHREAD] usbus0: EHCI version 1.0 usbus0: set host controller mode usbus0: on ehci0 Timecounters tick every 1.000 msec usbus0: 480Mbps High Speed USB v2.0 Doing a binary search I've found that a kernel built from sources directly before your commit boots normally, but with this commit the board hangs during boot. The debugger is accessible when the system 'hangs'. 'ps' shows: KDB: enter: Line break on console [ thread pid 10 tid 100002 ] Stopped at kdb_enter+0x48: ldrb r15, [r15, r15, ror r15]! db> ps pid ppid pgrp uid state wmesg wchan cmd 5 0 0 0 DL ccb_scan 0xc0bc49ec [xpt_thrd] 13 0 0 0 DL (threaded) [usb] 100023 D - 0xc3500d0c [usbus0] 100022 D USBWAIT 0xc0bca57c [usbus0] 100021 D - 0xc3500cac [usbus0] 100020 D - 0xc3500c7c [usbus0] 12 0 0 0 DL - 0xc0bca57c [yarrow] 4 0 0 0 DL - 0xc0bc7d38 [g_down] 3 0 0 0 DL - 0xc0bc7d34 [g_up] 2 0 0 0 DL - 0xc0bc7d2c [g_event] 11 0 0 0 WL (threaded) [intr] 100019 I [intr19: ehci0] 100018 I [swi0: uart uart] 100017 I [intr13: mge0] 100016 I [intr12: mge0] 100015 I [swi6: Giant taskq] 100013 I [swi5: +] 100011 I [swi2: cambio] 100010 I [swi6: task queue] 100005 I [swi3: vm] 100004 I [swi1: netisr 0] 100003 I [swi4: clock] 10 0 0 0 RL CPU 0 [idle] 1 0 0 0 ?L [kernel] 0 0 0 0 DLs (threaded) [kernel] 100014 D - 0xc343be80 [thread taskq] 100012 D - 0xc343d080 [kqueue taskq] 100000 D conifhk 0xc0bb3d5c [swapper] After fiddling around a bit with the debugger, I found out that calling cpu_idleclock() followed by cpu_activeclock() manually from the debugger will 'un-freeze' the system and get it to continue booting. For a full dmesg and the logs of the debugging session see : http://vehosting.nl/pub_diffs/dmesg-arm-2010-09-18-timer-code.txt Can you perhaps tell me what's going wrong after this commit? (If you need more info, I'd be happy to provide it where I can.) Regards, -- Daan Vreeken VEHosting http://VEHosting.nl tel: +31-(0)40-7113050 / +31-(0)6-46210825 KvK nr: 17174380