Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp4407156pxb; Tue, 5 Oct 2021 02:26:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx5rwPyg+jmoRyg7V0f28/H5MgpVtSenGDZOfuFaUvvu0+E9x+SgqBlsimOAIcReY9p8mYW X-Received: by 2002:aa7:9250:0:b0:44c:27d1:7f0f with SMTP id 16-20020aa79250000000b0044c27d17f0fmr18174907pfp.41.1633425999682; Tue, 05 Oct 2021 02:26:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633425999; cv=none; d=google.com; s=arc-20160816; b=PDztcaWwfsNoPV4h1qIPaxNhyw3XpuCpcZVUlgAFLTxhgyFH4wNO/c4de+gWtn22XZ /MCDlBd93dDhPDZg3HzyVegDzooftaaSSyH2E+fFI7G9LUBJ+iuCrwG1AJQQkSpkETC8 RRiiiX9Ob82xcbSdYlJqNSt8aiDqEnVq1+yO7q+l0gRIahJFEPaC1P48aR1ABbhudY8o KWflpbwsqItUNIrvt3YqiHHiI8r82uQt+m68GQXAkdEWxOtU501OWFGmGwtoWFjkMoEP 7v5jYoBOrnH5m8iBbDTV62F6HysSdoOSKeWafIh67w6Urd+IbljpUKFBmy0XA3VzMs5S /tPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=CrnGMerQ4LBYjjGbgeqFgGHVtZrQ+QTtn5a0VX0cO1Y=; b=0ITSfK2YKw3BUe3Q7J1HO1KMC6ax4yCjdeftIde/9yFDy6yzws2dHhV3i1sYKONAZl akwolEJUOC0BD+rRe5KPp+NfY17AZahlnPflKjps1j3soI9bqHhhyayYNrZvwJ/zlL11 R58VLjXIyQAREjSsQc9BbEzHJtuGOpSP2JCvcfwQ4s4jg+KKMKhPdxvEFifU8+Zt9uPK O/DK7pK1kuK7du10srJYBmJKJmctqF6WDkO5rVuLkBgUN5g9J+zr0e7326AEy9VirdRo Y5vji22CNomAQBTm0ZJ6ivzQs7jDEWLP67REQ1ghFyX8okcNwVAQaWNUwM0mCrpoNFSr C42A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@maquefel.me header.s=mail header.b=dehZ7uZt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x1si25601904pgj.59.2021.10.05.02.26.27; Tue, 05 Oct 2021 02:26:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@maquefel.me header.s=mail header.b=dehZ7uZt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233372AbhJEJ0B (ORCPT + 99 others); Tue, 5 Oct 2021 05:26:01 -0400 Received: from forward500o.mail.yandex.net ([37.140.190.195]:59362 "EHLO forward500o.mail.yandex.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232871AbhJEJ0B (ORCPT ); Tue, 5 Oct 2021 05:26:01 -0400 X-Greylist: delayed 377 seconds by postgrey-1.27 at vger.kernel.org; Tue, 05 Oct 2021 05:25:59 EDT Received: from myt5-6c0659e8c6cb.qloud-c.yandex.net (myt5-6c0659e8c6cb.qloud-c.yandex.net [IPv6:2a02:6b8:c12:271e:0:640:6c06:59e8]) by forward500o.mail.yandex.net (Yandex) with ESMTP id A206F941E36; Tue, 5 Oct 2021 12:17:48 +0300 (MSK) Received: from myt5-ca5ec8faf378.qloud-c.yandex.net (2a02:6b8:c12:2514:0:640:ca5e:c8fa [2a02:6b8:c12:2514:0:640:ca5e:c8fa]) by myt5-6c0659e8c6cb.qloud-c.yandex.net (mxback/Yandex) with ESMTP id IyV6tEzelD-HkDqMhNI; Tue, 05 Oct 2021 12:17:48 +0300 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=maquefel.me; s=mail; t=1633425468; bh=CrnGMerQ4LBYjjGbgeqFgGHVtZrQ+QTtn5a0VX0cO1Y=; h=In-Reply-To:Message-ID:Subject:To:From:References:Date:Cc; b=dehZ7uZt+fO6YaaLE03MQykhBGAWbnTmJAz787q5v+kP+tnjCX9x7H9RnogO2XnQp o2LRZpnAlGHdRWJteqIyL14dh5xgLy2vRi3CnyXYsauaUBuFMzC+aXli5//Spgpk63 AQfi00eYfDiMTtzwMWrmEkxl0sCLVfek9C7+wa9k= Authentication-Results: myt5-6c0659e8c6cb.qloud-c.yandex.net; dkim=pass header.i=@maquefel.me Received: by myt5-ca5ec8faf378.qloud-c.yandex.net (smtp/Yandex) with ESMTPS id 43frcM9OPL-HjPCRD6R; Tue, 05 Oct 2021 12:17:46 +0300 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (Client certificate not present) Date: Tue, 5 Oct 2021 12:17:44 +0300 From: Nikita Shubin To: Atish Patra Cc: linux-kernel@vger.kernel.org, Alexander Shishkin , Anup Patel , Ard Biesheuvel , "Darrick J. Wong" , devicetree@vger.kernel.org, Guo Ren , Heinrich Schuchardt , Jiri Olsa , John Garry , Jonathan Corbet , linux-doc@vger.kernel.org, linux-perf-users@vger.kernel.org, linux-riscv@lists.infradead.org, Nick Kossifidis , Palmer Dabbelt , Paul Walmsley , Rob Herring , Vincent Chen Subject: Re: [v3 00/10] Improve RISC-V Perf support using SBI PMU and sscofpmf extension Message-ID: <20211005121744.728385be@redslave.neermore.group> In-Reply-To: <20210910192757.2309100-1-atish.patra@wdc.com> References: <20210910192757.2309100-1-atish.patra@wdc.com> X-Mailer: Claws Mail 3.17.7 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 10 Sep 2021 12:27:47 -0700 Atish Patra wrote: Hello Atish, > Perf stat: > ========= > > [root@fedora-riscv riscv]# perf stat -e r8000000000000005 -e > r8000000000000007 -e r8000000000000006 -e r0000000000020002 -e > r0000000000020004 -e branch-misses -e cache-misses -e > dTLB-load-misses -e dTLB-store-misses -e iTLB-load-misses -e cycles > -e instructions ./hackbench -pipe 15 process Running with 15*40 (== > 600) tasks. Time: 6.578 > > Performance counter stats for './hackbench -pipe 15 process': > > 6,491 r8000000000000005 (52.59%) --> > SBI_PMU_FW_SET_TIMER 20,433 r8000000000000007 (60.74%) --> > SBI_PMU_FW_IPI_RECVD 21,271 r8000000000000006 (68.71%) --> > SBI_PMU_FW_IPI_SENT 0 r0000000000020002 (76.55%) > r0000000000020004 (0.00%) > branch-misses (0.00%) > cache-misses (0.00%) > 57,537,853 dTLB-load-misses (9.49%) > 2,821,147 dTLB-store-misses (18.64%) > 52,928,130 iTLB-load-misses (27.53%) > 89,521,791,110 cycles (36.08%) > 90,678,132,464 instructions # 1.01 insn per cycle > (44.44%) > > 6.975908032 seconds time elapsed > > 3.130950000 seconds user > 24.353310000 seconds sys > Tested your patch series with qemu and got results as expected: perf stat -e r8000000000000005 -e r8000000000000007 \ -e r8000000000000006 -e r0000000000020002 -e r0000000000020004 -e branch-misses \ -e cache-misses -e dTLB-load-misses -e dTLB-store-misses -e iTLB-load-misses \ -e cycles -e instructions ./hackbench -pipe 15 process Running with 15*40 (== 600) tasks.nch -pipe 15 process Time: 20.027 Performance counter stats for './hackbench -pipe 15 process': 4896 r8000000000000005 (53.34%) 0 r8000000000000007 (61.20%) 0 r8000000000000006 (68.88%) 0 r0000000000020002 (76.53%) r0000000000020004 (0.00%) branch-misses (0.00%) cache-misses (0.00%) 48414917 dTLB-load-misses (9.87%) 2427413 dTLB-store-misses (19.43%) 46958092 iTLB-load-misses (28.58%) 69245163600 cycles (37.09%) 70334279943 instructions # 1.02 insn per cycle (45.24%) 20.895871900 seconds time elapsed 2.724942000 seconds user 18.126277000 seconds sys perf top/record also works. Tested-by: Nikita Shubin Yours, Nikita Shubin