Message ID | cover.1686063934.git.bristot@kernel.org |
---|---|
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp3483145vqr; Tue, 6 Jun 2023 08:34:24 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5sXAeS9SUyDQ13em9swz7VFdbDUdBwFrA6ZqmoyULLjKGtC0WzmkeoE7g89WFcCG3Ga+HT X-Received: by 2002:a17:90a:7e83:b0:253:70b7:18d1 with SMTP id j3-20020a17090a7e8300b0025370b718d1mr1181323pjl.34.1686065664193; Tue, 06 Jun 2023 08:34:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686065664; cv=none; d=google.com; s=arc-20160816; b=KZ+Z4XAsAeTHTisj4lPKRjCNwi5xiT8FwSVNmlxIMs1078KLa40ZqMz0tM9wPvrBJy 22+OLhkC7eXD1yQawxD7YYCTUPMLA6BLOSXfCWK6cBqAJ3pCUy8jscFnH1W8IxpezvVr 2MQvXFN9pK9gzhYBGtJRG5Ms7s8w5zC6gLhxVSwL4Z5bWWBkcb+D7YZ7+2W3jnodEdAX QFn3mvLpq9QBduVfsYOGMV5baMz9PJaLPYOl13E7M6cQakAL/3oPkXjdpJHQQFvIlLSU kYCL8qyBtNEoad8eAvIklJsdZnIsaYvaUMtgkUE4LG/e+EFE/TCiNhdD22t3hjIBveG4 nfeg== 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=iToPKWnqAlsKT1c/x0tD6y9n02s0DlB9ImEEO+zQhNE=; b=w3eEF5LIuayRvMz9VkqzgsL53CfSRKGtLEyJg7HYM9pVL6FdhklSURMhlO2k5BAc5o a39PWW08E381d2TV6iVdWYniW7gsLjbQkD9AL3RXWYTEqDAfulmnPGQIG30qD9Yv5Bg7 gFZR/nfF6NN+TsgsKOkE0BBAH1HmrnVryfVzprqvY9nhAlVZ72qMy1fxSDLww5TF3GSv 5gp2O80gJWYVQlgtVEEOrNYBGo7JUItCfUIbJeba0EX8n1vDDYl1uOLkvSmgivoxxUe2 f7I+pmsvi7ouH2etSlMHHQoBD1L7/U5yUs1AJoj21O8xfm0Ls1qCsgHtrn5B4DaXrcpK bLnQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ObpVg2cH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ls17-20020a17090b351100b0024e29c5c06dsi7789083pjb.12.2023.06.06.08.34.00; Tue, 06 Jun 2023 08:34:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ObpVg2cH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238265AbjFFPMo (ORCPT <rfc822;xxoosimple@gmail.com> + 99 others); Tue, 6 Jun 2023 11:12:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41954 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229454AbjFFPMl (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 6 Jun 2023 11:12:41 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BA729126; Tue, 6 Jun 2023 08:12:40 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 50EA862D9C; Tue, 6 Jun 2023 15:12:40 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DB420C433D2; Tue, 6 Jun 2023 15:12:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1686064359; bh=ITuf4mrMNHj/t/cxTj6fqNqlNYg9SVIt6Wm6jYSUlvY=; h=From:To:Cc:Subject:Date:From; b=ObpVg2cHrEJfu6omjONOeu3GmzqDcQWkISh/Z7xEO+kplX5zfjlU172bAEYHtRj8x uS7vI/Pp8oG4NKG8Y5vthywp52oR0eMaR0jOfuQ1p0/1uHw6+Mc4AzqVCOjKNnFmQH lS3zAHqKD5Z3ajwEPfCiQLBtjdQDR+bXksk1ncCol+v+l3jrxgSglb8tz913F6OaGD s13WQ4N+S2qfWQ9uCpP+NPpE3kDaW5RwoHlJ9r4Y7MRf4tw/jNhlSmINRlWgkcdowU /vMeCELk9uRVfQyOh5wafCTYF5di9BVmm/wSdqk7aw1wXI7hZi3SWA8SWEbwtHJFh1 Ked3W2xQgR5ig== From: Daniel Bristot de Oliveira <bristot@kernel.org> To: linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, Steven Rostedt <rostedt@goodmis.org> Cc: Juri Lelli <juri.lelli@redhat.com>, William White <chwhite@redhat.com>, Daniel Bristot de Oliveira <bristot@kernel.org>, Masami Hiramatsu <mhiramat@kernel.org>, Jonathan Corbet <corbet@lwn.net> Subject: [PATCH V3 0/3] osnoise/timerlat improvements Date: Tue, 6 Jun 2023 17:12:24 +0200 Message-Id: <cover.1686063934.git.bristot@kernel.org> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1767967989878826020?= X-GMAIL-MSGID: =?utf-8?q?1767967989878826020?= |
Series | osnoise/timerlat improvements | |
Message
Daniel Bristot de Oliveira
June 6, 2023, 3:12 p.m. UTC
These three patches are improvements for the osnoise/timerlat tracers, mainly to support rtla. The first one is a dependency for the -C <cgroup> command line option to be added to rtla. It is essential to allow timerlat/osnoise to measure the latencies from the container/cgroup point of view. The second improves rtla time for saving tracing after a stop tracing condition on osnoise/hwnoise. The third patch adds the osnoise/per_cpu/cpu$id/timerlat_fd file where timerlat expects a pinned user thread to open and read from it. When the thread reads it, it actually activates timerlat latency measurement mechanism, so timerlat can be activated from an user-space thread. Timerlat is also expanded to report the return from user-space latency when read is called after the first call, so adding another metric to timerlat, that can either represent the kernel-to-user and user-to-kernel overhead, or to measure the execution time of any workload. Details are added to the kernel documentation. Changes from V2: - Moved the migration check to a function hooked to the sched:sched_migration_task tracepoint - Fixed compilation errors with !CONFIG_TIMERLAT_TRACER (kernel test robot) - Made osnoise_create_cpu_timerlat_fd static (kernel test robot) - Link: https://lore.kernel.org/lkml/cover.1684860626.git.bristot@kernel.org/ Changes from V1: - Added the user-space interface patch - Link: https://lore.kernel.org/lkml/cover.1683823114.git.bristot@kernel.org/ Daniel Bristot de Oliveira (3): tracing/osnoise: Switch from PF_NO_SETAFFINITY to migrate_disable tracing/osnoise: Skip running osnoise if all instances are off tracing/timerlat: Add user-space interface Documentation/trace/timerlat-tracer.rst | 78 ++++ kernel/trace/trace_osnoise.c | 477 +++++++++++++++++++++++- kernel/trace/trace_output.c | 4 +- 3 files changed, 551 insertions(+), 8 deletions(-)