Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp8139944ybl; Tue, 24 Dec 2019 16:07:16 -0800 (PST) X-Google-Smtp-Source: APXvYqxMcBpXYcdvM+ofUDSuLrqjknQzsAMUhfCep3BMPDFB8oKWIauCXChlhQAjaBf2XMjCvBgC X-Received: by 2002:a9d:3cf:: with SMTP id f73mr41794188otf.11.1577232436367; Tue, 24 Dec 2019 16:07:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577232436; cv=none; d=google.com; s=arc-20160816; b=XZNmaMN8Et+CJBPaRes87aUN8ucB35fa9zkFPgHjI8P92Wwvnmp+N+bEzPqOVjs74u 3UNcreKGK4hHH8Q7P8lTzHe2orsLQM64/k7uyx91niYPbp6jXYbae/WugrwBdYglAWXL WYFOjvorqL2wBc2w2+scF9Lbw+TS/yXomtrCsVtQyIHhdoLgrPouOTfXnj1C9btMIDmv /DC5+7wZH4+687xmSEn6pK8QttfPqncy0bt85zrSSBFOccLleZvVlGGJ2phRNCcE515H b63s0G322uygrr67YZ0mbLKtEW3lAnyBf97bJ8xWUht+g+KQiuRqvb8ucFvkWui/j7Pc 2FmQ== 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=ASLyGtDZvWNs/fklf77M5M5EEs/zUQjWAY5hIMHs6aQfYSFi5MWA0CN8q0peyqVEVZ duiXmkqXNj+AfNwSLhhXdR6BTpZkpm+SoI2qfnwHfIca/vMNfXWBXmRRo0VUMPn2/dY9 hONyckV7sTJFb9NBCfTVkP3x8v31B+q++knHwupssbX1XB5zaaOdiXmpAb0a6BTkIeF/ kZdTeWpbshnOrij1GWTd/32pmjwBM33Ip1LmG4+7uOIlJrBFbopZ0vtF9lD4/aWnT+We 2HdLuJejP9MGJppSOeQewYUy/ajg2w39Yotq06Z2ExNNt0GirGtMxdkpUO2CcxoPPRWs HAEw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@generalsoftwareinc-com.20150623.gappssmtp.com header.s=20150623 header.b=X56ddrQA; 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 q2si10156698otn.220.2019.12.24.16.07.04; Tue, 24 Dec 2019 16:07:16 -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=X56ddrQA; 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 S1726853AbfLYAGI (ORCPT + 99 others); Tue, 24 Dec 2019 19:06:08 -0500 Received: from mail-vs1-f68.google.com ([209.85.217.68]:38581 "EHLO mail-vs1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726332AbfLYAGI (ORCPT ); Tue, 24 Dec 2019 19:06:08 -0500 Received: by mail-vs1-f68.google.com with SMTP id v12so13243110vsv.5 for ; Tue, 24 Dec 2019 16:06:07 -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=X56ddrQAgTUH+6OaXULY/PlX326fEAR8fWv0+2AWiOkdsAzn4Hk9h0hUJC22q+AHA9 gmgFOfnyC7OLGP91jG/SbhNYXrs5W9nI13evYoXWkbfW+CjPo3G2Fl27M3UaNYOF3g9L Vz5DQderiWDkdIZ+K+2DXodKCYJWnRyIndjS9402l+K/m4/WVktyFNH/2Z/w51jmZjvb tRDM5gr5BKTlTgsKx/G8Poo68MPkEvW0Xi9rx7UEYNgiqW0FEzAmwbi75VX1123EOOUV Xz3tgUr/kWRv26IWn+jsYA7IMEtIVQg+o8WDrx4S2cUxaTp3HyWu77dgn07TEqoyZ/di JFyg== 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=dDEWQ5bpLg9/0GLwls4nj6o3I/y+Yyk/gbVqMSH5mT2r3yVmxD/mKcD44RW6q0AqAW Vn9Myn3/Sv3KXvGApFU9yrQtGIpnlb0PF7mQ5DEEbPwT4mItAVo9fo3gGfNMQF0Xd8fT AmMFF6npj/2FNVj4ERJXjYq5Jwe/oRgZru4DG+fkgLrpD2sfLuItS4H01XkyiEQFTtRx ZZC97IebS2Z7nF6GIZPeuCQsN4dfWS0gVBzgs6E0lFlC3B/j6w8SC+IVPHfeSkCQ9oD5 cFsLUjbGiCT6BuJOZGg1gNsFb1PWQc4LoJCJLbI83WyZX6UfwHw7mHqcL8TB/iLjpaM6 8B8Q== X-Gm-Message-State: APjAAAV+1wabF3K7LDPFquXqYulYn6d0+svMcTgA5EXve18wL5+9kiyv HIEi5KrNIrHOY3hkS6pwEVCrxg== X-Received: by 2002:a67:c484:: with SMTP id d4mr18418329vsk.4.1577232367106; Tue, 24 Dec 2019 16:06:07 -0800 (PST) Received: from frank-laptop ([172.97.41.74]) by smtp.gmail.com with ESMTPSA id n25sm7360013vkk.56.2019.12.24.16.06.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Dec 2019 16:06:06 -0800 (PST) Date: Tue, 24 Dec 2019 19:06:05 -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, rdunlap@infradead.org Subject: [PATCH v3 1/3] docs: ftrace: Clarify the RAM impact of buffer_size_kb Message-ID: <6f33be5f3d60e5ffc061d8d2b329d3d3ccf22a8c.1577231751.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