Received: by 2002:ac0:950c:0:0:0:0:0 with SMTP id f12csp4101547imc; Thu, 14 Mar 2019 12:20:02 -0700 (PDT) X-Google-Smtp-Source: APXvYqw5iLcrX11Wh/fl34FPfuGFWAmR4wAyNJOlfZDKVEptue/+aABzytEE15rfuar9SUcWLzqU X-Received: by 2002:a17:902:9a02:: with SMTP id v2mr53222326plp.201.1552591202880; Thu, 14 Mar 2019 12:20:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552591202; cv=none; d=google.com; s=arc-20160816; b=nSopUEMr9TJh5k4w7yx2QDXhdPeIUxTlaE4gnjsWv8lDcVGS3Wmh7GeJ9WMZJTpit4 vsTSC3v1s5Wxqgnsd0+xqOV0/Pfb6yJrqJVW5iIbraaz7SQ9qt4mSvkUbxLREOXuUQSM cEz5A+uGfZ66zT4DlkZYM4PuChFwRgUlHrQtbqHvToRpLr16ze60hFojrGiLJQ+G5nfV eWci+WGOYfaao9kUEUX5DQuOFdal1LgJSrxGLopT5cKBfaun1FxZGHev6jOL+j4ikdz6 J2A1haKMdOmnWsGOzsQRl8InLX6c+VjEtqaNqfJH+Bo0gZNbfbrGFR+bADKLVFyNxBC9 z50g== 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=yg4XkJczdyzMyp3AAIIUh0GxflWFSpYWzliUDtsZG7c=; b=1HUBocMuqq/aL98zwDAEPqVyoypAaJIdGUpj53+CBvKSEtLXPw3/IK9gNb8UV8d5TF YV5nZBGXUsk77QXnuQhctGGey65JOId8mym1fiRiHYwu3qJwskOdMGJ2AtFdlsdTD8EH i3nbfUyF8+WmNtnF0XYeGqEi4wEzbc7/94JaKXqtv9JHuvIZ2SKJlCRqJgre/aBr4RzV bORs95mIBu9gtXlqjHj3/XV5lKW2zTW7ACS1Vdzvl5rjW48MemgA9XjfOQwrCONgbhEo VUnCy9GRAOHs2ImZwcIKYLHcNOHo/LAw/aUrJRKTB836jeIKnQPedKJAFcybUZVdxsgZ KUew== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=TTobuiH0; 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 l10si13053241pgh.535.2019.03.14.12.19.45; Thu, 14 Mar 2019 12:20:02 -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=merlin.20170209 header.b=TTobuiH0; 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 S1727220AbfCNTTF (ORCPT + 99 others); Thu, 14 Mar 2019 15:19:05 -0400 Received: from merlin.infradead.org ([205.233.59.134]:34536 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726825AbfCNTTF (ORCPT ); Thu, 14 Mar 2019 15:19:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.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=yg4XkJczdyzMyp3AAIIUh0GxflWFSpYWzliUDtsZG7c=; b=TTobuiH0M43zO1gX6/8pRh0Ie mh+nPIL1AHhiUzeFVgBX8fro6BSmSpR2YD4G/AyngftLUScPKHP7DHyDKK20bXf9lHkOPZCyQ2iHq Po75oS5oexRDXRtbU7JRt/p6L+yQLFn5kzD0dQ5L9Yf53tFEdyGZ7pZB5uYRSTsLSSQ9Rh7GA2G3x hp5siAHJsbWIEofnhsjF5uIK/9vL6aCL4B0Y2vGam0Fp1ewYLjs+8cgGZWRnr9dSrZBnlex0SwYn1 3YaD7KKEtJFutSUb26w8cQy+jbKtrxkqe6ed4phkFY8urIrrl1BiMz3WpFXHPVBLqxNA/iJAh1PaJ 3U8+6ggXw==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by merlin.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1h4VsR-000071-Mv; Thu, 14 Mar 2019 19:18:51 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 0F001213D9FD3; Thu, 14 Mar 2019 20:18:50 +0100 (CET) Date: Thu, 14 Mar 2019 20:18:49 +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 01/15] sched/core: uclamp: Add CPU's clamp buckets refcounting Message-ID: <20190314191849.GB6058@hirez.programming.kicks-ass.net> References: <20190208100554.32196-1-patrick.bellasi@arm.com> <20190208100554.32196-2-patrick.bellasi@arm.com> <20190313134022.GB5922@hirez.programming.kicks-ass.net> <20190313161229.pkib2tmjass5chtb@e110439-lin> <20190313194838.GS2482@worktop.programming.kicks-ass.net> <20190314121315.juqpsqu5cwouuqpp@e110439-lin> <20190314133211.GJ5996@hirez.programming.kicks-ass.net> <20190314150753.lzu6uftirxnhdv4y@e110439-lin> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190314150753.lzu6uftirxnhdv4y@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 Thu, Mar 14, 2019 at 03:07:53PM +0000, Patrick Bellasi wrote: > On 14-Mar 14:32, Peter Zijlstra wrote: > > On Thu, Mar 14, 2019 at 12:13:15PM +0000, Patrick Bellasi wrote: > > > > I'd be most impressed if they pull this off. Check the generated code > > > > and see I suppose :-) > > > > > > On x86 the code generated looks exactly the same: > > > > > > https://godbolt.org/z/PjmA7k > > > > Argh, they do mult by inverse to avoid the division, and can do this > > because its a constant. > > > > And then yes, your arm version looks worse. > > your "arm version" is worst then x86, or "your version" is worse? > > IOW, should I keep the code as the original? Do you prefer your > version? Or... we don't really care... Yeah, keep the original, it didn't matter on x86 and arm regressed with my version. > > It does what I expected with -Os, but as Rutland said the other day, > > that stands for Optimize for Sadness. > > Yes, I guess we cannot optimize for all flags... however, just let me > know what you prefer and I'll put that version in ;) Yeah, don't bother optimizing for -Os, it generally creates atrocious crap, hence Rutland calling it 'Optimize for Sadness'.