Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp7839067ybl; Tue, 24 Dec 2019 09:59:01 -0800 (PST) X-Google-Smtp-Source: APXvYqz9bbf6BWV06uTKnFPgUsZaG8jTXAwqtxXH5JphFX1f1ZKvWq7ZyjR1IYMaZKFEUxeP/iVm X-Received: by 2002:a05:6830:147:: with SMTP id j7mr40363026otp.44.1577210341353; Tue, 24 Dec 2019 09:59:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577210341; cv=none; d=google.com; s=arc-20160816; b=cb4fBleqKIy+wCaAt8Gf4lBwe5JDJ9Iquxc7avsCyLK8Ocx1jpc/qd7c17At2fMJHM KOsnrmxnFpqSbk97fjtr/c0/xlSQW9dmJF2meSJJMeaWIExJ3RBUX/hWcpEJGg97djJM 7iRVh/Z3nxQICSTZZmQx8cbXGuIne2EHH9xusL3vTl7Z8A7as9XzWu0XBXQjpUXLMd6Q kFiXK5gWXZ3JwqrS0mx4PdKf1NNmREyqGkJpe41opFS2qjyC4Fby/OdPnsHTiYwI0QxQ OeF/vOSwxEbvOMnV9DCN4bEZOXb+meEYFcPMvdMGxo7HYQJZiTS66ZeBZBj/DU9E9CZw QewA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=6JkYU0nutAHI9fyqNTIL32WnpIq1wjmijBcPApKYOGg=; b=G4VdgGRH0/KrSsATdZLYwuGJOCB6l1zz8bZXFUS/Qw5mFieXQK3uE1tsnUsSYyHAj7 OZMy8NDeD+DPXpSVhboSA31eY+klSqLUJlmN1WxY1n2UnAPfMGUlvEpq1pd+1rPPLvie AiMy44rgL8jzhgx/NE/N8G85GrYZvNP1RL2dCNIHe7EqdD4+TrBqantfYCwZYLE8UeEV lET0ffOhXVlM7+OzFv8cnDFDrjd1nS6emLec5tl0QQOjawtm2G61e6CxjmlLVPqkk86s PPCKayMnIkKBHWJJJuV3+A/q8w8ZuQRdctfAbgYKiX02coSz28nZgi6ArjvQpyL3HVwh 7VgQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@generalsoftwareinc-com.20150623.gappssmtp.com header.s=20150623 header.b=GX4NEHxa; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e21si1196551oti.183.2019.12.24.09.58.49; Tue, 24 Dec 2019 09:59:01 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@generalsoftwareinc-com.20150623.gappssmtp.com header.s=20150623 header.b=GX4NEHxa; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727031AbfLXR4z (ORCPT + 99 others); Tue, 24 Dec 2019 12:56:55 -0500 Received: from mail-vk1-f194.google.com ([209.85.221.194]:36843 "EHLO mail-vk1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726272AbfLXR4z (ORCPT ); Tue, 24 Dec 2019 12:56:55 -0500 Received: by mail-vk1-f194.google.com with SMTP id i4so5285422vkc.3 for ; Tue, 24 Dec 2019 09:56:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=generalsoftwareinc-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=6JkYU0nutAHI9fyqNTIL32WnpIq1wjmijBcPApKYOGg=; b=GX4NEHxa/eNvv8Upt1fHOxVZ1O6oIZjoUX9zbKrPdkG8See6tu+JA8VMgMDhiHp/gr HaqXEA7jKLJ/dv5EEyDX24qIe7f5fN5YmH3T38+FuLLfXeMUtsAup7vlnhnO4i3+Ge41 bwKHVK+j2/7kKMht56OeVUBE+mNmwlsif2tom39GyuVye2eeib+qIqCi2P74eecIpGlN ptR76RtaYvFF7MAyTX1HbAnzXSu7YCZCP3Ulx6nWxMtEkH35Y3VGvfeujyu1L1nl+Ky0 as+t68bmCol3yspwYI+toTFAgDmUgKtNliUyzL5d9evZVHa8qsFQaJaH2sAP7VnVQ6Y9 ahGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=6JkYU0nutAHI9fyqNTIL32WnpIq1wjmijBcPApKYOGg=; b=pEC0sYHd9sMzPPiQxsEzCXcPnBiamHqogEw1QXTFBWynQyYH1FNakJb6HGMbKM8FIK mDN+V4xNOKXdy1NH+ZDccoAZC6OPrnqBzdufhlG0XAhjNQRLMmW9U5/HR1ZxXLDnku2j nov184G5Qyjkw8pxq/lNMImLIb6Go/7p0CWE5tV4Y42blgqAcjbCVrOQ9m04e2FpiUEy 3EoybC1BwguZbJquzszKRv6J7I5oQrH8aR4NWwtOCMydh+Lk1E6YsW1GmE+hvVmOaYHV rzBuHcDNZyuTspR0Nn3EbEkNddhxWdidzlB7ZdZC6PHkDi0Tm4udxbRVrQBbRSrZBdhb hGYQ== X-Gm-Message-State: APjAAAUrSngZLfvD2XtCkLLIyY4zL2XeXynOTTvmkc3PBDXXO0r7dx4y HMOfcGuJaxNmSpGiM7N+y7tARA== X-Received: by 2002:a1f:20c2:: with SMTP id g185mr21903533vkg.44.1577210213987; Tue, 24 Dec 2019 09:56:53 -0800 (PST) Received: from frank-laptop ([172.97.41.74]) by smtp.gmail.com with ESMTPSA id z17sm7132492vkb.5.2019.12.24.09.56.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Dec 2019 09:56:53 -0800 (PST) Date: Tue, 24 Dec 2019 12:56:53 -0500 From: "Frank A. Cancio Bello" To: Steven Rostedt , Ingo Molnar , Jonathan Corbet , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org Cc: joel@joelfernandes.org, saiprakash.ranjan@codeaurora.org, nachukannan@gmail.com Subject: [PATCH 1/3] docs: ftrace: Clarify the RAM impact of buffer_size_kb Message-ID: <6f33be5f3d60e5ffc061d8d2b329d3d3ccf22a8c.1577209218.git.frank@generalsoftwareinc.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20171215 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The current text could mislead the user into believing that the number of pages allocated by each CPU ring buffer is calculated by the round up of the division: buffer_size_kb / PAGE_SIZE. Clarifies that a few extra pages may be allocated to accommodate buffer management meta-data. Suggested-by: Steven Rostedt (VMware) Suggested-by: Joel Fernandes (Google) Signed-off-by: Frank A. Cancio Bello --- Documentation/trace/ftrace.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Documentation/trace/ftrace.rst b/Documentation/trace/ftrace.rst index d2b5657ed33e..5a037bedbf6a 100644 --- a/Documentation/trace/ftrace.rst +++ b/Documentation/trace/ftrace.rst @@ -185,7 +185,8 @@ of ftrace. Here is a list of some of the key files: CPU buffer and not total size of all buffers. The trace buffers are allocated in pages (blocks of memory that the kernel uses for allocation, usually 4 KB in size). - If the last page allocated has room for more bytes + A few extra pages may be allocated to accommodate buffer management + meta-data. If the last page allocated has room for more bytes than requested, the rest of the page will be used, making the actual allocation bigger than requested or shown. ( Note, the size may not be a multiple of the page size -- 2.17.1