From owner-freebsd-arm@freebsd.org Thu Jul 30 21:27:42 2020 Return-Path: Delivered-To: freebsd-arm@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BFDCA3AF87B for ; Thu, 30 Jul 2020 21:27:42 +0000 (UTC) (envelope-from greg@unrelenting.technology) Received: from out0.migadu.com (out0.migadu.com [IPv6:2001:41d0:2:267::]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4BHk5n2M1Bz3yY0 for ; Thu, 30 Jul 2020 21:27:40 +0000 (UTC) (envelope-from greg@unrelenting.technology) Date: Fri, 31 Jul 2020 00:27:23 +0300 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=unrelenting.technology; s=default; t=1596144452; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=yZ/EfXcUGVHqQKczmmAIebRYViWs1nWZGuO/PsbU5mU=; b=KlYl0/yDDTTshT/o3DmXJAP+Go8Yem2kvsBHgf6trf+qRhkb7MwnjecZu2Olpe36OMNxsA 4QxelsCdRTyCW7lAzFhJDm/2mM+Wu/yF2t9Xy977Mt4DC53BH+FFOPPmb1nGxeKpYmIcXp ebEFaMSinlUHNVXerLO87ZVvkyogh7Y= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Greg V Subject: Re: big.LITTLE status for rk3399/rockpro64? To: Josh Howard Cc: freebsd-arm@freebsd.org Message-Id: In-Reply-To: <877duk6cvp.wl-bsd@zeppelin.net> References: <878sfnz61y.wl-bsd@zeppelin.net> <20200714094519.f61b85e267d24c02f6a1c09f@bidouilliste.com> <87y2n6tcqr.wl-bsd@zeppelin.net> <20200728123143.GB96119@cicely18.cicely.de> <873659szkp.wl-bsd@zeppelin.net> <877duk6cvp.wl-bsd@zeppelin.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed X-Spam-Score: 0.90 X-Rspamd-Queue-Id: 4BHk5n2M1Bz3yY0 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=unrelenting.technology header.s=default header.b=KlYl0/yD; dmarc=pass (policy=none) header.from=unrelenting.technology; spf=pass (mx1.freebsd.org: domain of greg@unrelenting.technology designates 2001:41d0:2:267:: as permitted sender) smtp.mailfrom=greg@unrelenting.technology X-Spamd-Result: default: False [-2.91 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.99)[-0.993]; R_DKIM_ALLOW(-0.20)[unrelenting.technology:s=default]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2001:41d0:2:267::]; NEURAL_HAM_LONG(-1.00)[-1.001]; MIME_GOOD(-0.10)[text/plain]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[unrelenting.technology:+]; RCPT_COUNT_TWO(0.00)[2]; DMARC_POLICY_ALLOW(-0.50)[unrelenting.technology,none]; NEURAL_HAM_SHORT(-0.92)[-0.921]; RCVD_COUNT_ZERO(0.00)[0]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; SUBJECT_ENDS_QUESTION(1.00)[]; ASN(0.00)[asn:16276, ipnet:2001:41d0::/32, country:FR]; MID_RHS_MATCH_FROM(0.00)[] X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Jul 2020 21:27:42 -0000 On Thu, Jul 30, 2020 at 12:06, Josh Howard wrote: > On Thu, 30 Jul 2020 11:08:11 -0700, > Greg V wrote: >> >> >> >> On Thu, Jul 30, 2020 at 10:05, Josh Howard wrote: >> > On Thu, 30 Jul 2020 09:02:56 -0700, >> > William Carson via freebsd-arm wrote: >> >> >> >> >> >> > On Jul 28, 2020, at 10:43 AM, Vincent Milum Jr >> >> wrote: >> >> > >> >> > The downside is that the two big cores are not fully clocking >> up >> >> to their max >> >> > speed, because FreeBSD doesn't have support yet to clock cores >> >> or groups of >> >> > cores independently. >> >> >> >> Is this true? I'm running r363091 on a RockPro64 with >> >> sysutils/powerdxx and it >> >> supports the different frequencies just fine: >> >> >> >> # sysctl dev.cpu.{0,1,2,3,4,5}.freq >> >> dev.cpu.0.freq: 1416 >> >> dev.cpu.1.freq: 1416 >> >> dev.cpu.2.freq: 1416 >> >> dev.cpu.3.freq: 1416 >> >> dev.cpu.4.freq: 1800 >> >> dev.cpu.5.freq: 1800 >> > >> > powerdxx definitely does help. I think the other issue is that if >> > you set ncpu=4, >> > you get get the max freq_levels of 1512 for the 4 CPUs, but when >> all >> > 6 are >> > enabled, it finds the highest common freq, which is >> > 1416. Furthermore, we only >> > set the big cores at 1800, but they should be 2016. >> >> Wait, "it" == stock powerd? oh sure it might not support that. I was >> only considering manual setting of these sysctls. >> >> re: what the maximum should be, that depends on your device tree. >> I have overclocked mine to 2200. >> > > I'm probably conflating too many things, between what I was observing > on > Linux, which seemed to default to max clock of 1512 on little cores > and > what I see on FreeBSD. I see in rk3399-opp.dtsi that those freq_levels > match what's in the freq_levels in sysctl, so not sure the > discrepency. > > What device tree are you using to get up to 2200? I just edited /usr/src/sys/gnu/dts/arm64/rockchip/rk3399-opp.dtsi and recompiled with a command like (in /usr/src): MACHINE=arm64 DTC=/usr/bin/dtc tools/fdt/make_dtb.sh /usr/src/sys gnu/dts/arm64/rockchip/rk3399-rockpro64.dts /tmp