Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp771477rwb; Tue, 4 Oct 2022 10:22:22 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6IOGblWIr56gFu7dT3rWYrCyvMSRUD7RxlLnshA6jlIdJ/1sGvOsnp0oLpIwzTP5Pf6209 X-Received: by 2002:a63:698a:0:b0:41c:8dfa:e622 with SMTP id e132-20020a63698a000000b0041c8dfae622mr23712468pgc.465.1664904141864; Tue, 04 Oct 2022 10:22:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664904141; cv=none; d=google.com; s=arc-20160816; b=fEDehIN891yhkNEUML7zrDQNfAZ7DkUcAeVG0gFEk5McTnuTFkmfAxgajjtyOcr96l tnCNTtj/WVce8iHGsz3aYnHISNCTzsddnOa+Dvg8tyzy2oH8O+qIeWEkPP1CUxEfYVWB CP+pgjIl5JQK79ndMrBmdJ/cceM/F7IAvGL1XafNXOAY2l0gQsa0r31r35eq2r/McMy6 nNa7ELrE6hzSnjCm5MObV5chYcy7tc6ovA9EAzbuHlH9J2c0M+n1OqCgfVmvKqCgfq1w A2culwKRh8gh3jYHAenVNzv85SNoB7pZ0cf9tL3n3jBj7R+xShgg5LyiXiCDaz2JwzF8 V5ow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=MnDFs2q5evCX1GvkqNdAr9mw1sG6dGW/Mc7bZ+mDfvc=; b=ytisc8X7Zii4wnUpPKdmRwJx35Sq3V2SirBf23fmuknnz23IJseKFRTVKFZDgqPjAD YSHas4hUAjzArrZPHOP11ZxwtRypM/QuK9lY5yAzAEzlOXlYcgrYuU7vl4F+PZpb3SnM gNAgeZCdM/6TBzBGBmx8/IR58JDRPvftnzYoudLP+Wbgig0M6SQLCgi/9C3N1ZzYj2/u kFJ1VcVL/YiUvq/jOZ5P1GsbI54ld66mpqqnyIgCRxm0tiS/IiTtZw23PiYrQSwdm3ye vazIQ/FwmiANtPbeXFC9MqinqbcwtAv6LPHgrIhaSu1+xgh7TGLY1aTwkI9Q+zzgcg6L r6hA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Aem2PfxU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t20-20020a17090a449400b001fe27fb63d5si2748104pjg.40.2022.10.04.10.22.09; Tue, 04 Oct 2022 10:22:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Aem2PfxU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230089AbiJDRPW (ORCPT + 99 others); Tue, 4 Oct 2022 13:15:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53882 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229562AbiJDRPT (ORCPT ); Tue, 4 Oct 2022 13:15:19 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A8C83233A9 for ; Tue, 4 Oct 2022 10:15:18 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id F146F614DA for ; Tue, 4 Oct 2022 17:15:17 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 60157C433D6; Tue, 4 Oct 2022 17:15:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1664903717; bh=mGnX35o3y1NNdpCSMlejw46q4AM700HTmz9Es/OfI7Y=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Aem2PfxUwzcAtdp/4gwiBW4foLdCqlY75A9d4bOftRj3DeXAZeQ7mUDhJ3pzR52ld XJEo6dsMtjcxvjSJOZGivS1jn3aeu+RxVi1f+y3/R9SJA/NN3gZzMnVgh7yR06lPbx +P1dGn3XFeJyzSnOc2m5eXwzzm+uU7RcJUZwZ1EL8RDWbbfY5ODJzLb2Lhev1RxudX 2XHSNC23/Oi6YqSCnU6CFinQOysLNhihm/9k2X+SHpAL/RzhgcIlqy9JlkOy4yjwDn wEwcWA/sWbM58krWJywf81salJN34dOrsHEI+DrVXXrRqxz/946mH3hcjl5ejdpQ+n ywKsAPQreqGwQ== Date: Tue, 4 Oct 2022 18:15:11 +0100 From: Conor Dooley To: Atish Patra Cc: Heiko Stuebner , Conor Dooley , Jessica Clarke , Palmer Dabbelt , linux-riscv , Samuel Holland , Albert Ou , Anup Patel , Atish Patra , Dao Lu , Guo Ren , Jisheng Zhang , Paul Walmsley , linux-kernel@vger.kernel.org Subject: Re: [PATCH] riscv: Fix build with CONFIG_CC_OPTIMIZE_FOR_SIZE=y Message-ID: References: <2546376.ElGaqSPkdT@phil> <2E96A836-764D-4D07-AB79-3861B9CC2B1F@jrtc27.com> <13396584.uLZWGnKmhe@phil> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Oct 04, 2022 at 09:52:41AM -0700, Atish Patra wrote: > On Sat, Oct 1, 2022 at 1:13 PM Conor Dooley wrote: > > > Thanks. It would be good to understand what happens when "pause" is > > > executed on these boards ? > > > > The actual pause instruction? uhh, so with the usual "I don't know what > > I am doing" disclaimer, I ran each of the .insn and pause instruction 48 > > times in a row and checked the time elapsed via rdcycle & then ran that > > c program 1000 times in a bash loop. Got the below, the insns were run > > first and then the pauses. > > insn pause > > min 2.3 3.2 > > max 9.5 10.6 > > avg 27.0 29.1 > > 5% 2.9 4.2 > > 95% 18.1 19.1 > > > > Swapping the pause & insn order around made a minor difference, but not > > enough to report on. I'd be very wary of drawing any real conclusions > > from this data, but at least both are roughly similar (and certainly not > > even close to doing the div w/ zero args. > > > > Yeah. That's what I was expecting. So we can't drop the div for now. Otherwise, > the existing hardware(don't support Zhintpause) suffers by spinning faster. > > Thanks for running the experiments. I've lost track, does that mean the patch is okay as, is or needs to be changed? The former, right? Thanks, Conor.