Received: by 2002:ac0:950c:0:0:0:0:0 with SMTP id f12csp3943809imc; Thu, 14 Mar 2019 08:42:03 -0700 (PDT) X-Google-Smtp-Source: APXvYqzWAJiJtAfFQGTCbH5NqPOtNZB5VZdTBmcnyq2d6T0/3J01O/eFv93pPMjjfOxC5rQyC31j X-Received: by 2002:a17:902:32b:: with SMTP id 40mr50204331pld.122.1552578123226; Thu, 14 Mar 2019 08:42:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552578123; cv=none; d=google.com; s=arc-20160816; b=T7PUbjdLn2SKhdc/IY3PP6EX8ak7cvXLxZsAfF9cb/9PkaV32JY3htkkbaCk/25fpN juCqacbvfviWDsN2avfLLiX9BNyTCWZBFdCHXLBzytcld7+Y2DqTwCpqJz+4KeHc6zwo PwVfu4EbwhFg1YO46Ae4sMitVuk6BHCiq/wrrEMsYMvCk2UDzMc/qojhYtyu2WCrw5jF FfHBhnTamKu92dVC/0zZJ4XSrH0xQQewTDt8ntxDJNwlmFsodr8vxEdGlpFcbRScYeYF e728usIcl6HaxZR8Z4tHoJoaEmokYQSIEyTa1LE16FdacbKCMeUTtbe/l7rHXoFwiRwR pf0w== 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=v0jE2LjDxseNygJ29x2vJ4pgyys82rEbMrA35b6sS54=; b=GOUMjFZVRquhMGYG6ripTtwTP7GcALqdwOGynYCqIbclgeayRZRYEYU9wz36Weg07w 60IcQpKk5BaqjCJzqZ29fvSYaGJWHzTs1Ik6aEGx+ecL17txXkPrLgMVX0D4zTa0N+4O Sk44hZUzhc7Twf/mW0FWEY0/8kZ4noYvRTRnWxk7Yrpvvi+FAdt94ZCy+tOVPNpY044L YpqQT4N+051KUbB0okc5MD+0JYmtI9GOCgZFNoBcBpfZBtJLCOlxFuQDT59IJciuHjXm +b+Q+LlfYOR4XoWcAbglIhBA7XyzfCo6caRpRbxCvDa0BkzxXJ8xxXYfU+Ns1D6l1LM9 NSIQ== 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 91si14439825ply.258.2019.03.14.08.41.48; Thu, 14 Mar 2019 08:42:03 -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; 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 S1727091AbfCNPk7 (ORCPT + 99 others); Thu, 14 Mar 2019 11:40:59 -0400 Received: from foss.arm.com ([217.140.101.70]:46444 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726155AbfCNPk7 (ORCPT ); Thu, 14 Mar 2019 11:40:59 -0400 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 4E2E5A78; Thu, 14 Mar 2019 08:40:58 -0700 (PDT) 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 5A1743F71D; Thu, 14 Mar 2019 08:40:55 -0700 (PDT) Date: Thu, 14 Mar 2019 15:40:52 +0000 From: Patrick Bellasi To: Suren Baghdasaryan Cc: LKML , linux-pm@vger.kernel.org, linux-api@vger.kernel.org, Ingo Molnar , Peter Zijlstra , 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 Subject: Re: [PATCH v7 01/15] sched/core: uclamp: Add CPU's clamp buckets refcounting Message-ID: <20190314154052.345v74snhtc4cqbe@e110439-lin> References: <20190208100554.32196-1-patrick.bellasi@arm.com> <20190208100554.32196-2-patrick.bellasi@arm.com> <20190314144600.2ulpeipad7jbxyiy@e110439-lin> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20180716 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 14-Mar 08:29, Suren Baghdasaryan wrote: > On Thu, Mar 14, 2019 at 7:46 AM Patrick Bellasi wrote: > > On 13-Mar 14:32, Suren Baghdasaryan wrote: > > > On Fri, Feb 8, 2019 at 2:06 AM Patrick Bellasi wrote: [...] > > > > The rq::uclamp::bucket[clamp_id][] array is scanned every time we need > > > > to find a new MAX aggregated clamp value for a clamp_id. This operation > > > > is required only when we dequeue the last task of a clamp bucket > > > > tracking the current MAX aggregated clamp value. In these cases, the CPU > > > > is either entering IDLE or going to schedule a less boosted or more > > > > clamped task. The following: > > > > The expected number of different clamp values, configured at build time, > > > > is small enough to fit the full unordered array into a single cache > > > > line. will read: The expected number of different clamp values, configured at build time, is small enough to fit the full unordered array into a single cache line for the default UCLAMP_BUCKETS configuration of 7 buckets. [...] > Got it. From reading the documentation at the beginning my impression > was that whatever value I choose within allowed 5-20 range it would > still fit in a cache line. To disambiguate it might be worse > mentioning that this is true for the default value or for values up to > 7. Thanks! Right, I hope the above proposed change helps to clarify that. -- #include Patrick Bellasi