From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9D851C433F5 for ; Tue, 4 Oct 2022 17:15:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229548AbiJDRPX (ORCPT ); Tue, 4 Oct 2022 13:15:23 -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: 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.