Received: by 2002:ac0:950c:0:0:0:0:0 with SMTP id f12csp3917501imc; Thu, 14 Mar 2019 08:09:03 -0700 (PDT) X-Google-Smtp-Source: APXvYqwCpK9zT10Dtn2AWi8001v4HJRl9UQpSAgeko8Q/eebA3rgzb7yNLHZWJT6yAoLDAqwBoHQ X-Received: by 2002:a62:e911:: with SMTP id j17mr49648488pfh.107.1552576143046; Thu, 14 Mar 2019 08:09:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552576143; cv=none; d=google.com; s=arc-20160816; b=s5TXYSlW7RdKeyjCaBz5lpM+IAYkuxBlz6WIlKYt1l1ZF6HrXBQ/ANOIfNs6qGQKbT fa0zx4QpQKAqjQrTjEnSd7q31J4LzoTx0ShdZ/V9PgGplzsdeLW/kmkFgcet/ibBnaeZ GjT1t2pqYrni+EWeqFrwFWDfr34oywZRFfuhI4FuHL46NypoBcdtQb//YODhI6IokR1Y JTFsmkFD6csadbS3zsy6cdAzw6QiR4yF6BV7QY/mTkFCE1aUm/jEjTmrqiD5aXgKXcWr /AEqZqNn1ZDXuoHJ7AnF/bZJhL7R2h3IMAOzEwk6X84JPTTRwcBHTyrUPNZoItH6pIuu mI2Q== 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=+Qu/uFHaPfApk+JkJse7WGXIn2VV7pJpDRcKo8xF8ok=; b=bp/NkZAIwKVx0lOL0k3XcPAVnsLYyFoQADYqYcD5dtrjFIFS/MI7aBD3hHZvINFe/g +e5WsWm8DQXzy6pIiDtaFbgZu8ZkNiCKCVBlv4UghtG2fG4kc4a+na6bCbiVunxAia5P b0AUmt5FM9MKNcxyCqP4r+hhbMAyBo4Y1vjxZL/SN/jLCJW/lR6kYFq66BPrgMxnemD4 1w9FterELJB+IZuKoscMqHOONaHSmiew2ze5GhuF8UO3d0cjEiHg2Zhx0Ei6YIOTXy3D Ko753bgTtVNpcTL5f3YR0vqYvugDnEIMJhE6Fgv69r/J/stjNp8NI+Z/JBusMS1SFrOK Wqdg== 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 n18si13543866pfe.166.2019.03.14.08.08.47; Thu, 14 Mar 2019 08:09:03 -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 S1727091AbfCNPIA (ORCPT + 99 others); Thu, 14 Mar 2019 11:08:00 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:46128 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726889AbfCNPH7 (ORCPT ); Thu, 14 Mar 2019 11:07:59 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 27BE1A78; Thu, 14 Mar 2019 08:07:59 -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 34B023F59C; Thu, 14 Mar 2019 08:07:56 -0700 (PDT) Date: Thu, 14 Mar 2019 15:07:53 +0000 From: Patrick Bellasi To: Peter Zijlstra 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: <20190314150753.lzu6uftirxnhdv4y@e110439-lin> 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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190314133211.GJ5996@hirez.programming.kicks-ass.net> User-Agent: NeoMutt/20180716 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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... > 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 ;) -- #include Patrick Bellasi