From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C5710CE7A94 for ; Mon, 25 Sep 2023 11:44:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230046AbjIYLod (ORCPT ); Mon, 25 Sep 2023 07:44:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34610 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229456AbjIYLob (ORCPT ); Mon, 25 Sep 2023 07:44:31 -0400 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CC3259F; Mon, 25 Sep 2023 04:44:24 -0700 (PDT) Received: from dggpeml500012.china.huawei.com (unknown [172.30.72.55]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4RvLXf0ww1zNngh; Mon, 25 Sep 2023 19:40:34 +0800 (CST) Received: from [10.67.110.218] (10.67.110.218) by dggpeml500012.china.huawei.com (7.185.36.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.31; Mon, 25 Sep 2023 19:44:22 +0800 Message-ID: Date: Mon, 25 Sep 2023 19:44:22 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.6.0 Subject: Re: [PATCH] tracing: document buffer_size_kb more precisely Content-Language: en-US To: Christian Loehle , , , , , References: From: Zheng Yejian In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.67.110.218] X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To dggpeml500012.china.huawei.com (7.185.36.15) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2023/9/25 18:02, Christian Loehle wrote: > buffer_size_kb no longer shows the requested amount, but the one that > is actually used internally for the ring buffer. > > commit 6d98a0f2ac3c ("tracing: Set actual size after ring buffer resize") > changed the sysfs behavior such that value read will always show the > actual size, while previously it showed the size that was requested > through the sysfs interface, even if it was rounded up to fulfill > the request. > So the documentation can state that more precisely now. > > Signed-off-by: Christian Loehle > --- > Documentation/trace/ftrace.rst | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/Documentation/trace/ftrace.rst b/Documentation/trace/ftrace.rst > index 23572f6697c0..2e066b3b6edc 100644 > --- a/Documentation/trace/ftrace.rst > +++ b/Documentation/trace/ftrace.rst > @@ -191,7 +191,7 @@ of ftrace. Here is a list of some of the key files: > 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. > + making the actual allocation bigger than requested. Hi, the actual allocation should still be bigger than shown due to the loss of accuracy when doing unit conversion from bytes to kilobytes (see tracing_entries_read()). -- Thanks, Zheng Yejian > ( Note, the size may not be a multiple of the page size > due to buffer management meta-data. ) >