Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3215270imu; Wed, 7 Nov 2018 06:57:10 -0800 (PST) X-Google-Smtp-Source: AJdET5cnimrq/q5VQNodAA0LD4SmfjnJ2AwpHZWIJngvlPBKaSGFq4RUYW5pxcI3erGLZdW4nUzw X-Received: by 2002:a17:902:7882:: with SMTP id q2-v6mr564913pll.188.1541602630394; Wed, 07 Nov 2018 06:57:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541602630; cv=none; d=google.com; s=arc-20160816; b=Q6/VTh/IJhJV3sKJkNVcV2M67AAs9qWFwiGhDjqFgqo6Rn7V3QGDwmefVm9UO8AT3q zIAlpzYFcrXmD2tw880rOYS3XwxAM4ccI5iQCa5yGvEUEhnmxsabh7BWxvTN+WB6TrhQ ZKxE5EF8yEns2KxzdQc5NYNiSQGTBh86dG2kWW0mQ19FwLVgV9RHaG6vWntGPkpyyMC6 SwCHzz35oAdGtBsBP3yAly3BzFyzBMbsgWtGOUslHAlF7tIaFKt9+t14k184qC1XXRR+ zPzg1iqT9jkbZvbY0v0lU7DETLGkAjAPd3nvONzmSgYG+cBc6y9qk2uMkixDIR5HLEaj MDXQ== 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; bh=2mAmQ4lMLXfN/6h3ZMU3DDJSKsISAcJbUIe8Tm3/NtY=; b=GCa6vaSGLlq3er0dJjSwfCrJVBV+wT5OD+U2OkNiTS5y9npEa52IWGh8WzMdpbFKVc jxzyCzakdh957H/1XpltRYzUbmZw1QwfV1Nreeb6djZIF12zPU7Xctlfp+NzCt7qLbIF UXf8tlGjUgILLjVSBUHFxIxeVY6mbZwpJfyb2N8JayMRv4vUWExUucCLLL7JuSBGpM3h uQ9VOb5R41yllVmdxVmWFaC0rNjkr1ey6jrMKO92UyOJJlxRNJG01qJ0DWu6VSbtCDFU Yv6yypv9AnOP3STWs9mk1s4VwKy/MJHBg/lxgjZoAHqIMO08sLsUBWW2/hF9vtOA+l3w +v0A== ARC-Authentication-Results: i=1; mx.google.com; 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 c28-v6si765448pgc.597.2018.11.07.06.56.55; Wed, 07 Nov 2018 06:57:10 -0800 (PST) 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; 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 S2388074AbeKHA07 (ORCPT + 99 others); Wed, 7 Nov 2018 19:26:59 -0500 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:52256 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388031AbeKHA07 (ORCPT ); Wed, 7 Nov 2018 19:26:59 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 8DC8715AB; Wed, 7 Nov 2018 06:56:17 -0800 (PST) Received: from e110439-lin (e110439-lin.cambridge.arm.com [10.1.194.43]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id C0CB13F5BD; Wed, 7 Nov 2018 06:56:14 -0800 (PST) Date: Wed, 7 Nov 2018 14:56:12 +0000 From: Patrick Bellasi To: Peter Zijlstra Cc: linux-kernel@vger.kernel.org, linux-pm@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 v5 03/15] sched/core: uclamp: map TASK's clamp values into CPU's clamp groups Message-ID: <20181107145612.GJ14309@e110439-lin> References: <20181029183311.29175-1-patrick.bellasi@arm.com> <20181029183311.29175-4-patrick.bellasi@arm.com> <20181107121908.GO9781@hirez.programming.kicks-ass.net> <20181107141949.GF14309@e110439-lin> <20181107144252.GG9761@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181107144252.GG9761@hirez.programming.kicks-ass.net> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 07-Nov 15:42, Peter Zijlstra wrote: > On Wed, Nov 07, 2018 at 02:19:49PM +0000, Patrick Bellasi wrote: > > On 07-Nov 13:19, Peter Zijlstra wrote: > > > On Mon, Oct 29, 2018 at 06:32:57PM +0000, Patrick Bellasi wrote: > > > > +struct uclamp_se { > > > > + unsigned int value : SCHED_CAPACITY_SHIFT + 1; > > > > + unsigned int group_id : order_base_2(UCLAMP_GROUPS); > > > > > > Are you sure about ob2() ? seems weird we'll end up with 0 for > > > UCLAMP_GROUPS==1. > > > > So, we have: > > > > #define UCLAMP_GROUPS (CONFIG_UCLAMP_GROUPS_COUNT + 1) > > > > because one clamp group is always reserved for defaults. > > Thus, ob2(in) is always called with n>=2. > > > > ... should be safe no ? > > +config UCLAMP_GROUPS_COUNT > + int "Number of different utilization clamp values supported" > + range 0 32 > + default 5 > > 0+1 == 1 Seems so... :) > Increase the min range and you should be good I think. ... dunno why I was absolutely convinced that was already 1, since 0 group does not make a lot of sense. :/ -- #include Patrick Bellasi