From patchwork Wed Nov 23 17:06:24 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Bristot de Oliveira X-Patchwork-Id: 25088 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp2912388wrr; Wed, 23 Nov 2022 09:10:00 -0800 (PST) X-Google-Smtp-Source: AA0mqf59Inedig4oind72dc9Fp/OV9/k/+cuIBuhMvv+Od4LGrLPAbpZ+bve46Wl51vJiGFEfuJJ X-Received: by 2002:a17:907:9616:b0:7b2:9f1f:48cc with SMTP id gb22-20020a170907961600b007b29f1f48ccmr8196723ejc.164.1669223400708; Wed, 23 Nov 2022 09:10:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669223400; cv=none; d=google.com; s=arc-20160816; b=ubLrr2uVghme6kECIA5rsF8EysDnRE+RjaYCOoDBP4FjXh3cOzPZg5l9m32A/TUg7L B6O0DASy+Kp+fHbFQraLM09MxMxhHH3RtS5ZLTqP8H3MizzFWZCgnJNh1MlaDVMzamdQ soxtdoWs/fbxReov7NZRSLKGOliiDXmR4ZSNQV5k1XrqsmC0nlfAWnrmOJ5Fo8H5rzEe nqWD0EsClwREoe/2AF8VbCQKKuxs6pOPJyQ35aih4dSzzmW/TVdxWecwNddA332zjh4S /Xu2OD9ry09mLMtRrixCMpwqiRyIGuI2O3IIMvNfxzUei4UaHsCbhZ5k8SOZhkn7i1dC XvrA== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id xd12-20020a170907078c00b0078e11e9286csi85978ejb.195.2022.11.23.09.09.33; Wed, 23 Nov 2022 09:10:00 -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 + 99 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 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1750307596732221540?= X-GMAIL-MSGID: =?utf-8?q?1750307596732221540?= 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.