Received: by 2002:ac0:950c:0:0:0:0:0 with SMTP id f12csp2170495imc; Tue, 12 Mar 2019 08:22:14 -0700 (PDT) X-Google-Smtp-Source: APXvYqxpwmfPcXFmUfuJaMbPake/h477zDQhUvTuIB5tv/K6XYoKSoP3fcB0WNifJ9F9vZOrsfRU X-Received: by 2002:a63:e506:: with SMTP id r6mr11012037pgh.251.1552404134425; Tue, 12 Mar 2019 08:22:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552404134; cv=none; d=google.com; s=arc-20160816; b=ZfiTjHBBUIiIsljHZ2xFq5kz4lccqFWcyu6c90GPBrYcFuCJ7Wibq37LeHF0SX963u +p8i0zcpqAeSyxWbloFzr3tSOUEBCcmy0GZg0588ujztA6zcYfBnT/Jcf1VvmTSv4Rju Sx9Dc7jkg6fUbIe+xKMSSzHoltMrmwk2S1dATH5QDXTfNsF4mG/ew7cZIcI9wPz0xtzl pE0xHkA6AynwPnMTXfapE2O9AVnl/zaU+BYVZsOKWkPtOTBOHwuGFgIB381DZ76E2uDQ dWopq8Ie/kB+nPUAbX7JVbSIULjWX+pNKdCTDRjxukPBwHNWFQXi8sXILV7sft2sYnZZ PrAA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=VlGlLbq002PLe9VGoVpSt/3Rfzzq8YHm6Q4m8f9UOpI=; b=NVtRu/brohTOxD7EM4csjscpOo45ZmVn6Hg9f2hhlgWICv0OnpCjbCv4psTlfK+Gtt udV6CUq58KJeFAR2okLJ97/POJ1gtQzKcWR9F/mv8dGw2zwl26lr70BBIH0+CU9rSFR+ 5fT3xF7KEneXaCgQSGxTAFbLiv1EX/24Bzmf1tzNosVArQXsU7NzMaRlSy7VQ+qgRGfV 6c7lNtrutVs5ZNXDl6WBnFlnJpRpQA87xS1EkQCof+LQQzNyTwpk1cWWM4QE3CFIQRNy hz2O+ffTwrpeh+1ofJ6aV78NC1y0y8gjG6qv+/IdIFOAoXU7CIf7yW5L9n++orAadmk1 wDnw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=pKKMZQpf; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f1si3784987plr.55.2019.03.12.08.21.58; Tue, 12 Mar 2019 08:22:14 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=pKKMZQpf; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726845AbfCLPVH (ORCPT + 99 others); Tue, 12 Mar 2019 11:21:07 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:47960 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726388AbfCLPVH (ORCPT ); Tue, 12 Mar 2019 11:21:07 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=VlGlLbq002PLe9VGoVpSt/3Rfzzq8YHm6Q4m8f9UOpI=; b=pKKMZQpf78MoIuoIcsybUosma aZcj/H0MnQIsSvQUx/Oeoj6RE1EGkov0ZSoaySu4mHVOYnlDTCu9stFJ0s7Zq1T1003Sbqrg0PmpY SnfERfdI+B46tKsEYeyVuYZTLtRUmDB7xKNzOKaOnpc6P+eGXlsZrmhp9ay0FiFKXym1kjSRrUkTl oNe2ygZtdPorSJQaGGna4pVtuZHEu3FfNqUjenEXn1P7yQwiV40rDpcVwE5UjugTkkCaphqZn+ZqT Z6UzsDg5ezkwetZQJX3/9JV9epoGbzWncV/qHXmAScRd5AToDu2pCxcX+YxlqN9ttmbti8WRdLEUT fpnnBfGRg==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1h3jDC-0001V3-Av; Tue, 12 Mar 2019 15:21:02 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 071A2202631D4; Tue, 12 Mar 2019 16:21:00 +0100 (CET) Date: Tue, 12 Mar 2019 16:20:59 +0100 From: Peter Zijlstra To: Patrick Bellasi Cc: linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, linux-api@vger.kernel.org, Ingo Molnar , Tejun Heo , "Rafael J . Wysocki" , Vincent Guittot , Viresh Kumar , Paul Turner , Quentin Perret , Dietmar Eggemann , Morten Rasmussen , Juri Lelli , Todd Kjos , Joel Fernandes , Steve Muckle , Suren Baghdasaryan Subject: Re: [PATCH v7 01/15] sched/core: uclamp: Add CPU's clamp buckets refcounting Message-ID: <20190312152059.GA5922@hirez.programming.kicks-ass.net> References: <20190208100554.32196-1-patrick.bellasi@arm.com> <20190208100554.32196-2-patrick.bellasi@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190208100554.32196-2-patrick.bellasi@arm.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Feb 08, 2019 at 10:05:40AM +0000, Patrick Bellasi wrote: > +/* Integer ceil-rounded range for each bucket */ > +#define UCLAMP_BUCKET_DELTA ((SCHED_CAPACITY_SCALE / UCLAMP_BUCKETS) + 1) Uhm, should that not me ((x+y-1)/y), aka. DIV_ROUND_UP(x,y) ? The above would give 4 for 9/3, which is clearly buggered.