Received: by 2002:a05:7412:8d06:b0:f9:332d:97f1 with SMTP id bj6csp57437rdb; Mon, 18 Dec 2023 08:50:25 -0800 (PST) X-Google-Smtp-Source: AGHT+IG9XH6uTWWXolgiB9veBJjnoXIwWjGZYbVJ/UUOeO3k5wDGd5zW3woRPeyZTN8WhDYPjHnS X-Received: by 2002:a17:903:41c8:b0:1d3:c5e4:b2f3 with SMTP id u8-20020a17090341c800b001d3c5e4b2f3mr962471ple.100.1702918224830; Mon, 18 Dec 2023 08:50:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702918224; cv=none; d=google.com; s=arc-20160816; b=UprcVgzWcxAAxbz3RwXXCN5B+wmsNOJ/Rqq9gAnHamOE2t0maIWVRAQrfIw1GQq8BX 62LrdaKr/u3MDIw+6h5QNE2r3Nkrw4eD21o6+ZbZG4pYFMTrqAVjacExIg9QaZqWAIIg kSbaWrSsh4/vrgWfinjP7yH2+DQ184OlDkQUCozy7DjhGjUbteKUkH7jawO7zJu2QAts k2GRLXfJSl2KK9bip8E4DnGVAaEr1XWX9sjtOBfajJtCYURZuISrBp6v1s9/buUOMD1C N83q7JrRD2WuC9fwFz38q/W1026zWnhhAZkwB9+1yWtA+EZbb6T+uKLOfck3o0jnhkty WtKw== 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=WkaCgTDCk6rbWkXruHYAUaddecM0L32vrYEDhu4Lqco=; fh=H7rhZUnZ+NlyyU7vxDXWwpu6VPK6D0cjPor36M8Xy6o=; b=hCWxMPQHzx68rUwBEJ9uwdY8EF4J/0aroMlHpQQwM1+C8JvO5YPdgHNU3S0KpDj8vy 4XeghJWJa7NpHabnhz3TuZ/8MPhEIJ8U/KVELLt7yzPzyLsgiBuK/U+MYoGZYLazgdb/ 4Nm892ugjRZQfU0QT1LExTuJlKLqlmPtkTonfzU6OWE/jS7sPLFmx2GnPJ5xY61z489k UwnMf8JcQqdayWn3MVVfwPhGGt/lKk7/PYW96/MyoXDSYjA1qEY6sq6t7EJi+hdU89CB sA/ECgkiDIKPdwcWFRV0jzpwX6KJTKsLHeD26bhPQx+UHC1dI3bd5vhKRHrFu176p5pw QWpw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-4081-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-4081-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id l1-20020a170902f68100b001d39af8d1b6si4681705plg.610.2023.12.18.08.50.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Dec 2023 08:50:24 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-4081-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-4081-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-4081-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 4B4BB286E4F for ; Mon, 18 Dec 2023 16:42:20 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2C664498B4; Mon, 18 Dec 2023 16:42:14 +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 B086B1E4AF; Mon, 18 Dec 2023 16:42:13 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8E6DEC433C8; Mon, 18 Dec 2023 16:42:12 +0000 (UTC) Date: Mon, 18 Dec 2023 11:43:08 -0500 From: Steven Rostedt To: Vincent Donnefort Cc: mhiramat@kernel.org, linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, kernel-team@android.com Subject: Re: [PATCH v7 0/2] ring-buffer: Rename sub-buffer into buffer page Message-ID: <20231218114308.4ed19608@gandalf.local.home> In-Reply-To: <20231218112817.7f3c8847@gandalf.local.home> References: <20231218151451.944907-1-vdonnefort@google.com> <20231218154618.954997-1-vdonnefort@google.com> <20231218112817.7f3c8847@gandalf.local.home> 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 Mon, 18 Dec 2023 11:28:17 -0500 Steven Rostedt wrote: > > Remove all references to sub-buffer and replace them with either bpage > > or ring_buffer_page. The user interface should not be changed. But what I would like to have changed (and this will come after all other changes are complete), is to do the following renaming: original structure name new name variable reference ----------------------- -------- ------------------ struct buffer_data_page struct buffer_data bdata (was bpage) struct buffer_page struct buffer_subbuf subbuf (was also bpage) Also change: struct buffer_page { [..] struct buffer_data_page *page; /* Actual data page */ }; Into: struct buffer_subbuf { [..] struct buffer_data *data; /* Actual data */ }; Then we can do a global rename of functions like: free_buffer_page() -> free_buffer_subbuf() And things like rb_init_page() into rb_init_subbuf() __rb_allocate_pages() -> rb_allocate_subbufs() etc. This should be broken up into steps of changes: 1. Rename the struct buffer_data_page and bpage->bdata 2. Rename the struct buffer_page and bpage->subbuf 3. Rename static functions And I just realized that the two functions exposed outside of the file are not used anywhere else. We can remove one and make the other one static (as it is used within the file). ring_buffer_nr_pages() -> delete ring_buffer_nr_dirty_pages -> convert to static rb_nr_dirty_pages() Thanks, -- Steve