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 A594CC433F5 for ; Wed, 27 Oct 2021 23:28:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 86AE661039 for ; Wed, 27 Oct 2021 23:28:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229534AbhJ0XbU (ORCPT ); Wed, 27 Oct 2021 19:31:20 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:30410 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229519AbhJ0XbU (ORCPT ); Wed, 27 Oct 2021 19:31:20 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1635377333; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=6MsFe0BTKjqeuq4XqqNMi66hT+5w0Yp/tkDpdk35FH8=; b=FMtBM0HbbkYBXOauS1LlmGnwbiM2fRwmijtK3uO+Fk5ii2TOdwJ/4+Eq1qzRhqKf9pTh3d 9S2F8sQZ0CY4ts48XXaews5FY+UXBwXWlIbHj8gPfXc0OAErvXDZe2RWWahkTZXUrzTLO5 /UrdFlnhqPxZu6QumAhFO3oGwh9OU50= Received: from mail-il1-f198.google.com (mail-il1-f198.google.com [209.85.166.198]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-120-rSDoRWisPq2m3OCjUS--cw-1; Wed, 27 Oct 2021 19:28:52 -0400 X-MC-Unique: rSDoRWisPq2m3OCjUS--cw-1 Received: by mail-il1-f198.google.com with SMTP id e3-20020a056e020b2300b0025abde2b7a6so2826412ilu.22 for ; Wed, 27 Oct 2021 16:28:52 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:in-reply-to:message-id :references:mime-version; bh=6MsFe0BTKjqeuq4XqqNMi66hT+5w0Yp/tkDpdk35FH8=; b=dLRqn3qxRATIYOYfto5VCko83CzbQx1d+Zrnl2iQRu2XPb97pzTtYjreGqZkvSjz18 jQe5LrNFq0P9mJMh7OHFNjCuwgBoZfLsjvNGpG43W5b9WHxwzsoiuupKgT1iWGaVya4F 4TPUro6LEeqIAeGOfNwkB4NEBH3TmxdKqiVaPc+2jTekqnh6+9e4TPmf54ea9rT3Qluk ptQqbEMpWsp0G0KNRp7pId6BfY5uK1Wisp3DdKmArlQ+zFjSKoCbdwLMugEcAuOlCF1o f+/kpGTc7flGdP3tKTHUxgEpgzCR/UJSgBc4EVsEnqdSzywHgLgyv4jq89Wg1eG7zDDz ejaA== X-Gm-Message-State: AOAM533YbWe45KtaaI08syRWNyez5f3IQ/+icGjILKTXasty2IMTg+Rr BDh1DSHRD9Wkxag5xfJjcSff797hgcRAW42wUYapmA4RdOThxXmOMuD+sCNZxkH+dQXQBzPyqSF udFuWxK7MHEpKYb7S1rNHJfbImHI= X-Received: by 2002:a6b:7b4a:: with SMTP id m10mr416561iop.54.1635377331783; Wed, 27 Oct 2021 16:28:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyvaqHZS1g7RO6waiTaq/2L4s/RYzhKsQtZg7vhnMAIOdXbPNXs9+xKPigMctdWNL91/1RkZA== X-Received: by 2002:a6b:7b4a:: with SMTP id m10mr416555iop.54.1635377331635; Wed, 27 Oct 2021 16:28:51 -0700 (PDT) Received: from fionn (bras-base-rdwyon0600w-grc-08-184-147-142-154.dsl.bell.ca. [184.147.142.154]) by smtp.gmail.com with ESMTPSA id c5sm616504ilq.71.2021.10.27.16.28.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Oct 2021 16:28:51 -0700 (PDT) Date: Wed, 27 Oct 2021 19:28:50 -0400 (EDT) From: John Kacur To: Punit Agrawal cc: linux-rt-users@vger.kernel.org, Punit Agrawal Subject: Re: [PATCH v3 3/4] rteval: cyclictest.py: Sort the list of cpus In-Reply-To: <20211018055736.412576-4-punitagrawal@gmail.com> Message-ID: References: <20211018055736.412576-1-punitagrawal@gmail.com> <20211018055736.412576-4-punitagrawal@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Precedence: bulk List-ID: X-Mailing-List: linux-rt-users@vger.kernel.org On Mon, 18 Oct 2021, Punit Agrawal wrote: > 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 > > Signed-off-by: John Kacur