{"id":2132470,"url":"http://patchwork.ozlabs.org/api/patches/2132470/?format=json","web_url":"http://patchwork.ozlabs.org/project/ubuntu-kernel/patch/c59857aeaa0abff0b90583d8d1bf06bb78125c37.1756973061.git.massimiliano.pellizzer@canonical.com/","project":{"id":15,"url":"http://patchwork.ozlabs.org/api/projects/15/?format=json","name":"Ubuntu Kernel","link_name":"ubuntu-kernel","list_id":"kernel-team.lists.ubuntu.com","list_email":"kernel-team@lists.ubuntu.com","web_url":null,"scm_url":null,"webscm_url":null,"list_archive_url":"","list_archive_url_format":"","commit_url_format":""},"msgid":"<c59857aeaa0abff0b90583d8d1bf06bb78125c37.1756973061.git.massimiliano.pellizzer@canonical.com>","list_archive_url":null,"date":"2025-09-04T08:11:27","name":"[SRU,J,02/12] perf vendor events s390: Add common metrics","commit_ref":null,"pull_url":null,"state":"new","archived":false,"hash":"d627d0e10be26df055013d8c2e2db2963c7e3b46","submitter":{"id":89057,"url":"http://patchwork.ozlabs.org/api/people/89057/?format=json","name":"Massimiliano Pellizzer","email":"massimiliano.pellizzer@canonical.com"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/ubuntu-kernel/patch/c59857aeaa0abff0b90583d8d1bf06bb78125c37.1756973061.git.massimiliano.pellizzer@canonical.com/mbox/","series":[{"id":472179,"url":"http://patchwork.ozlabs.org/api/series/472179/?format=json","web_url":"http://patchwork.ozlabs.org/project/ubuntu-kernel/list/?series=472179","date":"2025-09-04T08:11:25","name":"CPU-MF Counters for new IBM Z hardware - perf part (LP: #2103415)","version":1,"mbox":"http://patchwork.ozlabs.org/series/472179/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/2132470/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/2132470/checks/","tags":{},"related":[],"headers":{"Return-Path":"<kernel-team-bounces@lists.ubuntu.com>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@legolas.ozlabs.org","Authentication-Results":"legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=lists.ubuntu.com\n (client-ip=185.125.189.65; helo=lists.ubuntu.com;\n envelope-from=kernel-team-bounces@lists.ubuntu.com;\n receiver=patchwork.ozlabs.org)","Received":["from lists.ubuntu.com (lists.ubuntu.com [185.125.189.65])\n\t(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4cHXKd66Hlz1xyS\n\tfor <incoming@patchwork.ozlabs.org>; Thu,  4 Sep 2025 18:13:09 +1000 (AEST)","from localhost ([127.0.0.1] helo=lists.ubuntu.com)\n\tby lists.ubuntu.com with esmtp (Exim 4.86_2)\n\t(envelope-from <kernel-team-bounces@lists.ubuntu.com>)\n\tid 1uu55Z-0001fO-MM; Thu, 04 Sep 2025 08:13:01 +0000","from smtp-relay-internal-0.internal ([10.131.114.225]\n helo=smtp-relay-internal-0.canonical.com)\n by lists.ubuntu.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)\n (Exim 4.86_2) (envelope-from <massimiliano.pellizzer@canonical.com>)\n id 1uu55X-0001ZF-Nn\n for kernel-team@lists.ubuntu.com; Thu, 04 Sep 2025 08:12:59 +0000","from mail-ej1-f71.google.com (mail-ej1-f71.google.com\n [209.85.218.71])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest\n SHA256)\n (No client certificate requested)\n by smtp-relay-internal-0.canonical.com (Postfix) with ESMTPS id 0A7983F657\n for <kernel-team@lists.ubuntu.com>; Thu,  4 Sep 2025 08:12:57 +0000 (UTC)","by mail-ej1-f71.google.com with SMTP id\n a640c23a62f3a-b032d67e4f6so73690466b.3\n for <kernel-team@lists.ubuntu.com>; Thu, 04 Sep 2025 01:12:57 -0700 (PDT)","from framework-canonical.lan\n (net-31-156-181-205.cust.vodafonedsl.it. [31.156.181.205])\n by smtp.gmail.com with ESMTPSA id\n a640c23a62f3a-b041565ca98sm1131743766b.86.2025.09.04.01.12.53\n for <kernel-team@lists.ubuntu.com>\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Thu, 04 Sep 2025 01:12:53 -0700 (PDT)"],"X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20230601; t=1756973574; x=1757578374;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:to:from:x-gm-message-state:from:to:cc\n :subject:date:message-id:reply-to;\n bh=Rm6ik92OdvSweV/Z2x1dniMbdsm1PhK86u7UhI/MzIE=;\n b=w3mjbB/srYhBI7Y3QUUyJC7HV6Us0wwJxVxdUVKkvWC6Z/WLGYVzPhyec28AoFxAwq\n 0XciAROjINsL3dvx5nFxGsuHhrTe9Ed0zrDX5wLK9/cZrUviLx3Infyswwe5rHFvEQJz\n lJUXG9lJmLuNbgxkLXwUjXsAagx4BPUQNKfyCToGEbsmDWDFTZ2Y2+k5+GvV4xaogozS\n MInUemQn58U4yMPCO4H4jyZ+TQY36mJL0aJQDDYpU77x0GXqJ8oQmXAnKmNPWbvXW7Mw\n hAMz1KqNgfzV5rb/Hdu4U7hcQIiAoIpnIUiFKPsZ4bBCZ6aXNFsJVLld9ISMecT3tRfe\n ai+g==","X-Gm-Message-State":"AOJu0YzD6CzUA/YGC5p4ZTiXPP1KQrh4uEJUl+W4ahzhjr8Cg3XQXMjR\n //CwPwQlHb+VLwm4iXgysCBf8yuE9FniIfSK/m5bSio508riOIFpBC4zIg9S54cva+adN52BgAR\n tjFe+BU2H5PAexYkNFduVVgMbMBW3Giy3/K7FV745OonYn85vfBOfS4GdvdCo9lPoMPsR+2o7TY\n IBu1eWW5hm7TgYVg==","X-Gm-Gg":"ASbGncuc50DIaeHG7vCrJ2w8v+Xfim+H9o288bW5eua4LZwDuh2zcbQocULddFHBp2G\n vTG5LIxHIoLx5/TVIFeyXHI+596QAOmtGfhGDSJ7aXRHH1U7033Fjlf3hWhhqXgNZvDxOOG3M/f\n ylE7KZXsEXypfkV8y59VKbZj4JLL4+JoCX7P+0EFfwOsLGNbb4CZUIj1kMSww8J5wrS7YvqaIiJ\n ZowGM4m3LX1FgZXidm4esVeLh3Mo9CZgt+WIXTc0QP04ykwrTR4HiSTWWRKMds6szIc6lgWwRda\n QRGPozBSXuBdQQ/ry293SAiooPU5m2+02AbIAgQ027LZjNCNQmT/WXY+WKqN1HcRuyfHyCtTVHf\n TA0HXzkHx8uGuD1CgpQjZfBC8pBkIuOAGV17ydQxAgqOG","X-Received":["by 2002:a17:907:72c4:b0:b04:82bc:1dd2 with SMTP id\n a640c23a62f3a-b0482bc1fe6mr113704566b.29.1756973574323;\n Thu, 04 Sep 2025 01:12:54 -0700 (PDT)","by 2002:a17:907:72c4:b0:b04:82bc:1dd2 with SMTP id\n a640c23a62f3a-b0482bc1fe6mr113702166b.29.1756973573872;\n Thu, 04 Sep 2025 01:12:53 -0700 (PDT)"],"X-Google-Smtp-Source":"\n AGHT+IE+Spid0WU0dDH2vDa4S5lp/i8CuFMciuyetjuG0YXKtfT/bSIDOLN3nODkUHiVokZzmHIUEA==","From":"Massimiliano Pellizzer <massimiliano.pellizzer@canonical.com>","To":"kernel-team@lists.ubuntu.com","Subject":"[SRU][J][PATCH 02/12] perf vendor events s390: Add common metrics","Date":"Thu,  4 Sep 2025 10:11:27 +0200","Message-ID":"\n <c59857aeaa0abff0b90583d8d1bf06bb78125c37.1756973061.git.massimiliano.pellizzer@canonical.com>","X-Mailer":"git-send-email 2.48.1","In-Reply-To":"<cover.1756973061.git.massimiliano.pellizzer@canonical.com>","References":"\n <175697071248.21594.2440727989420834998@framework-canonical.public>\n <cover.1756973061.git.massimiliano.pellizzer@canonical.com>","MIME-Version":"1.0","X-BeenThere":"kernel-team@lists.ubuntu.com","X-Mailman-Version":"2.1.20","Precedence":"list","List-Id":"Kernel team discussions <kernel-team.lists.ubuntu.com>","List-Unsubscribe":"<https://lists.ubuntu.com/mailman/options/kernel-team>,\n <mailto:kernel-team-request@lists.ubuntu.com?subject=unsubscribe>","List-Archive":"<https://lists.ubuntu.com/archives/kernel-team>","List-Post":"<mailto:kernel-team@lists.ubuntu.com>","List-Help":"<mailto:kernel-team-request@lists.ubuntu.com?subject=help>","List-Subscribe":"<https://lists.ubuntu.com/mailman/listinfo/kernel-team>,\n <mailto:kernel-team-request@lists.ubuntu.com?subject=subscribe>","Content-Type":"text/plain; charset=\"utf-8\"","Content-Transfer-Encoding":"base64","Errors-To":"kernel-team-bounces@lists.ubuntu.com","Sender":"\"kernel-team\" <kernel-team-bounces@lists.ubuntu.com>"},"content":"From: Thomas Richter <tmricht@linux.ibm.com>\n\nBugLink: https://bugs.launchpad.net/bugs/2103415\n\nAdd 3 metrics for s390 machines:\n\n- Cycles per instruction: Amount of CPU cycles used per instructions,\n  named cpi.\n- Problem state ratio: Ratio of instructions executed in problem state\n  compared to total number of instructions, named prbstate.\n- Level one instruction and data cache misses per 100 instructions,\n  named l1mp.\n\nFor details about the formulas see this documentation:\nhttps://www.ibm.com/support/pages/system/files/inline-files/CPU%20MF%20Formulas%20including%20z16%20-%20May%202022_1.pdf\n\nOutput after:\n\n  # ./perf stat -M cpi -- dd if=/dev/zero of=/dev/null bs=1M count=10K\n  10240+0 records in\n  10240+0 records out\n  10737418240 bytes (11 GB, 10 GiB) copied, 1.30151 s, 8.2 GB/s\n\n  Performance counter stats for 'dd if=/dev/zero of=/dev/null .....':\n\n    6,779,778,802      CPU_CYCLES              #     1.96 cpi\n    3,461,975,090      INSTRUCTIONS\n\n    1.306873021 seconds time elapsed\n\n    0.001034000 seconds user\n    1.305677000 seconds sys\n  #\n\nSigned-off-by: Thomas Richter <tmricht@linux.ibm.com>\nAcked-by: Ian Rogers <irogers@google.com>\nAcked-By: Sumanth Korikkar <sumanthk@linux.ibm.com>\nCc: Heiko Carstens <hca@linux.ibm.com>\nCc: Sven Schnelle <svens@linux.ibm.com>\nCc: Vasily Gorbik <gor@linux.ibm.com>\nLink: https://lore.kernel.org/r/20230313080201.2440201-1-tmricht@linux.ibm.com\nSigned-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>\n(cherry picked from commit 74395567a3011a07f51cf959be96c1eecb3e6df8)\nSigned-off-by: Massimiliano Pellizzer <massimiliano.pellizzer@canonical.com>\n---\n .../pmu-events/arch/s390/cf_z13/transaction.json  | 15 +++++++++++++++\n .../pmu-events/arch/s390/cf_z14/transaction.json  | 15 +++++++++++++++\n .../pmu-events/arch/s390/cf_z15/transaction.json  | 15 +++++++++++++++\n .../pmu-events/arch/s390/cf_z16/transaction.json  | 15 +++++++++++++++\n 4 files changed, 60 insertions(+)","diff":"diff --git a/tools/perf/pmu-events/arch/s390/cf_z13/transaction.json b/tools/perf/pmu-events/arch/s390/cf_z13/transaction.json\nindex 1a0034f79f73..86bf83b4504e 100644\n--- a/tools/perf/pmu-events/arch/s390/cf_z13/transaction.json\n+++ b/tools/perf/pmu-events/arch/s390/cf_z13/transaction.json\n@@ -3,5 +3,20 @@\n     \"BriefDescription\": \"Transaction count\",\n     \"MetricName\": \"transaction\",\n     \"MetricExpr\": \"TX_C_TEND + TX_NC_TEND + TX_NC_TABORT + TX_C_TABORT_SPECIAL + TX_C_TABORT_NO_SPECIAL\"\n+  },\n+  {\n+    \"BriefDescription\": \"Cycles per Instruction\",\n+    \"MetricName\": \"cpi\",\n+    \"MetricExpr\": \"CPU_CYCLES / INSTRUCTIONS\"\n+  },\n+  {\n+    \"BriefDescription\": \"Problem State Instruction Ratio\",\n+    \"MetricName\": \"prbstate\",\n+    \"MetricExpr\": \"(PROBLEM_STATE_INSTRUCTIONS / INSTRUCTIONS) * 100\"\n+  },\n+  {\n+    \"BriefDescription\": \"Level One Miss per 100 Instructions\",\n+    \"MetricName\": \"l1mp\",\n+    \"MetricExpr\": \"((L1I_DIR_WRITES + L1D_DIR_WRITES) / INSTRUCTIONS) * 100\"\n   }\n ]\ndiff --git a/tools/perf/pmu-events/arch/s390/cf_z14/transaction.json b/tools/perf/pmu-events/arch/s390/cf_z14/transaction.json\nindex 1a0034f79f73..86bf83b4504e 100644\n--- a/tools/perf/pmu-events/arch/s390/cf_z14/transaction.json\n+++ b/tools/perf/pmu-events/arch/s390/cf_z14/transaction.json\n@@ -3,5 +3,20 @@\n     \"BriefDescription\": \"Transaction count\",\n     \"MetricName\": \"transaction\",\n     \"MetricExpr\": \"TX_C_TEND + TX_NC_TEND + TX_NC_TABORT + TX_C_TABORT_SPECIAL + TX_C_TABORT_NO_SPECIAL\"\n+  },\n+  {\n+    \"BriefDescription\": \"Cycles per Instruction\",\n+    \"MetricName\": \"cpi\",\n+    \"MetricExpr\": \"CPU_CYCLES / INSTRUCTIONS\"\n+  },\n+  {\n+    \"BriefDescription\": \"Problem State Instruction Ratio\",\n+    \"MetricName\": \"prbstate\",\n+    \"MetricExpr\": \"(PROBLEM_STATE_INSTRUCTIONS / INSTRUCTIONS) * 100\"\n+  },\n+  {\n+    \"BriefDescription\": \"Level One Miss per 100 Instructions\",\n+    \"MetricName\": \"l1mp\",\n+    \"MetricExpr\": \"((L1I_DIR_WRITES + L1D_DIR_WRITES) / INSTRUCTIONS) * 100\"\n   }\n ]\ndiff --git a/tools/perf/pmu-events/arch/s390/cf_z15/transaction.json b/tools/perf/pmu-events/arch/s390/cf_z15/transaction.json\nindex 1a0034f79f73..86bf83b4504e 100644\n--- a/tools/perf/pmu-events/arch/s390/cf_z15/transaction.json\n+++ b/tools/perf/pmu-events/arch/s390/cf_z15/transaction.json\n@@ -3,5 +3,20 @@\n     \"BriefDescription\": \"Transaction count\",\n     \"MetricName\": \"transaction\",\n     \"MetricExpr\": \"TX_C_TEND + TX_NC_TEND + TX_NC_TABORT + TX_C_TABORT_SPECIAL + TX_C_TABORT_NO_SPECIAL\"\n+  },\n+  {\n+    \"BriefDescription\": \"Cycles per Instruction\",\n+    \"MetricName\": \"cpi\",\n+    \"MetricExpr\": \"CPU_CYCLES / INSTRUCTIONS\"\n+  },\n+  {\n+    \"BriefDescription\": \"Problem State Instruction Ratio\",\n+    \"MetricName\": \"prbstate\",\n+    \"MetricExpr\": \"(PROBLEM_STATE_INSTRUCTIONS / INSTRUCTIONS) * 100\"\n+  },\n+  {\n+    \"BriefDescription\": \"Level One Miss per 100 Instructions\",\n+    \"MetricName\": \"l1mp\",\n+    \"MetricExpr\": \"((L1I_DIR_WRITES + L1D_DIR_WRITES) / INSTRUCTIONS) * 100\"\n   }\n ]\ndiff --git a/tools/perf/pmu-events/arch/s390/cf_z16/transaction.json b/tools/perf/pmu-events/arch/s390/cf_z16/transaction.json\nindex 1a0034f79f73..86bf83b4504e 100644\n--- a/tools/perf/pmu-events/arch/s390/cf_z16/transaction.json\n+++ b/tools/perf/pmu-events/arch/s390/cf_z16/transaction.json\n@@ -3,5 +3,20 @@\n     \"BriefDescription\": \"Transaction count\",\n     \"MetricName\": \"transaction\",\n     \"MetricExpr\": \"TX_C_TEND + TX_NC_TEND + TX_NC_TABORT + TX_C_TABORT_SPECIAL + TX_C_TABORT_NO_SPECIAL\"\n+  },\n+  {\n+    \"BriefDescription\": \"Cycles per Instruction\",\n+    \"MetricName\": \"cpi\",\n+    \"MetricExpr\": \"CPU_CYCLES / INSTRUCTIONS\"\n+  },\n+  {\n+    \"BriefDescription\": \"Problem State Instruction Ratio\",\n+    \"MetricName\": \"prbstate\",\n+    \"MetricExpr\": \"(PROBLEM_STATE_INSTRUCTIONS / INSTRUCTIONS) * 100\"\n+  },\n+  {\n+    \"BriefDescription\": \"Level One Miss per 100 Instructions\",\n+    \"MetricName\": \"l1mp\",\n+    \"MetricExpr\": \"((L1I_DIR_WRITES + L1D_DIR_WRITES) / INSTRUCTIONS) * 100\"\n   }\n ]\n","prefixes":["SRU","J","02/12"]}