Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp2404180ybc; Sun, 24 Nov 2019 20:40:02 -0800 (PST) X-Google-Smtp-Source: APXvYqzHLD6c5W0jD+9E+/0aEdOnYp69sEMz/c88PqXh9NQqdWeryH+cqw1o7YpbdvulL7waIjZp X-Received: by 2002:aa7:d1c9:: with SMTP id g9mr15923169edp.162.1574656802885; Sun, 24 Nov 2019 20:40:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574656802; cv=none; d=google.com; s=arc-20160816; b=Qw19T87eMKLQDise3eyV4MXeROs3NxGXrBhCpdihquD2hNoWC8Ur2hD0YIW3Cvq/oE CDzgQjB6FAu0EM88/gej86UfboPLjFajB4PwOEaz+iip62KXdSbEKTAnCzdgA7zukD0N rFRD7wUI+QnmDiBGnPiF9Ehu2aQ4xhmtwVHkGrF/grxMjXXaLNdFqYRWkA0VwK+OMv87 r9BM0/U5OMjGgacQdoOPvlXkn/lGDpTRsvnLzPE0/RjJhxZqvsvTlxEaJ4vnLU2ZP4AW XourWYRUm76/6r4xw45u6RakeL9eaGOGJckhQOd9n2DqvJdy8Nj/50UC106tI1LV6EeZ YAfQ== 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=ODOWzCRi043ffNDsCloDhETkDx/3yHGIPaI98O2FMPs=; b=MvSBuAx4kmuf0K7ZkuZxrS/RYcPiGdjL8X0KiyRIBY0rTDQcwiyVt73FFlw8WmQuvW o/hVqdnWprUFNOOuvsieStx7UWWd13MMJ8m4cEpKiwobYlWRvM+jmXSBpmgfEZkBXPi8 3xczpVxnVtIMki3VbHIeMIgpnmbkKyNePH6nzjDH2X7+7qJ8ojGtto2COiseb9GODGKE ZanEffrDRPo9b5atQccAVvfPUvR9QyCbG/vsTK/xDWNnilF8EwRUTRZ8p48aP3z70n0j TjdF8co0aaBSe3vUFn1ZfeUIBIGU11/ook52vtYUI+G8LXXU9ZPaVCcmiQcWB0HhI9l+ 9TUA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@generalsoftwareinc-com.20150623.gappssmtp.com header.s=20150623 header.b=scvgPzoC; 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 g24si4065389edv.239.2019.11.24.20.39.38; Sun, 24 Nov 2019 20:40:02 -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=scvgPzoC; 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 S1727130AbfKYEiW (ORCPT + 99 others); Sun, 24 Nov 2019 23:38:22 -0500 Received: from mail-ua1-f66.google.com ([209.85.222.66]:46048 "EHLO mail-ua1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727031AbfKYEiW (ORCPT ); Sun, 24 Nov 2019 23:38:22 -0500 Received: by mail-ua1-f66.google.com with SMTP id w10so3960150uar.12 for ; Sun, 24 Nov 2019 20:38:21 -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=ODOWzCRi043ffNDsCloDhETkDx/3yHGIPaI98O2FMPs=; b=scvgPzoCtzyBStjnpu0uaIipErr0VPNdDVsoPSGcTB3pLbmZBGpAvQQpmuTtBpPVjR dblKyltOpUaUiARw2uNxSszOk0gcYweZwgEYZdhFhpTgeSUlBjvotFBbSSIKIvO/xteY bEM3rsrSlWFk5Ci8qpvOxMWWSqkLSEuTF8//nAHMCYGIPgJB1mm7SG8TUletH2/e7KHO vXzRF3LQBh8OLVmwACT1BJG6PvsKVgzpNa5cX2IJTb0ZoYJEpWdBtfj3o5hVAw3hO399 WhYUa4Ak0SDy49w+E8zpc6KQbmdRQO4WQde7JTh1cOrcTDGPFkgcCNnPaUofBH4KIxxH wLUw== 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=ODOWzCRi043ffNDsCloDhETkDx/3yHGIPaI98O2FMPs=; b=IlCQ3EZRRF62fqC3ifuRn/1xk6yKMd0e3FKQAgXvjmg7ht51RXYSCjAnw+qVVrCVtc R8bjrgScgRUmux4OJ4C6hNtusLzH2TB+c8k9RLkoiV5dlczDvfvEJDbLrPmBHrjcrmLL Lqgsp07z8X4awUzu40TYysPRGFK1tYXug9SlfImoqYdRYI2oO2wjCRKkzKBby7mSNpa9 bRxgm2YjQmdNwQRNqn+MyLoOW3D/Kxxv1NhDUOQQWskyejIJTnYjRqYCyfrOXKhQIZTL gjNne/276jZr9OFhfyP6ZGTfXPGCS26S8QGRoV+Vki++HsBfCAO51ZpG8LgokFSYC5lw 3hrw== X-Gm-Message-State: APjAAAWVfCi0XpJckU0Au+xlvbpRXzPjiFpL2Yw12hz/uHoUcLe/F88F fk/X7A1YyRo3KTg6cTPc3hgjyA== X-Received: by 2002:ab0:1602:: with SMTP id k2mr16755271uae.103.1574656701027; Sun, 24 Nov 2019 20:38:21 -0800 (PST) Received: from ubuntu1804-desktop ([172.97.41.74]) by smtp.gmail.com with ESMTPSA id v202sm1665911vke.52.2019.11.24.20.38.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 Nov 2019 20:38:20 -0800 (PST) Date: Sun, 24 Nov 2019 23:38:20 -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 Subject: [RFC v2 1/2] docs: ftrace: Clarify the RAM impact of buffer_size_kb Message-ID: <2c8f88a60637bef6fa7d58089ff54011c1671b0e.1574655670.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..2b21068ebf8e 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