Received: by 2002:a25:b794:0:0:0:0:0 with SMTP id n20csp4357878ybh; Tue, 6 Aug 2019 10:15:59 -0700 (PDT) X-Google-Smtp-Source: APXvYqyP4DlbEXLxvRPJo8xh7W87Vf18U5tx6OgA+g1CaW3pfS8BhnkLCZFEh5epoPRnG1T0CDRd X-Received: by 2002:a63:593:: with SMTP id 141mr3917235pgf.78.1565111759566; Tue, 06 Aug 2019 10:15:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565111759; cv=none; d=google.com; s=arc-20160816; b=pKfKGqxYIG05MBq6zQb4gZFSzy1oCJBHOlwnw/Jjz+PH6DeRfimskn25+dla6fN8p/ w/R2INLsONYUYQfy1M4v3kfPixFX6ugnejThvNCba2I3T/gFeL7gCTo2L6nx8yKdtdWo CrfHj7CJro9xu13e9urN1xOQVZ2nDdlAZ9C0+oyxBjz+QSPphh9oRXrv4IZzp4siIfwO nkL3SMLsB6v/LTrWQbf73yBRLSHmytBAdT2amb582ITvmKlmjd01tGTeHWLaiapA5YGo b+2unvMr4zVOe8lYKsUiG3F2gnyeGXs69A+EcRo2Ki6VAWiS2ZhJfKrfSyRR0+bFBYIF 5R5w== 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=9XTI75aI/kXRmEoKN+LJqSaN7xs2PeFyyEm/644EYpA=; b=CB7gjOYGiCQFAWacOOvEZdB7luqef5FtbA3pHT+R5kdFr2faVb1mDS70ysS36UqU6G Hnd4NgdExkfybbLFdvRTF57511rj1ejWH/BiU7c/FcSfiiPaiywF3fm8KVGP4bHSgGui yvTo7Fl0bu53j5gHwBU6tV76P3MB+Lh2CTWbqYhdbMqePvXnEUlmln20OfijdTMbWwae c9VVQA2H7jDcFWEiFq/zYRM2FBZdVrQyxe89tpNjM8HFqg01B2J9lCNyZehqtzg8OY+8 tTgnfGwm22aBRVuNK6iB6ktjG9KJKGQq+D/+J88k0dr/KIemNh6NbyCDmgr8raRNQCqD HSUg== 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 f1si14959711plf.410.2019.08.06.10.15.43; Tue, 06 Aug 2019 10:15:59 -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 S2387746AbfHFQLm (ORCPT + 99 others); Tue, 6 Aug 2019 12:11:42 -0400 Received: from mx2.suse.de ([195.135.220.15]:39738 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2387634AbfHFQLk (ORCPT ); Tue, 6 Aug 2019 12:11:40 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 95514AC90; Tue, 6 Aug 2019 16:11:38 +0000 (UTC) Date: Tue, 6 Aug 2019 18:11:34 +0200 From: Michal =?iso-8859-1?Q?Koutn=FD?= To: Patrick Bellasi Cc: linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, linux-api@vger.kernel.org, cgroups@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 , Suren Baghdasaryan , Alessio Balsini Subject: Re: [PATCH v13 1/6] sched/core: uclamp: Extend CPU's cgroup controller Message-ID: <20190806161133.GA18532@blackbody.suse.cz> References: <20190802090853.4810-1-patrick.bellasi@arm.com> <20190802090853.4810-2-patrick.bellasi@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190802090853.4810-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, Aug 02, 2019 at 10:08:48AM +0100, Patrick Bellasi wrote: > +static ssize_t cpu_uclamp_write(struct kernfs_open_file *of, char *buf, > + size_t nbytes, loff_t off, > + enum uclamp_id clamp_id) > +{ > + struct uclamp_request req; > + struct task_group *tg; > + > + req = capacity_from_percent(buf); > + if (req.ret) > + return req.ret; > + > + rcu_read_lock(); This should be the uclamp_mutex. (The compound results of the series is correct as the lock is introduced in "sched/core: uclamp: Propagate parent clamps". This is just for the happiness of cherry-pickers/bisectors.) > +static inline void cpu_uclamp_print(struct seq_file *sf, > + enum uclamp_id clamp_id) > +{ > [...] > + rcu_read_lock(); > + tg = css_tg(seq_css(sf)); > + util_clamp = tg->uclamp_req[clamp_id].value; > + rcu_read_unlock(); Why is the rcu_read_lock() needed here? (I'm considering the comment in of_css() that should apply here (and it seems that similar uses in other seq_file handlers also skip this).) > @@ -7369,6 +7506,20 @@ static struct cftype cpu_legacy_files[] = { > [...] > + .name = "uclamp.min", > [...] > + .name = "uclamp.max", I don't see technical reasons why uclamp couldn't work on legacy hierarchy and Tejun acked the series, despite that I'll ask -- should the new attributes be exposed in v1 controller hierarchy (taking into account the legacy API is sort of frozen and potential maintenance needs spanning both hierarchies)?