Received: by 2002:ac0:950c:0:0:0:0:0 with SMTP id f12csp3840400imc; Thu, 14 Mar 2019 06:33:16 -0700 (PDT) X-Google-Smtp-Source: APXvYqwqJxIa5IdAD6OQfrmwm7LltBy/90SImVgkzt1A1MdPvSOhrRXPcYWHV4x3r1VffBMxwktY X-Received: by 2002:a65:4181:: with SMTP id a1mr13774006pgq.100.1552570396430; Thu, 14 Mar 2019 06:33:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552570396; cv=none; d=google.com; s=arc-20160816; b=q1g9vFYCSSrPGAMg9UbfC9nbzRfqdBJtyJoL0uUDmvTHK/BcWWqEzcdeUXRwRqVA6t eFoVe7xlr1TEXczikm3FrnQlhHizjw7f2N1W+LAfrxS+0fmBHIRCghHyt2WtvHSvy9Fw gLUEYZudw7wIyIt//cFO7MPYoOQaOAPtAvsL/a0OQ4acObbOPz4B9aA4h6ue7gsQIfTy UrNAj4phY+I5cMWFiQkR+kE0PCAEtkKuj7hutoteJaOhXm/fAIi9DZZ2Qp/VGGmG6dXi /vqPZzYW0RoSTW8ri77c7voB0WDL/xyGQCMrFcJrLF8IDldRc9NoyXfKz+dU2OZA8YIc BNZA== 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=me9XAScX3Sm48pBYcWYgWkzLnZV4XsP5v0fkWo6mMwA=; b=svqXwWcbETYDkYIeRgks7c20M6tj2NgRqpnVCdrQdT47EycyOXzz5zlssFjKZvqhvP tCShJjU2f7c+DwprVi7Gak0dGY6FeVIRtYME0/34nETkMXe07mrRWz7XMWa6Mq2se9Ry y2cEca0kLQIojRBG9SHqh2SvCB2F3tCBDb1EbZe/f4FhWgMpDG//f7k8oPJPpviRZ9gk a7Lz4P3/asw9AUu56dVCfaDJsosfSsqzcJjtuzJtwtv+wT8O9G+UPlf/p15SJN9iNQlr D11xuWjtACTp2ptFPe9crT/X0KRgbdbtsz27gRyD5wTOtMr7FpAn7QZEB3mCtXru3fs+ FzTw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=fPiqwMEJ; 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 z24si12675399pfa.94.2019.03.14.06.33.00; Thu, 14 Mar 2019 06:33:16 -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=fPiqwMEJ; 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 S1727303AbfCNNcQ (ORCPT + 99 others); Thu, 14 Mar 2019 09:32:16 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:53686 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726875AbfCNNcQ (ORCPT ); Thu, 14 Mar 2019 09:32:16 -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=me9XAScX3Sm48pBYcWYgWkzLnZV4XsP5v0fkWo6mMwA=; b=fPiqwMEJuesXB6h7Ld2c+MXUL XJYM/3Vx6T/rNMdg5T6CKAA4LeI+HBmbR/aFW5Uw18awzeh/KNh7Hl/BwoLhjdHQhiVGp88tGcsOL UFj/+8t9/X0njxp+oIKelFaonoDceD1e8Y1F0SwhKpyqo+90aTKW2we2ku2EAtDSnNQcJf1o39gOe UN6IdEDPVHEFa5s9efAN2oIWVE/ltGNmVJ5ZqMh1AJf9x4wlC9Db5RHxiPQYxCVj34cV46QORM+5L 1c0j+AS+OcSY44Q5rJ66nDCUXsV6pHzbWovoEdIfd4K5MZBn6HHbjpliwRbdKODnl3RxyOg4fEjGk W78HAqShA==; 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 1h4QSy-00065s-TR; Thu, 14 Mar 2019 13:32:13 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 68FAD203E5149; Thu, 14 Mar 2019 14:32:11 +0100 (CET) Date: Thu, 14 Mar 2019 14:32:11 +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: <20190314133211.GJ5996@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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190314121315.juqpsqu5cwouuqpp@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 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. It does what I expected with -Os, but as Rutland said the other day, that stands for Optimize for Sadness.