Received: by 2002:a05:7412:8521:b0:e2:908c:2ebd with SMTP id t33csp1998164rdf; Mon, 6 Nov 2023 01:17:09 -0800 (PST) X-Google-Smtp-Source: AGHT+IGRKhbqDpjPmPr7jVJuI8vaidsGQo+kZjtXZ+Ys+Jq1uGeygAenvg7NllyNk9UZnK17UOco X-Received: by 2002:a17:902:e845:b0:1cc:3fce:8aa8 with SMTP id t5-20020a170902e84500b001cc3fce8aa8mr20895934plg.6.1699262229484; Mon, 06 Nov 2023 01:17:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699262229; cv=none; d=google.com; s=arc-20160816; b=BmqQ/CoTF9tXKRg97TCL6VxBrtZ1glI7wVGvHuwviqDNGzeVZ5+5VcogKIyzC1850X GXAKKeRIwKVWKx4X8E1B5VG7zeo/NZMxiHhYIzRsQq0TjlHJJeNCmPnUWyFFYbHwAEZH kAirspM3gwoKvdlAYJGP0/sKwl6Mxa5ZIc1eNSo+7Oju4Ac/eXim93JuWeIQrBfUMiTW yROvItnnntk0HL6DMW1qN+ohnC3vPo3YzfMWA3ZnfamoYb8Y5LO0Wnk1N2x5Pfw0Lmq/ h6cq3jTQYXv//l5srEFuZsMcP85Igc1lBS+FE9Bpor8Lj/OfCaYGF6KO9kRRrf5YdEB+ KlRQ== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=0/Q0Ge0wOeHrnYI00dxrJo5eTA+PZ3BAJJf6HaX7Wcg=; fh=3Y1f3z7hRwLIPy2qnQIarh0pYsPNPG0kjfFuW/+rRA8=; b=QMSUSlPBFnDKY1EXcCy++Lu5BIGQx+cZ5yr4iBE0g+xunszG3INzL3z7TzoeLn/peH sG5qYpGJJgxpVpBuE3qAhCeEZzFEqYwUo8OKBMmJGd7ApVQ+o6lSe2yWnG+jsDTRFATk Uqqm4pmij8xgCtCh126TWMm2T6AMJiPnaotcJu5830AzxxlJXHbpPeuPO0bRHTCNgI57 Tl2gAXFquIPNC3ik80sQ7Vmx/wpmyNRvGZIET5qV2nTH2Hu+hGxAiLM0I7Q/nraZG1x8 1xE2kOX9Mi6dV2YPcWItCJ9Yx8Ga7sQ0Stsesq283OIQ3JOmHO39f8geCEbAkovvwHYW jrtw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=bbG5cggl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id lh13-20020a170903290d00b001c60636e426si7262873plb.432.2023.11.06.01.17.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Nov 2023 01:17:09 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=bbG5cggl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 7A95E805B6C2; Mon, 6 Nov 2023 01:17:06 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231266AbjKFJQy (ORCPT + 99 others); Mon, 6 Nov 2023 04:16:54 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59436 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230475AbjKFJQw (ORCPT ); Mon, 6 Nov 2023 04:16:52 -0500 Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B61FFCC; Mon, 6 Nov 2023 01:16:49 -0800 (PST) Received: from pps.filterd (m0353728.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3A69GOuL022631; Mon, 6 Nov 2023 09:16:41 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : mime-version : content-transfer-encoding; s=pp1; bh=0/Q0Ge0wOeHrnYI00dxrJo5eTA+PZ3BAJJf6HaX7Wcg=; b=bbG5cgglIc2ObLAOWbYBEp4TEp3gzacdMrhS6JOVAAyHgD9j7Gp9yCiiH3lQi7thU6Pi 5jmzKbdBHQeBQQbagutiJMyf2bxoMcnvUFkIEzmBl+bzSxpwj84utDsdWcsVA32KbD29 swaVZUOFl1dbafq5V49nWpINDFGyU+NIlMLWSKjmuzLirKHGR+i85P5AdR12Aeld4fUM YsAnZNv3z/OmrGxXTkYnzpzfDfUpsy84lLDW9cLvTcD34NSTW7IPoJnZBt9FZURSuQli p1dvjJwSZ4pwaKTaF64E/3iY+dnMUJ7RtQlD4QSklLC/kq/th0vIkQHY3Jw5N/ISIOgj CQ== Received: from ppma21.wdc07v.mail.ibm.com (5b.69.3da9.ip4.static.sl-reverse.com [169.61.105.91]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3u6uj0kcjt-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 06 Nov 2023 09:16:41 +0000 Received: from pps.filterd (ppma21.wdc07v.mail.ibm.com [127.0.0.1]) by ppma21.wdc07v.mail.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 3A68S0Mj025671; Mon, 6 Nov 2023 09:16:39 GMT Received: from smtprelay05.fra02v.mail.ibm.com ([9.218.2.225]) by ppma21.wdc07v.mail.ibm.com (PPS) with ESMTPS id 3u619n86xs-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 06 Nov 2023 09:16:38 +0000 Received: from smtpav01.fra02v.mail.ibm.com (smtpav01.fra02v.mail.ibm.com [10.20.54.100]) by smtprelay05.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 3A69GZRV16646790 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 6 Nov 2023 09:16:36 GMT Received: from smtpav01.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id CFF3220040; Mon, 6 Nov 2023 09:16:35 +0000 (GMT) Received: from smtpav01.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id A1EB720043; Mon, 6 Nov 2023 09:16:35 +0000 (GMT) Received: from tuxmaker.boeblingen.de.ibm.com (unknown [9.152.85.9]) by smtpav01.fra02v.mail.ibm.com (Postfix) with ESMTP; Mon, 6 Nov 2023 09:16:35 +0000 (GMT) From: Thomas Richter To: linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, acme@kernel.org, namhyung@kernel.org Cc: svens@linux.ibm.com, gor@linux.ibm.com, sumanthk@linux.ibm.com, hca@linux.ibm.com, Ilya Leoshkevich , Thomas Richter Subject: [PATCH v2 PING] perf test: Adjust test case perf record offcpu profiling tests for s390 Date: Mon, 6 Nov 2023 10:16:27 +0100 Message-Id: <20231106091627.2022530-1-tmricht@linux.ibm.com> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: W1dcv77m9a-K-07oadxRDNJvgd-oxPik X-Proofpoint-GUID: W1dcv77m9a-K-07oadxRDNJvgd-oxPik X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-06_07,2023-11-02_03,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 clxscore=1011 mlxlogscore=999 spamscore=0 malwarescore=0 adultscore=0 mlxscore=0 lowpriorityscore=0 suspectscore=0 phishscore=0 bulkscore=0 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2310240000 definitions=main-2311060080 X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Mon, 06 Nov 2023 01:17:06 -0800 (PST) On s390 using linux-next the test case 87: perf record offcpu profiling tests fails. The root cause is this command # ./perf record --off-cpu -e dummy -- ./perf bench sched messaging -l 10 # Running 'sched/messaging' benchmark: # 20 sender and receiver processes per group # 10 groups == 400 processes run Total time: 0.231 [sec] [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 0.077 MB perf.data (401 samples) ] # It does not generate 800+ sample entries, on s390 usually around 40[1-9], sometimes a few more, but never more than 450. The higher the number of CPUs the lower the number of samples. Looking at function chain bench_sched_messaging() +--> group() the senders and receiver threads are created. The senders and receivers call function ready() which writes one bytes and wait for a reply using poll system() call. As context switches are counted, the function ready() will trigger a context switch when no input data is available after the write system call. The write system call does not trigger context switches when the data size is small. And writing 1000 bytes (10 iterations with 100 bytes) is not much and certainly won't block. The 400+ context switch on s390 occur when the some receiver/sender threads call ready() and wait for the response from function bench_sched_messaging() being kicked off. Lower the number of expected context switches to 400 to succeed on s390. Suggested-by: Namhyung Kim Signed-off-by: Ilya Leoshkevich Co-developed-by: Ilya Leoshkevich Signed-off-by: Thomas Richter --- tools/perf/tests/shell/record_offcpu.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/perf/tests/shell/record_offcpu.sh b/tools/perf/tests/shell/record_offcpu.sh index a1ef8f0d2b5c..67c925f3a15a 100755 --- a/tools/perf/tests/shell/record_offcpu.sh +++ b/tools/perf/tests/shell/record_offcpu.sh @@ -77,9 +77,9 @@ test_offcpu_child() { err=1 return fi - # each process waits for read and write, so it should be more than 800 events + # each process waits at least for poll, so it should be more than 400 events if ! perf report -i ${perfdata} -s comm -q -n -t ';' --percent-limit=90 | \ - awk -F ";" '{ if (NF > 3 && int($3) < 800) exit 1; }' + awk -F ";" '{ if (NF > 3 && int($3) < 400) exit 1; }' then echo "Child task off-cpu test [Failed invalid output]" err=1 -- 2.41.0