Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp418640img; Mon, 18 Mar 2019 06:12:46 -0700 (PDT) X-Google-Smtp-Source: APXvYqyrNw2CreXdqxmot9FCnVqxFAknJN5ssXLTEwFeEgCrJH5HPcWe4HN2+NOza1HLj3KzAY7W X-Received: by 2002:aa7:809a:: with SMTP id v26mr19271932pff.103.1552914766358; Mon, 18 Mar 2019 06:12:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552914766; cv=none; d=google.com; s=arc-20160816; b=wK8Owa2QHZFfUDwbcj18gdLjE60Pj21MZJ0abeE8mqmit1bRG+RFbGJKYkhbXyrH6M 9vOdN/8wpJmVcZjCOFHqa4MSQXwYwEAWfNOsDGBW50fxJSsNFGNhJYL0Z6P6KJUhmXaX eHxSm+2nmFpvS3kXzC0NxsICD96JWNi8nE2XbFdIOU3Rk3WewyHUaMH/RwIPupie3dtm 1Ja6rsbbqGwigTFyrESmWiu/tkzo6gVfzlRuYWhZojZrUX0EIX0yO8AwwEh6IqwIGWAT 7isUDW6wFcdvIH8Wh4XmbRpUzsQoccrC9kAUkTmJT4wZOL6XFplZwnhEGNyqfmP8awnm GEOA== 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:dkim-signature; bh=TgbMfsPXJjgj4Z50pQoy/elFXwkStx6pafrxtqKNDPk=; b=csCLkAkUVlOt6MRoXTbnvJP4zofWxO8qLQdAQwc33YtTLgHnUO9Y+uNP3ZGy+qPAnS TBXx+vir1SRicBSk3jP71cSYHV/8j+4bZ9Yui3YpxiEBZzd1mV1mZIo1y6acEXNqSeYS 34/gLL4ysTS/J8JZwrcYg6eLGDe1xqRphFy9KKfk1fFrsxFR6uVhELmmf0I3zJiUXBc8 4jmGv9p7CbS/Gdu+86c8V1L1ZtWUJ/iPBZmdfoCOipKbi4bVIDh5RMacpFjKk+ygMrjm 6gV/sH7hFPIsOD5Eq810oY9n0sbWY6qztYZbuXBXuPmzlRNBVyuhiPJaqukhAfCDLalT sfmQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=K7cJKzu+; 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 v3si8596745pgr.11.2019.03.18.06.12.30; Mon, 18 Mar 2019 06:12:46 -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; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=K7cJKzu+; 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 S1727455AbfCRNK7 (ORCPT + 99 others); Mon, 18 Mar 2019 09:10:59 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:41154 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726704AbfCRNK6 (ORCPT ); Mon, 18 Mar 2019 09:10:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=TgbMfsPXJjgj4Z50pQoy/elFXwkStx6pafrxtqKNDPk=; b=K7cJKzu+w2xj5Ex9M1bbYA/Z5 LJW2jkQ8f/IOJRDYkskq77pSN/5cgo2XUSMIV7ll9Ze18+JWWgjvxGynjGUgok2t4dbLlNALGz/4G oQ637lrkdbyE1XWfIgl9O/Pz7wq+32FNuniEXC7hg5EXn5WSloMl6xbhoO60UBNIL2x1fOfyV0uHw wLZakQnM1D6hN5ZDsOCrLAhOK6GvVNdsD3rFAFnH49WRFyrM78J1ct/LVVz1FG8muvSOdaAXvBZAU nARZfWUGaIA+bX8owxJmKyZKo1wXsXGbBBZgcQspRtiHULelt0a9eEcX2DZXcBog8oolECC9XZinN cDap1bc3g==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1h5s2W-0006O1-DH; Mon, 18 Mar 2019 13:10:52 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 60C1720A0FF8A; Mon, 18 Mar 2019 14:10:50 +0100 (CET) Date: Mon, 18 Mar 2019 14:10:50 +0100 From: Peter Zijlstra To: Patrick Bellasi Cc: linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, linux-api@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 v7 03/15] sched/core: uclamp: Add system default clamps Message-ID: <20190318131050.GQ6058@hirez.programming.kicks-ass.net> References: <20190208100554.32196-1-patrick.bellasi@arm.com> <20190208100554.32196-4-patrick.bellasi@arm.com> <20190313201821.GW2482@worktop.programming.kicks-ass.net> <20190318121804.tr3myhtgczvovmkq@e110439-lin> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190318121804.tr3myhtgczvovmkq@e110439-lin> 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 Mon, Mar 18, 2019 at 12:18:04PM +0000, Patrick Bellasi wrote: > On 13-Mar 21:18, Peter Zijlstra wrote: > > On Fri, Feb 08, 2019 at 10:05:42AM +0000, Patrick Bellasi wrote: > > > +static void uclamp_fork(struct task_struct *p) > > > +{ > > > + unsigned int clamp_id; > > > + > > > + if (unlikely(!p->sched_class->uclamp_enabled)) > > > + return; > > > + > > > + for (clamp_id = 0; clamp_id < UCLAMP_CNT; ++clamp_id) > > > + p->uclamp[clamp_id].active = false; > > > +} > > > > Because in that case .active == false, and copy_process() will have done > > thr right thing? > > Don't really get what you mean here? :/ Why don't we have to set .active=false when !sched_class->uclamp_enabled?