Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp7724153rwb; Wed, 23 Nov 2022 09:55:08 -0800 (PST) X-Google-Smtp-Source: AA0mqf50NOpSK5BxU0MyjwxYzIu/6pBWfqsFV6MtiZyCdvFt2OJxHMQ+/Bs7tF1q3OGNc9PswP+D X-Received: by 2002:aa7:9e5d:0:b0:54c:9e75:ab7 with SMTP id z29-20020aa79e5d000000b0054c9e750ab7mr10344372pfq.82.1669226107960; Wed, 23 Nov 2022 09:55:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669226107; cv=none; d=google.com; s=arc-20160816; b=FhjlaFmuI/PVuc12+nWFfa7seK2Ou5GSLHq/dM9w5MK32Uky9xMLp5S295CxE9zjkM d+ICY3BehuQEQB8v4SOSQC4j1Z+ykBeol9YrxLH9PEum1HUYJTB9+qsh1ghhxTbksc2x V+rJ9aXaj3AHuNW8X3FmS+YVlg/B4UQwV3M/A+90Aigh3CkPWTT8smNu5VOlpTDTaPDO J+Nw6DteBwITn3ogmxSIEmySfBr5wuybc30TZhPTAPR6T4uvUvnLwNvuFwMaZ3D5wEdf g0pvcK1FKgsXhd+7gNDv7+cA0LRW3zhL2m32I4A+EA8YnJbUXsh6Tv6uof5/zxOQyV8l e68w== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=1E5I6UogyHbYebfQk9fyeFnglyQpOw2MfmGgXYvmLcQ=; b=LE/nx0chZVQ/z94okvzyevsajZxYH9TbeQ2lAUKLYTXWwmr2bnt6/4kDIBd+NYCYrz 3PwjG+b0uSrMANTf691SJRS/u3rREWaeUNLrj21heSJ1Er5u7QquRv8tqHUFS9m79YJW 20PP6tnLzzvPjR4Nf0sxjx8OckxSCDkYGV3E3ZB2fMjyGKGCZ2jEeMitieGGciBVTtjp xuOZHj9eJS3oLaRMAH5zFdXeP3QB+nzLLTrbbGvxK4srQrbkKUkuO5Wvx7YsAYPi8HWa hFZ9nEo3VcSLu0cFs/lgCwKdmk/FmdFkcyP8BawwLqoP2nUHIOz/8NVH7fIlnCEKpMfD Qgng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="b/fagKtW"; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o1-20020a17090a5b0100b0021846dc82a3si2141623pji.18.2022.11.23.09.54.56; Wed, 23 Nov 2022 09:55:07 -0800 (PST) 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="b/fagKtW"; 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 S239108AbiKWRHn (ORCPT + 88 others); Wed, 23 Nov 2022 12:07:43 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57066 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238904AbiKWRGx (ORCPT ); Wed, 23 Nov 2022 12:06:53 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 28D69C5B51; Wed, 23 Nov 2022 09:06:44 -0800 (PST) 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 8FE3661DEC; Wed, 23 Nov 2022 17:06:44 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 26521C43470; Wed, 23 Nov 2022 17:06:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1669223204; bh=wx38S8oDI/3l7QO5/iOpwcyoWSlY3bOo8MNcfNr6WO8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=b/fagKtWUhKJtbRJor0oTXVyLiMPuyF+ekrSh4ajY32KOJCqwkQZC/WYTFXOcdI3Q kN4IbX198yi8Tej6qJYMnQoiY5WOc4l961AtInYV0qsPonyLjEqb2FVTdEHk3U1n7O AXNQU+8tJU6SLtUalujKnx85OgapVKsO8T4Mf85sH0UA8hXv6F/zn/d1qP09i1a0fA VhlaDw0PhdPgJStJWwGhtZ58OZqHGCPgMkYp0a3+hUeeBJYW1NPDqq2f7MebxwdEI3 vdf7OGZB4WR3vLchauCrRU91A4J88OLtx4+p54t8+XAhdmyx0rWm6HZkKB5YBa88/7 WxwqidzJ38sbw== From: Daniel Bristot de Oliveira To: Daniel Bristot de Oliveira , Steven Rostedt Cc: Masami Hiramatsu , Jonathan Corbet , Juri Lelli , Clark Williams , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH V2 6/6] Documentation/osnoise: Add osnoise/options documentation Date: Wed, 23 Nov 2022 18:06:24 +0100 Message-Id: X-Mailer: git-send-email 2.32.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS 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: X-Mailing-List: linux-kernel@vger.kernel.org Add the documentation about the osnoise/options file, the options, and some additional explanation about the OSNOISE_WORKLOAD option. Cc: Daniel Bristot de Oliveira Cc: Steven Rostedt Cc: Masami Hiramatsu Cc: Jonathan Corbet Signed-off-by: Daniel Bristot de Oliveira --- Documentation/trace/osnoise-tracer.rst | 32 ++++++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) diff --git a/Documentation/trace/osnoise-tracer.rst b/Documentation/trace/osnoise-tracer.rst index 963def9f97c6..618bcdc90bb6 100644 --- a/Documentation/trace/osnoise-tracer.rst +++ b/Documentation/trace/osnoise-tracer.rst @@ -92,8 +92,8 @@ Note that the example above shows a high number of HW noise samples. The reason being is that this sample was taken on a virtual machine, and the host interference is detected as a hardware interference. -Tracer options ---------------------- +Tracer Configuration +-------------------- The tracer has a set of options inside the osnoise directory, they are: @@ -109,6 +109,27 @@ The tracer has a set of options inside the osnoise directory, they are: - tracing_threshold: the minimum delta between two time() reads to be considered as noise, in us. When set to 0, the default value will be used, which is currently 5 us. + - osnoise/options: a set of on/off options that can be enabled by + writing the option name to the file or disabled by writing the option + name preceded with the 'NO_' prefix. For example, writing + NO_OSNOISE_WORKLOAD disables the OSNOISE_WORKLOAD option. The + special DEAFAULTS option resets all options to the default value. + +Tracer Options +-------------- + +The osnoise/options file exposes a set of on/off configuration options for +the osnoise tracer. These options are: + + - DEFAULTS: reset the options to the default value. + - OSNOISE_WORKLOAD: do not dispatch osnoise workload (see dedicated + section below). + - PANIC_ON_STOP: call panic() if the tracer stops. This option serves to + capture a vmcore. + - OSNOISE_PREEMPT_DISABLE: disable preemption while running the osnoise + workload, allowing only IRQ-related and hardware-related noise. + - OSNOISE_IRQ_DISABLE: disable IRQs while running the osnoise workload, + allowing only NMIs and hardware-related noise, like hwlat tracer. Additional Tracing ------------------ @@ -150,3 +171,10 @@ tracepoints is smaller than eight us reported in the sample_threshold. The reason roots in the overhead of the entry and exit code that happens before and after any interference execution. This justifies the dual approach: measuring thread and tracing. + +Running osnoise tracer without workload +--------------------------------------- + +By enabling the osnoise tracer with the NO_OSNOISE_WORKLOAD option set, +the osnoise: tracepoints serves to measure the execution time of +any type of Linux task, free from the interference of other tasks. -- 2.32.0