From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wi0-f178.google.com (mail-wi0-f178.google.com [209.85.212.178]) by dpdk.org (Postfix) with ESMTP id A6185ADB6 for ; Tue, 24 Feb 2015 02:56:07 +0100 (CET) Received: by mail-wi0-f178.google.com with SMTP id em10so21821011wid.5 for ; Mon, 23 Feb 2015 17:56:07 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:organization :user-agent:in-reply-to:references:mime-version :content-transfer-encoding:content-type; bh=kM5JI/esjWsUbaHf5mRbug6ss4y0prnZz/cyh7H9yss=; b=izyHpeHqpNZLVl6bqjk8I+8e9y6uk1VZmUARnfXoXkOjRmI7W5ipYwKU7rypxbmWJD iFVIjNUjXlqCa4n5d4V5JzPYOHb9lVs5Spi6PB1wdB4bXexOgpYJbuLyO7rlosmiJxpC 06tFrUx7+saYfN9FHjFT55O22/GUy7MknZ3+mPeJDfhG7Pa4VprjBpm2A8KPlCphTJX2 SDli1Z7O4IuGYrqNkizV8q0qLlLJe5wrYTgKmx9lFFeNy90LZAYTldeVz5HIuTn3bhXK d9Ru8hhkS7XP3EADk5NFzOrOpo6gfT6w9aObyPDF8BB8GPI+ln4cemhxBUvJ1m/vZui5 srRw== X-Gm-Message-State: ALoCoQku9R0wyahAj5mrFuAQ+T9hwY9LvjXLlEFE+zLFEZxPUiQfGQz8eIJLfyd9WYozGDEw+lCp X-Received: by 10.194.80.193 with SMTP id t1mr28613819wjx.8.1424742967495; Mon, 23 Feb 2015 17:56:07 -0800 (PST) Received: from xps13.localnet (136-92-190-109.dsl.ovh.fr. [109.190.92.136]) by mx.google.com with ESMTPSA id fs8sm18293523wib.8.2015.02.23.17.56.06 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 23 Feb 2015 17:56:06 -0800 (PST) From: Thomas Monjalon To: Pawel Wodkowski Date: Tue, 24 Feb 2015 02:55:36 +0100 Message-ID: <1698774.UefVOj119L@xps13> Organization: 6WIND User-Agent: KMail/4.14.4 (Linux/3.18.4-1-ARCH; KDE/4.14.4; x86_64; ; ) In-Reply-To: <1424348324-29932-2-git-send-email-pawelx.wodkowski@intel.com> References: <1424191340-26451-1-git-send-email-pawelx.wodkowski@intel.com> <1424348324-29932-1-git-send-email-pawelx.wodkowski@intel.com> <1424348324-29932-2-git-send-email-pawelx.wodkowski@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH v5 1/3] librte_headroom: New library for checking core/system/app load X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Feb 2015 01:56:07 -0000 2015-02-19 13:18, Pawel Wodkowski: > This library provide API to measure time spend in particular parts of > code and to calculate optimal polling time. > > To calculate a those statistics application code need to be divided into > parts (called jobs) that do something. It is up to application to decide > what is considered a job. > > Series of jobs must be surrounded with the rte_headroom_start_loop() and > rte_headroom_finish_loop() calls. After that, jobs might be started. > Each job must be surrounded with rte_headroom_start_job() and > rte_headroom_finish_job() calls. > > After job finishes its execution, period in which it should be called > again is adjusted to minimize time wasted on unnecessary polls/calls. > Adjustment is based on data provided by job itself (ex: number of > packets it processed). > > After all jobs in serie are executed fallowing statistics are updated > and might be used by application. Statistics can be reset. Some of > provided statistic data: > - total/min/max execution - time spent in executing jobs. > - total/min/max management - time spent outside execution area. This > value might be used to measure overhead of scheduling jobs. This time > also > contains overhead of headroom library itself. > - number of loops that executed at least one job > - executed jobs > - time when statistics were reset. > > Each job provide total/min/max execution time and execution count > statistics. > > Signed-off-by: Pawel Wodkowski > --- > config/common_bsdapp | 5 + > config/common_linuxapp | 5 + > lib/Makefile | 1 + > lib/librte_headroom/Makefile | 54 +++++ > lib/librte_headroom/rte_headroom.c | 271 ++++++++++++++++++++++ > lib/librte_headroom/rte_headroom.h | 324 +++++++++++++++++++++++++++ > lib/librte_headroom/rte_headroom_version.map | 19 ++ Please add the library in doc/api/doxy-api.conf.