Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3175119imu; Wed, 7 Nov 2018 06:20:38 -0800 (PST) X-Google-Smtp-Source: AJdET5eA/aSCkdK+zs6RGZfNmIx4Ec+Q1SH/OVVwVUA4/Ko2V8co6FCWLX0+XM7T8iq+4VRBPIoP X-Received: by 2002:a17:902:8d88:: with SMTP id v8-v6mr408522plo.21.1541600438709; Wed, 07 Nov 2018 06:20:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541600438; cv=none; d=google.com; s=arc-20160816; b=M74P/aBrtfCyu/SkoQPpH7oBQhiDZhmwxFAbpU7fZIdRlGuf+f3Iu8vzQFMOclPqco OVtp45ho5BR6Cqhu4f8UEV4AH2HIM3Sj4TEYtzaXzKu/GAMBLgrMBz/iiCpCA+z47j6I VSedDz4s7369vfs1Vhg2Sgqeo3TLiI0CJ6EvekPNKWgJJ1ftRRjHINSUG8Zt1ulYlTc+ bF+XPWg3g+/jTjCwfmYnjuOroLVGxjeBe0UTAbugCWo0vkvIei02suxkCF4shOGSW+Vt mKuiV9QKw2Qd+TLJTfxef75HDNqU2H8PA0NicViSyfYHKqcR+aFoLqjnBNftYj6/ZNJT ZQdA== 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=WDwdEzbCQGBoX1Z3UrZSOGzW3ru+z5/xGV3gzvfjx+k=; b=LuYJnG8XHfeP4Y4YIU6Q8KS/xmaswY4g65L86AGB/CQGqt5ch5M2HddqLQams6k8dB U7P6hSqwaZqW34LI12K6QsOYfgdI7YxGRzzjCUfjWk9nInn0zeuscHYfxfZ274ZTSry+ 31GhO9LF2ocNcnSXJlRY7rjXolZ8VeEOJCZOmpeeumyF5NL+RBdxv66wbk8H10Z5GceW 53w+ArEY80ldpLY65hcmPFCkl2w3Agi3OdFqn3ffc0dhSuNt62d2StCOYZNsP9WL93N2 db0PFuDyZoS+mUxm5baRvQyehQ6kLM70m1Zocn8HWK7CpOoLdLvkIN2k5lrivycWqQqq A1kw== 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 a61-v6si803187plc.35.2018.11.07.06.20.22; Wed, 07 Nov 2018 06:20:38 -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 S1727765AbeKGXu3 (ORCPT + 99 others); Wed, 7 Nov 2018 18:50:29 -0500 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:51570 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726830AbeKGXu3 (ORCPT ); Wed, 7 Nov 2018 18:50:29 -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 03898A78; Wed, 7 Nov 2018 06:19:55 -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 353553F718; Wed, 7 Nov 2018 06:19:52 -0800 (PST) Date: Wed, 7 Nov 2018 14:19:49 +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: <20181107141949.GF14309@e110439-lin> References: <20181029183311.29175-1-patrick.bellasi@arm.com> <20181029183311.29175-4-patrick.bellasi@arm.com> <20181107121908.GO9781@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181107121908.GO9781@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 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 ? However, will check better again on v6 for possible corner-cases... > > + unsigned int mapped : 1; > > +}; -- #include Patrick Bellasi