Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp2444524ybi; Thu, 18 Jul 2019 08:29:14 -0700 (PDT) X-Google-Smtp-Source: APXvYqzRapDAE0eQ0eRg5hYj4zysl+zZQoavy95chDrzE6Z6rR2YPzCopOA/0uPsQNCo+uDPUVKS X-Received: by 2002:a17:902:4623:: with SMTP id o32mr49887068pld.112.1563463754461; Thu, 18 Jul 2019 08:29:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563463754; cv=none; d=google.com; s=arc-20160816; b=fYIRD32InTk1WeHWIlsuHzME9oo9uCKI/+x/iolBRjLNHgjqc93AcbWJgUrTuDlX4P M+pBzTrTwpjFZ2TAknPHfdbSgc7wplrlg0iySMhnLi32HJiMBaTjs1ETlx/0rigu6c5H JStYXJoX3Y1pYAwB5OsiB47AOQzs2vA6pnua5jugq1Kb2zZcPusW8aNaZGZ7bWhORKm0 GBy/GJpp+uUCazpAi3CcOiDnAJut09Z+58f8M7f/P36HWamZ2lKnnPYkxA/lO8DlaKNa XBKbDdDYM/DPpQPi8eZCE8ueYYc/nZS7C8NSD5k/etYk4SwxWNQIQNL/pzKpVAgcdZcG Cy1Q== 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=bOl8UvxZdEylB4K2kYCTxg3rhzZCUUyEwRBcEgzHCsI=; b=YYpy62IapvCcOUyiGkxKJXSzR6SCG1A2CjAaFWwgB2olO9o+mhcX9PNvxW0AcsV7RB 7lhGJkYFIbwPqlGR5POsDcJnTLBwWsFQgW7c/pLW7EdIQvvchn3e1sFqG/pqj1emCK1J r+9MydalGKDg1gkiq7gffPZdp/tVBaVXiVdS1nfnPOYtUCYBKXkC8ffdEom/kR2n75Jn DWrkTLo85vs9z6XDCxdXci/Togilax1MrsG53WM1gVojD5lRn/GrCBbJ6xKCPW/3Ursm 9bxQB5VwV8mi6dgsWPFw5YapUzuD5Wh2Es9cT9PJOgQt7YYL9qfcOVeo9UqJjrhn3PF+ p0tg== 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 4si1633492pfg.55.2019.07.18.08.28.58; Thu, 18 Jul 2019 08:29: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; 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 S2390695AbfGRP0k (ORCPT + 99 others); Thu, 18 Jul 2019 11:26:40 -0400 Received: from foss.arm.com ([217.140.110.172]:59830 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727897AbfGRP0k (ORCPT ); Thu, 18 Jul 2019 11:26:40 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 17D87344; Thu, 18 Jul 2019 08:26:39 -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 D2A643F71F; Thu, 18 Jul 2019 08:26:36 -0700 (PDT) Date: Thu, 18 Jul 2019 16:26:22 +0100 From: Patrick Bellasi To: Tejun Heo Cc: linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, Ingo Molnar , Peter Zijlstra , "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 , Alessio Balsini Subject: Re: [PATCH v11 1/5] sched/core: uclamp: Extend CPU's cgroup controller Message-ID: <20190718152327.vmnds3kpagh2xz2r@e110439-lin> References: <20190708084357.12944-1-patrick.bellasi@arm.com> <20190708084357.12944-2-patrick.bellasi@arm.com> <20190718145238.GD696309@devbig004.ftw2.facebook.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190718145238.GD696309@devbig004.ftw2.facebook.com> User-Agent: NeoMutt/20180716 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 18-Jul 07:52, Tejun Heo wrote: > Hello, Patrick. > > On Mon, Jul 08, 2019 at 09:43:53AM +0100, Patrick Bellasi wrote: > > +static inline void cpu_uclamp_print(struct seq_file *sf, > > + enum uclamp_id clamp_id) > > +{ > > + struct task_group *tg; > > + u64 util_clamp; > > + u64 percent; > > + u32 rem; > > + > > + rcu_read_lock(); > > + tg = css_tg(seq_css(sf)); > > + util_clamp = tg->uclamp_req[clamp_id].value; > > + rcu_read_unlock(); > > + > > + if (util_clamp == SCHED_CAPACITY_SCALE) { > > + seq_puts(sf, "max\n"); > > + return; > > + } > > + > > + percent = uclamp_percent_from_scale(util_clamp); > > + percent = div_u64_rem(percent, 100, &rem); > > + seq_printf(sf, "%llu.%u\n", percent, rem); > > "%llu.%02u" otherwise 20.01 gets printed as 20.1 Yup!... good point! :) Since we already collected many feedbacks, I've got a v12 ready for posting. Maybe you better wait for that before going on with the review. Thanks, Patrick -- #include Patrick Bellasi