From patchwork Wed Jul 7 08:48:48 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Saenz Julienne X-Patchwork-Id: 471622 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=-20.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, 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 81FC9C07E95 for ; Wed, 7 Jul 2021 08:48:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6B29861CC2 for ; Wed, 7 Jul 2021 08:48:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231328AbhGGIvi (ORCPT ); Wed, 7 Jul 2021 04:51:38 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:30568 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231312AbhGGIvh (ORCPT ); Wed, 7 Jul 2021 04:51:37 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1625647736; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=cwuL0ZkglE9+i+mNovBXpEWYLFTVhw5jAdz7hobtpnQ=; b=MFUpZMs3yQoPLbLS0/K6alCpRoLFJqFK3KoJGfUIELQhoDrYYPJ+FqV3HF1xv1PUkDdN+5 wf67GEUFiWfXQOc5ALSsFpgO4Q0dsbWjnl+Fhvq5h17KAHRKyxjCd+DX1MjhxQCNLByhZZ 7NCOcnDbdopJCEay24Ni4gvgeBmbWJU= Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-128-hpX0uvChPNOjVHtk5TdQ3A-1; Wed, 07 Jul 2021 04:48:55 -0400 X-MC-Unique: hpX0uvChPNOjVHtk5TdQ3A-1 Received: by mail-wr1-f72.google.com with SMTP id j2-20020a0560001242b029012c82df4dbbso506523wrx.23 for ; Wed, 07 Jul 2021 01:48:55 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=cwuL0ZkglE9+i+mNovBXpEWYLFTVhw5jAdz7hobtpnQ=; b=iSwD3McqE+Oy1uk5uWTnqaw5VLp+zJ7jK4dfjrpn65aH2jaoT18bvF1XBtyZmJ19PN apyzg345FB/0dOjjwGYlk+9S1FhG+R7HwOFf6a6cmQa0Dyd4IXne5Z6RRHw8tke4srDb rrEHRqBGTlbusP8pe40/S34UghoecE0hCPwIWB9gTe9ipVSwAU6d/4hKqc0b2R+Q/1PK loXSEG2Ixm+wGrcPZUM/ygLwmeSuGoM4dW+F4QvGLDIoVNk12YWKMbVv3Htqc2VzypJS WzDXy7TpIsmCxkhzS9XOCSr7MEX9nuL4mIoBVGtsMacX9Nz+5KKa6ceeTkugSlkE9igw +fSA== X-Gm-Message-State: AOAM532StqXl/B7tiBIs0aCmqymXhPV5Dk8EGLHkNbRQQzA+ua0lC90U fn9Z3gs57OhJlyzXdU6QaB9ifJReFFG4PDiYF4MMTLcqGdN7v2YHV57P9sE4wjLUtoNe7CDCwK2 mJJLrowxWWn6ta6PiNee/VQ5DyZ0M20XVg/yUP2R7Ta2pndQMvMgYh/c3wivWRxjEtFgyI8ldWb 9SDBA= X-Received: by 2002:a05:6000:551:: with SMTP id b17mr26246385wrf.32.1625647734316; Wed, 07 Jul 2021 01:48:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzb7pL9tqB5KebXltY0TSWiaBCoD0exj/vwgjP0spoxgAZSnnmrqaPrI0NgPVCp/P1bpJ0JzA== X-Received: by 2002:a05:6000:551:: with SMTP id b17mr26246364wrf.32.1625647734112; Wed, 07 Jul 2021 01:48:54 -0700 (PDT) Received: from vian.redhat.com ([79.116.5.179]) by smtp.gmail.com with ESMTPSA id k1sm5533390wme.34.2021.07.07.01.48.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Jul 2021 01:48:53 -0700 (PDT) From: Nicolas Saenz Julienne To: linux-rt-users@vger.kernel.org, peterx@redhat.com Cc: williams@redhat.com, jkacur@redhat.com, nsaenzju@redhat.com Subject: [PATCH 1/2] oslat: Remove redundant include Date: Wed, 7 Jul 2021 10:48:48 +0200 Message-Id: <20210707084849.304329-1-nsaenzju@redhat.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-rt-users@vger.kernel.org inttypes.h is already included above. Signed-off-by: Nicolas Saenz Julienne Signed-off-by: John Kacur --- src/oslat/oslat.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/oslat/oslat.c b/src/oslat/oslat.c index 6108fed..1cba6fc 100644 --- a/src/oslat/oslat.c +++ b/src/oslat/oslat.c @@ -29,7 +29,6 @@ #include #include #include -#include #include #include From patchwork Wed Jul 7 08:48:49 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Saenz Julienne X-Patchwork-Id: 471054 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=-20.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, 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 8CD4DC07E9C for ; Wed, 7 Jul 2021 08:49:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 721B361CC1 for ; Wed, 7 Jul 2021 08:49:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231324AbhGGIvj (ORCPT ); Wed, 7 Jul 2021 04:51:39 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:23663 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231312AbhGGIvj (ORCPT ); Wed, 7 Jul 2021 04:51:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1625647739; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=wFENK5WQ8UlEYTg0ua2mP380GQt/Hv+MiOakB/8/2mQ=; b=f2WgOgFbLz+Z074h8uMbSSygu5LloPwWZ8JpQABoYqO9FV1ruK47P18/nfzWroINRNjS2o BSQwV9OP1E5D4vOInIZzr/+6dNs11KrLePXlK76Sa7w8EXLoGBKJ7RaIHYHSz3lXTiCthp sS3CmiLROlC1h/qAHlTkFQ5WmawR1j8= Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-253--9q2R7pjMByjMBSZgtIq0w-1; Wed, 07 Jul 2021 04:48:57 -0400 X-MC-Unique: -9q2R7pjMByjMBSZgtIq0w-1 Received: by mail-wr1-f71.google.com with SMTP id d9-20020adffbc90000b029011a3b249b10so527678wrs.3 for ; Wed, 07 Jul 2021 01:48:57 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=wFENK5WQ8UlEYTg0ua2mP380GQt/Hv+MiOakB/8/2mQ=; b=DQU5rYlrEnyAaJYrUpMM5ltRko1h2WcQUD19ZbxYcN5Ngb0tfNVW4RJQgbZhxvwVFh pP8VeGxb4yAz1X5dStdzyp5VyqPmRcWD9XBY+PDTUclQl81sYDXnEjE3W8nhHAP1weOf y1veQS8KV2f8BrzWv0XphP5evc88Jz1gilLCva02dxVugyhFdYEPtQpQoefTOTibaVSb 80O5Vm6kR6ne/tyjkOQe7+wgU7eKwFDQjGkFkpKlzLdaPgZ8BMTREuCDWQXhP7tBOCsN oOgqBAlQWlxeONAAzKPxoETh5hOUfv49Vvl5+5/xznjs4KXBy4G4PO6V27I2RmUadpdz JclA== X-Gm-Message-State: AOAM530yCn2/DmdW2gsFvlVNKpD9ici8YzRnqds0WvmGQLlGpDGN6iCd pWHrOUwAIL61np+3QZ9S40m0ErsJoBPyz9WKGCrwxHXr9rUKWnKEw7YGSSFohqXrjTfmYOTjjcd dwy8dmQeC+AidyD7Lfdz/oros7UL8CH7qDWERf8RdDixifACxSCJwEe2sym7KEOTyxQFeY7qxX5 xL5L4= X-Received: by 2002:a7b:c451:: with SMTP id l17mr24675371wmi.20.1625647736306; Wed, 07 Jul 2021 01:48:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwCWVnYtQ4OBAVrxHlCZAsxunN8oXUdQdSuSWvoZQIdaZPJp/3eXEeDwIqwN0v833I5c9Wwsg== X-Received: by 2002:a7b:c451:: with SMTP id l17mr24675344wmi.20.1625647736053; Wed, 07 Jul 2021 01:48:56 -0700 (PDT) Received: from vian.redhat.com ([79.116.5.179]) by smtp.gmail.com with ESMTPSA id k1sm5533390wme.34.2021.07.07.01.48.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Jul 2021 01:48:55 -0700 (PDT) From: Nicolas Saenz Julienne To: linux-rt-users@vger.kernel.org, peterx@redhat.com Cc: williams@redhat.com, jkacur@redhat.com, nsaenzju@redhat.com Subject: [PATCH 2/2] oslat: Don't take trace_threshold into account during preheat Date: Wed, 7 Jul 2021 10:48:49 +0200 Message-Id: <20210707084849.304329-2-nsaenzju@redhat.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210707084849.304329-1-nsaenzju@redhat.com> References: <20210707084849.304329-1-nsaenzju@redhat.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-rt-users@vger.kernel.org The point of preheat is to make sure CPUs are out of idle and running at max frequency by the time the real test starts. So it's expected to incur into extra latencies we don't really mean to measure. With this in mind, it doesn't make sense to take into account the trace threshold during that run. So don't do it. Note that this has been observed in practice. The threshold would be hit during preheat but not during the real test. Signed-off-by: Nicolas Saenz Julienne Signed-off-by: John Kacur --- src/oslat/oslat.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/oslat/oslat.c b/src/oslat/oslat.c index 1cba6fc..6ff5ba8 100644 --- a/src/oslat/oslat.c +++ b/src/oslat/oslat.c @@ -29,6 +29,7 @@ #include #include #include +#include #include #include @@ -150,6 +151,7 @@ struct thread { struct global { /* Configuration. */ unsigned int runtime_secs; + bool preheat; /* * Number of threads running for current test * (either pre heat or real run) @@ -299,7 +301,7 @@ static void insert_bucket(struct thread *t, stamp_t value) us = index + 1; assert(us > 0); - if (g.trace_threshold && us >= g.trace_threshold) { + if (!g.preheat && g.trace_threshold && us >= g.trace_threshold) { char *line = "%s: Trace threshold (%d us) triggered with %u us!\n" "Stopping the test.\n"; tracemark(line, g.app_name, g.trace_threshold, us); @@ -515,11 +517,12 @@ static void write_summary_json(FILE *f, void *data) fprintf(f, " }\n"); } -static void run_expt(struct thread *threads, int runtime_secs) +static void run_expt(struct thread *threads, int runtime_secs, bool preheat) { int i; g.runtime_secs = runtime_secs; + g.preheat = preheat; g.n_threads_started = 0; g.n_threads_running = 0; g.n_threads_finished = 0; @@ -846,14 +849,14 @@ int main(int argc, char *argv[]) g.n_threads = 1; else g.n_threads = g.n_threads_total; - run_expt(threads, 1); + run_expt(threads, 1, true); record_bias(threads); if (!g.quiet) printf("Test starts...\n"); /* Reset n_threads to always run on all the cores */ g.n_threads = g.n_threads_total; - run_expt(threads, g.runtime); + run_expt(threads, g.runtime, false); if (!g.quiet) printf("Test completed.\n\n");