Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp178113rdb; Thu, 21 Dec 2023 06:18:54 -0800 (PST) X-Google-Smtp-Source: AGHT+IE7NZ05a9VLfckqFKDcH1kd6YX/ua4XI54hq82pfh/R13M4FG4Ne8KSU+UAWRtw1cCRU08G X-Received: by 2002:a05:620a:112d:b0:781:15c6:9671 with SMTP id p13-20020a05620a112d00b0078115c69671mr2300398qkk.82.1703168334274; Thu, 21 Dec 2023 06:18:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703168334; cv=none; d=google.com; s=arc-20160816; b=Slg4tdMeXTDHqU/fvt6CadO4EOag9sIZYw9zEoQeff7w4wMc/M8Yg9kw+HYV1zsIqH yntMnyF13lHsUqNxRpI6A8Vg9yUksfZBM16f/U0Jx0v1+0FgZ1wHw2XFaNEfoVCuxXbT KD2sxc+pdXmTSDSypm/kxVqK5FJw3EqlDYrU/qyRVyRNAT+GLapTF1S+DYjXAH9aq2K0 TB+YcJ1ENWnFur8UHpd95WbG1edR9oDeFH2UcUEPeCYYLqqpb1ZTe8V7H02QyupP6BDN BBPsjz83sS6mTSWlflQrLOKFMskvuKhnPwltA7BHJWwS4uTUkqBKJsE1/CJCh90GZRFb pSOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :subject:cc:to:from:date; bh=4+7OvMIqD3fSNIfggRSp1JLgsGqIVHBddNIUNE1bOzs=; fh=an8/FVlvXEL1bo5XnASFVH8H4jhTd9Mc9h2v0McM6ZU=; b=DgywgbiDUgSYMXW0Ct9SBm4WGMYMLt4UvzUR0/kU6J+GfgEEsVHf5CC6Sk99LLnzBa z1oMcFLit6X8+68A2BoiKkqzAYPiPl8DzQ3tNb7KjcOXDvnyhxMwK4jthMXH81ctlOhR C5vKSZZOYzn6ojrlnJQDAuTSQ4Ni+mjc/D0zeuq3HOqN7PRgSLK+ANR3EqAGrWl3v9YY 0M8w8vmYwHql/fDgTNdzxB+6bmx9mTDVpT4m1UAODDwtu/X2nDexsQyp9CbIGRvVnWrh Dm04dS6smNJtUQCbT3FMrahpPvwAj1zYv7I4DI8VKXsWN6Kp7oxta0mqW2N4BVBR0baX 3DRw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-8562-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-8562-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id i24-20020a05620a145800b0078100b8e8c1si1804126qkl.731.2023.12.21.06.18.54 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Dec 2023 06:18:54 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-8562-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-8562-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-8562-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 0CE431C25A26 for ; Thu, 21 Dec 2023 14:18:54 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id CAEFA6D6F2; Thu, 21 Dec 2023 14:18:46 +0000 (UTC) X-Original-To: linux-kernel@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 604896D6C0; Thu, 21 Dec 2023 14:18:46 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CF226C433C7; Thu, 21 Dec 2023 14:18:44 +0000 (UTC) Date: Thu, 21 Dec 2023 09:19:47 -0500 From: Steven Rostedt To: David Laight Cc: "linux-kernel@vger.kernel.org" , "linux-trace-kernel@vger.kernel.org" , Masami Hiramatsu , Mark Rutland , Mathieu Desnoyers , Andrew Morton , Tzvetomir Stoyanov , Vincent Donnefort , Kent Overstreet Subject: Re: [PATCH v5 02/15] ring-buffer: Page size per ring buffer Message-ID: <20231221091947.3b35d5d8@gandalf.local.home> In-Reply-To: <30f49370d7ae494ab1afca5cf602ab55@AcuMS.aculab.com> References: <20231219185414.474197117@goodmis.org> <20231219185628.009147038@goodmis.org> <84d3b41a72bd43dbb9d44921ef535c92@AcuMS.aculab.com> <20231220080129.3453bca8@gandalf.local.home> <30f49370d7ae494ab1afca5cf602ab55@AcuMS.aculab.com> X-Mailer: Claws Mail 3.19.1 (GTK+ 2.24.33; x86_64-pc-linux-gnu) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Thu, 21 Dec 2023 09:17:55 +0000 David Laight wrote: > > Unfortunately, it has to be PAGE_SIZE (and for now it's a power of 2 to > > make masking easy). It's used for splice and will also be used for memory > > mapping with user space. > > Perhaps then the sysctl to set the size should be powers of 4k It's not a sysctl but a file in tracefs > with a minimum size of PAGE_SIZE. > Then you don't have to know the page size when setting things up. The user shouldn't need to know either. But the size of the sub-buffer limits the biggest size of an event, so the user only needs to make sure the sub-buffer is bigger than their biggest event. > > I'm also guessing that no Linux kernels have a PAGE_SIZE of 2k? > IIRC some old mmu (maybe 68020 era) used 2k pages. I think 1kb units is perfectly fine (patch 15 changes to kb units). The interface says its to define the minimal size of the sub-buffer, not the actual size. -- Steve