Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp1145090rdh; Mon, 25 Sep 2023 04:51:28 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHKfZijjel92vv0SPi/uCt1Tvn7Ah8VVp9tvQz78KiltMRTUrXkUPGzUbK9dwNVuw0pqo/j X-Received: by 2002:a05:6a20:7f9a:b0:159:e04f:e184 with SMTP id d26-20020a056a207f9a00b00159e04fe184mr13968221pzj.7.1695642688537; Mon, 25 Sep 2023 04:51:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695642688; cv=none; d=google.com; s=arc-20160816; b=mhM/O0C+HOWPG+WWpvC4SYU7ZdoiIz54cE0dnVu9FfsvxpUdyrc5XmWhFVm8MQgpbg 5tYHAHcckJfX0FIm0HIYBajIaQZgzFJVGPLtkHF0rYzHW44ODewJOpR3AfLLnOoZE2Sc UrgTa1aWOu2RGuJdzKflK3g3gT2XjgZ4qcEdGikZ5QxgOO1uoGda9AwgfAt2SJyS0nQV cAaVNSMoeAD9+yHev0ZH2MtImwVLqNG8/BqfKQT9QW6hIOWmMuHEfq+e2Ey5IkVN+z8i M5wIydR9Gqxc3pqCRdIvRtk40YNudczG0mBNDZeJkOz3KPky0V9n362N5LDhqQdlhubC sPqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:to:content-language:subject:user-agent:mime-version:date :message-id; bh=hqwfUZutOQtVe2GkrJH6xhmZdKpu/g1xavPSaYto7Xc=; fh=EZcuonsX47CPhohm4V2aFNZaT81q+TeZRXIQS5HDfRY=; b=uf1JGe0lwI7n5E/9YkTnw/BG6J2+j7Yv6FqqxsBOKK86uxTxvCfbVbG6HBrEyrp4jS uac0zlMD160RlktHJfDBRPIE2sWi0MV6lpCUqZqrahdnNfp1nVDgZFkplkA+/ENU/XxM mkOK9hCRQmGRuxXxd1VbY+Du6M7iYm0HsMDi/mntO7L6TV1oxqREe+CPStpyQbKcYH9S zqJkZhi9FpKdeDXD6EqEg/RsENzbxWNaxGh6RLOwAUEoDsZ6UbtshzSDMubv22x/DHbN qznvHzIyk5pcJFeEZmGwPobJWexFMhOijesj8oWYVpTtp6GjV7q4GyAtTsxRAwbkyKEU JNjA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id bg26-20020a056a02011a00b00573e7fd674esi9212767pgb.661.2023.09.25.04.51.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Sep 2023 04:51:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id C251F8127263; Mon, 25 Sep 2023 04:44:31 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230010AbjIYLoc (ORCPT + 99 others); Mon, 25 Sep 2023 07:44:32 -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 X-Spam-Status: No, score=-2.2 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Mon, 25 Sep 2023 04:44:31 -0700 (PDT) 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. ) >