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 X-Spam-Level: X-Spam-Status: No, score=-15.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id AE618C433F5 for ; Fri, 17 Sep 2021 08:54:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 91E1761056 for ; Fri, 17 Sep 2021 08:54:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236380AbhIQIzw (ORCPT ); Fri, 17 Sep 2021 04:55:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44062 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245532AbhIQIzo (ORCPT ); Fri, 17 Sep 2021 04:55:44 -0400 Received: from mail-pj1-x1033.google.com (mail-pj1-x1033.google.com [IPv6:2607:f8b0:4864:20::1033]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4743FC061574 for ; Fri, 17 Sep 2021 01:54:23 -0700 (PDT) Received: by mail-pj1-x1033.google.com with SMTP id v19so6513565pjh.2 for ; Fri, 17 Sep 2021 01:54:23 -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=Z80GQydzHXzySM8siCRv8E0H7vd7GMKiL8wqyWIgvyc=; b=bIG9MmmMykg8jTD4RtWdivvmYHsK+Q42w2bhVUdGR0oeGaTXSsjwF8QL/tCUsspc79 P5RYzRYEqWeFyprsja00zcntUp4x5vy52ZqOsEiTMGJlTRVxznZHUgW6KVqAHbnfqjPE Je9C45MaD2LOXEcfIQNii5w6wuVdC7lmZWdPmGpjxnPoCW5yh0P1t0u/99SDNrwBNdkQ NJ2e+DJYPK0cR72rQRGjjpCYVA+Xk/bCFqRKzz4iIe7OqPuQFcbgzEZCFdOkCkH9vkAl MxKxQS/XNUeY1kPTxIHlhqhP9GX3tunU30h0rkTSZXc8EgLXy2bSMf3rxpk0jCDEzcPI P5sw== 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=Z80GQydzHXzySM8siCRv8E0H7vd7GMKiL8wqyWIgvyc=; b=gA6ZS3Jk7V5JlF2EpPLiPYjgBzUgANcxWwlq/4lJNYHcRzkWQX11fCuh+Kadky5+VZ aYjS6u1M02mefB/xMDltQcY/gvqcgzOZ/tUAiT9VcmUfNnykKTUYiTsAi0WVEzB6hiXA yyUhyM/n0Wyl/dMmTplzsx15i1orgHpwNYM2T0SO2HF/XX8iMtrqe3LfPVQq9k1IlqSo JIYOkNCPAq4kglutMtpa2y4Y0CZnB5z/yvx7oPPhaAEmjEv2jy1zCn+0fjLaCaPVFE3P 6038QFWITwgExeCGmNBxMp0Dr1QosxDXvVpMsSNTKcENb5zL75ikLIKUjou7yaSWWL3E kQSA== X-Gm-Message-State: AOAM530v44FX+zbLsQKGuSkHZfFooVdxow0kWaZQFScvttbxHVL/Kpch fGAS0HLFCFHsBKeGkKicyk4= X-Google-Smtp-Source: ABdhPJy7BfO0ODqGW/mfGwSRDVkMYC8vX6DrkPLXlfjSkoOYyxaW0awniXncENsCLMAmXZiXRGV/sA== X-Received: by 2002:a17:902:64d6:b0:13c:9439:c80 with SMTP id y22-20020a17090264d600b0013c94390c80mr8583876pli.52.1631868862802; Fri, 17 Sep 2021 01:54:22 -0700 (PDT) Received: from localhost (122x211x248x161.ap122.ftth.ucom.ne.jp. [122.211.248.161]) by smtp.gmail.com with ESMTPSA id u12sm4789439pjx.31.2021.09.17.01.54.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Sep 2021 01:54:22 -0700 (PDT) From: Punit Agrawal To: jkacur@redhat.com Cc: Punit Agrawal , linux-rt-users@vger.kernel.org, punit1.agrawal@toshiba.co.jp Subject: [PATCH v2 3/3] rteval: cyclictest.py: Sort the list of cpus Date: Fri, 17 Sep 2021 17:53:43 +0900 Message-Id: <20210917085343.2775300-4-punitagrawal@gmail.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210917085343.2775300-1-punitagrawal@gmail.com> References: <20210917085343.2775300-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.32.0