From owner-freebsd-arm@FreeBSD.ORG Thu Jun 11 04:29:13 2015 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CDDE1B95 for ; Thu, 11 Jun 2015 04:29:13 +0000 (UTC) (envelope-from jiashiun@gmail.com) Received: from mail-ig0-x232.google.com (mail-ig0-x232.google.com [IPv6:2607:f8b0:4001:c05::232]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 99C751EE4 for ; Thu, 11 Jun 2015 04:29:13 +0000 (UTC) (envelope-from jiashiun@gmail.com) Received: by igbsb11 with SMTP id sb11so46166691igb.0 for ; Wed, 10 Jun 2015 21:29:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type; bh=h84rvyCZrUbhiVl3TXVmVnxLGuMpdnedtoR3erkypXQ=; b=KozMWiXB3mO8Z8D4U/iRhHmjq6FQbRvnWwQt53lhT/5rgmI/mwTyknBDXhQquxYIDw bfAkJl0zzO2USVzR4AuCK+FzBcP46009LRSX7pVISbfHKr4Xz24sw0vxxnWIGOO/V3kG RkkaDmCQpGWYN8x7psynUTpelPsJD+8/Yhs1pU3oLTDYMs8xVN2540PsyyOv5j9/+GyL q3yB71/81OVvnPMBbDp/qOzUzgJxtyv4+AoMeJN2RzlGkT25XUjlBkXQUduEDDhq+B2Z FEdGaQZ0tLWu4g6xHPmz3ra50coWVrXwdDrKfTvXQkFwWevQSR/PL34qVogIEZcMf49n odjw== X-Received: by 10.50.132.33 with SMTP id or1mr27609546igb.31.1433996952973; Wed, 10 Jun 2015 21:29:12 -0700 (PDT) MIME-Version: 1.0 Received: by 10.36.143.4 with HTTP; Wed, 10 Jun 2015 21:28:42 -0700 (PDT) From: Jia-Shiun Li Date: Thu, 11 Jun 2015 12:28:42 +0800 Message-ID: Subject: cpu accounting wrong on rpi2 To: "freebsd-arm@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Jun 2015 04:29:13 -0000 Hi all, just noticed that cpu accounting is kind of strange on rpi2. It shows 15x CPU time. jsli@rpi2:/usr/ports/ports-mgmt/pkg # uname -a FreeBSD rpi2 11.0-CURRENT FreeBSD 11.0-CURRENT #1 r284150: Tue Jun 9 01:45:25 CST 2015 jsli@4cbsd:/usr/obj/arm.armv6/usr/src/sys/RPI2 arm jsli@rpi2:/usr/ports/ports-mgmt/pkg # /usr/bin/time make -DBATCH configure ===> License BSD2CLAUSE accepted by the user ===> Fetching all distfiles required by pkg-1.5.3 for building ===> Extracting for pkg-1.5.3 ===> License BSD2CLAUSE accepted by the user ===> Fetching all distfiles required by pkg-1.5.3 for building => SHA256 Checksum OK for pkg-1.5.3.tar.xz. ===> Patching for pkg-1.5.3 ===> Configuring for pkg-1.5.3 configure: loading site script /usr/ports/Templates/config.site ... 504.315u 967.338s 1:38.94 1487.4% 806+15k 0+102io 0pf+0w jsli@rpi2:/usr/ports/ports-mgmt/pkg # I am sure I don't have 16 cores on this tiny piece (though I wish.) And setting it to 900MHz is even more fun: jsli@rpi2:/usr/ports/ports-mgmt/pkg # sysctl dev.cpu.0.freq=900 dev.cpu.0.freq: 600 -> 900 jsli@rpi2:/usr/ports/ports-mgmt/pkg # time make -DBATCH configure ... 908.565u 1307.358s 1:10.65 3136.4% 377+7k 0+103io 0pf+0w jsli@rpi2:/usr/ports/ports-mgmt/pkg # It seems fine for the same revision on amd64. jsli@4cbsd:/usr/ports/ports-mgmt/pkg # sysctl -a|grep i5 hw.model: Intel(R) Core(TM) i5-3450 CPU @ 3.10GHz jsli@4cbsd:/usr/ports/ports-mgmt/pkg # uname -a FreeBSD 4cbsd 11.0-CURRENT FreeBSD 11.0-CURRENT #1 r284150: Mon Jun 8 21:03:55 CST 2015 jsli@4cbsd:/usr/obj/usr/src/sys/Minimal-NODEBUG amd64 jsli@4cbsd:/usr/ports/ports-mgmt/pkg # time make -DBATCH configure ... 2.934u 1.743s 0:04.54 102.8% 15211+266k 0+105io 0pf+0w jsli@4cbsd:/usr/ports/ports-mgmt/pkg # -Jia-Shiun