From owner-freebsd-stable@FreeBSD.ORG Fri Mar 11 20:13:57 2005 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5AFF916A4CE for ; Fri, 11 Mar 2005 20:13:57 +0000 (GMT) Received: from smtp807.mail.sc5.yahoo.com (smtp807.mail.sc5.yahoo.com [66.163.168.186]) by mx1.FreeBSD.org (Postfix) with SMTP id 1FD4643D41 for ; Fri, 11 Mar 2005 20:13:57 +0000 (GMT) (envelope-from noackjr@alumni.rice.edu) Received: from unknown (HELO optimator.noacks.org) (noacks@swbell.net@70.240.225.210 with login) by smtp807.mail.sc5.yahoo.com with SMTP; 11 Mar 2005 20:13:56 -0000 Received: from localhost (localhost [127.0.0.1]) by optimator.noacks.org (Postfix) with ESMTP id 0989461AD; Fri, 11 Mar 2005 14:13:56 -0600 (CST) Received: from optimator.noacks.org ([127.0.0.1]) by localhost (optimator.noacks.org [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 76497-15-3; Fri, 11 Mar 2005 14:13:54 -0600 (CST) Received: from [127.0.0.1] (optimator [192.168.1.11]) by optimator.noacks.org (Postfix) with ESMTP id 74EA360CF; Fri, 11 Mar 2005 14:13:54 -0600 (CST) Message-ID: <4231FC02.8050205@alumni.rice.edu> Date: Fri, 11 Mar 2005 14:13:54 -0600 From: Jon Noack User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Pete French References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: amavisd-new at noacks.org cc: stable@FreeBSD.ORG Subject: Re: Just a sanity check before I sumbit a buig report X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: noackjr@alumni.rice.edu List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Mar 2005 20:13:57 -0000 Pete French wrote: >>Why does sysconf(_SC_CLK_TCK) always returns 128? Check out sysconf() >>in src/lib/libc/gen/sysconf.c (lines 83-84 of rev. 1.10): > > [follow through of code showing it is defined as a constant snipped] > >>To determine how stathz can vary, we'll have to dig deeper. Check out >>initclocks() in src/sys/kern/kern_clock.c (lines 196-213 of rev. >>1.105.2.11): > > [follow through of code showing it depends on apm_attach() snipped] > > Thanks for that, most instructive! So the conclusion appears to be that > sysconf(_SC_CLK_TCK) is doing the wrong thing by returning a constant then ? > Thanks, I'll submit a pr about it. Do you mind if I attach your email to > it to show the follow through of the code ? I havent looked at it myself in > that much depth. sysconf(3) states that _SC_CLK_TCK is the "frequency of the statistics clock in ticks per second." Considering this value varies, returning a constant is wrong. Feel free to attach my email on the PR. Also, have you verified that apm is enabled and listed with "flags 0x20" in the kernel config(s) of the problematic system(s)? Jon