From owner-freebsd-acpi@FreeBSD.ORG Wed Sep 28 01:01:16 2005 Return-Path: X-Original-To: acpi@freebsd.org Delivered-To: freebsd-acpi@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7384B16A41F for ; Wed, 28 Sep 2005 01:01:16 +0000 (GMT) (envelope-from nate@root.org) Received: from www.cryptography.com (li-22.members.linode.com [64.5.53.22]) by mx1.FreeBSD.org (Postfix) with ESMTP id 20D1B43D48 for ; Wed, 28 Sep 2005 01:01:16 +0000 (GMT) (envelope-from nate@root.org) Received: from [10.0.0.33] (adsl-67-119-74-222.dsl.sntc01.pacbell.net [67.119.74.222]) by www.cryptography.com (8.12.8/8.12.8) with ESMTP id j8S11Jo5016980 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Tue, 27 Sep 2005 18:01:20 -0700 Message-ID: <4339EB56.2040503@root.org> Date: Tue, 27 Sep 2005 18:01:10 -0700 From: Nate Lawson User-Agent: Mozilla Thunderbird 1.0.6 (Windows/20050716) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Maxim Maximov References: <4330020C.5030302@mcsi.pp.ru> <20050920135958.GA1616@poupinou.org> <433016F8.903@mcsi.pp.ru> <20050920145932.GB1616@poupinou.org> <4332505A.5050201@mcsi.pp.ru> In-Reply-To: <4332505A.5050201@mcsi.pp.ru> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: acpi@freebsd.org Subject: Re: Hard hang with powerd X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Sep 2005 01:01:16 -0000 Maxim Maximov wrote: > Bruno Ducrot wrote: > >> On Tue, Sep 20, 2005 at 06:04:40PM +0400, Maxim Maximov wrote: >> >>> Bruno Ducrot wrote: >>>> The 2 logical CPUs need to set the same MSRs at the same time, >>>> but if the second one is forced to be idle, I'm not sure if p4tcc will >>>> work fine. >>>> >>>> Therefore, I'm wondering if this hard hang happens with a SMP kernel >>>> and hyperthreading is enabled, or if this happens with a UP kernel. >>> >>> Yes, kernel is SMP one. >>> >>> # sysctl machdep.hyperthreading_allowed >>> machdep.hyperthreading_allowed: 1 >>> >> >> It's weird. Could you please try with a kernel without SMP for >> testing purpose? >> > > It's fine. Now I'm running UP kernel with 'powerd -v' Maxim, can you try some debugging things to figure out where the hang is happening? First, add printfs of 1, 2, 3, 4, etc. throughout sys/i386/cpufreq/p4tcc.c in p4tcc_set(). Then recompile the SMP kernel and boot single user (to save an fsck) and change some settings via sysctl dev.cpu.0.freq=xxx until you can get a hang. See what numbers were printed and where it hung. It should go through all the numbers twice when there is no hang since we set a value on cpu0 and cpu1. Also, see if you can break to the debugger (ctrl-alt-esc) from console when it is hung. I'm guessing no. -- Nate