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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A00C8C433F5 for ; Mon, 18 Oct 2021 05:58:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 78A1960F59 for ; Mon, 18 Oct 2021 05:58:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229847AbhJRGAY (ORCPT ); Mon, 18 Oct 2021 02:00:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43604 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229533AbhJRGAX (ORCPT ); Mon, 18 Oct 2021 02:00:23 -0400 Received: from mail-pg1-x52e.google.com (mail-pg1-x52e.google.com [IPv6:2607:f8b0:4864:20::52e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 12CC5C06161C for ; Sun, 17 Oct 2021 22:58:13 -0700 (PDT) Received: by mail-pg1-x52e.google.com with SMTP id 75so14987929pga.3 for ; Sun, 17 Oct 2021 22:58:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=qFeyurc1UAgd02tSBqozzJAUrIsfSw86wXAsrBcF5hQ=; b=ct4C9bg0yMDQrEMtR721Ah05aZPoUG+w2DjgW1gzug0cKl/i9dQFLPV8l5cP6yHDFv uIVkQF1fjnDDfmame5WuGf7vAec9PQQ0Y2LJvpQvsbNv+LDciPvaQOpE53CyI5aNyDU6 0co4Axt4yPJwOe/cnKt5HvbXwOPK05lKD2apMc8OXQY80WnuT+9KxbcdqVpb5SrWDRuO i8ADsD7xunSGuOzReyPn7Gu3Zmf2XL5eik20El+RhKPlbmxBuLUHMB7sXN9+ezmbFiII SmbCIUtSy1PQynVUEShU1ilUGtPv/35ceDg2tUBxRtgXWXHzoUln8sXTbMWlIGgRnEY7 BqcQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=qFeyurc1UAgd02tSBqozzJAUrIsfSw86wXAsrBcF5hQ=; b=ztpdhVdEz9KkiRGrePw8LDSoMONzoEwBL7VrC+X5b2ImyQnNDwgAzMEKYhZuB23His P7PLlhrUNY82CQO8KqMtzwQ2Xj/kkxwUDoP5o3uDiv/I6JJxC016dt7b0E1ep8X23JR2 P4YM1OSC0QK7eqhI3k+OY4/Q6bGYvDiEdP4OmW8Sxus4DNnxnZ9Tud76scH7SkCKNb31 HWlutAIQEfjcZzePEgaaMU1x1yxMtDK2kNynL0g2unIBhsXaqtQx0vtVizZe45pr0VZu Wpd/5ixy/FcVLBx7Ba0miXTiZuhAM26olVGFMwAQixw6djM5R36ghY7L82PVcf3RnFGZ Fanw== X-Gm-Message-State: AOAM530M84ud8E5XGkRmmJ5RffrPKf3UKCdikXyGQQJ3wm+NVsU4ze+t jOzxIhkB74klQX2wPNqEBlA= X-Google-Smtp-Source: ABdhPJzbxrd48ER3wRq4izTi/e/L78ZATAhMUbMfV7M9zwpwir4230sXHpkbeqNzTlT3rdSzuFolfA== X-Received: by 2002:a63:4344:: with SMTP id q65mr22149353pga.450.1634536692589; Sun, 17 Oct 2021 22:58:12 -0700 (PDT) Received: from localhost (122x211x248x161.ap122.ftth.ucom.ne.jp. [122.211.248.161]) by smtp.gmail.com with ESMTPSA id w125sm11759181pfc.66.2021.10.17.22.58.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 Oct 2021 22:58:12 -0700 (PDT) From: Punit Agrawal To: jkacur@redhat.com Cc: Punit Agrawal , linux-rt-users@vger.kernel.org, Punit Agrawal Subject: [PATCH v3 3/4] rteval: cyclictest.py: Sort the list of cpus Date: Mon, 18 Oct 2021 14:57:35 +0900 Message-Id: <20211018055736.412576-4-punitagrawal@gmail.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211018055736.412576-1-punitagrawal@gmail.com> References: <20211018055736.412576-1-punitagrawal@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-rt-users@vger.kernel.org From: Punit Agrawal online_cpus() returns a list of online cpus in arbitrary order. e.g., on a hexacore system it returns - ['5', '3', '1', '4', '2', '0'] Generally this wouldn't be a problem but the cyclictest.py module matches the unsorted list with the latencies output by "cyclictest" which are ordered by core number. This leads to incorrect reporting of per-core latencies in the final report generated by rteval. The issue was noticed when comparing the rteval report with cyclictest logs (enabled by a recent change). Fix the inconsistency in core numbering by sorting the list of cpus used by cyclictest.py module. As the cpus are represented as a string, sort with the integer key to avoid issues on systems with large number of cores. Signed-off-by: Punit Agrawal --- rteval/modules/measurement/cyclictest.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/rteval/modules/measurement/cyclictest.py b/rteval/modules/measurement/cyclictest.py index d3a0b045b9dd..50a734c75047 100644 --- a/rteval/modules/measurement/cyclictest.py +++ b/rteval/modules/measurement/cyclictest.py @@ -216,6 +216,10 @@ class Cyclictest(rtevalModulePrototype): else: self.__cpus = online_cpus() + # Sort the list of cpus to align with the order reported by + # cyclictest + self.__cpus.sort(key=int) + # Get the cpuset from the environment cpuset = os.sched_getaffinity(0) -- 2.33.0