Message ID | 20231107-jag-sysctl_remove_empty_elem_kernel-v1-3-e4ce1388dfa0@samsung.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:aa0b:0:b0:403:3b70:6f57 with SMTP id k11csp243187vqo; Tue, 7 Nov 2023 05:47:14 -0800 (PST) X-Google-Smtp-Source: AGHT+IEQBHrEC0WA2vUFq3zvSjyjNY/jSW0vK+QSWuLINFVOH31pYzeCsbNfqC5nxI0G9X+XU4YO X-Received: by 2002:a05:6870:2a41:b0:1ea:e7e9:abc5 with SMTP id jd1-20020a0568702a4100b001eae7e9abc5mr3055013oab.6.1699364834371; Tue, 07 Nov 2023 05:47:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699364834; cv=none; d=google.com; s=arc-20160816; b=T3UhCS5DhvUj83bqxMXw4oGBZuFnRJ5UToxLEjaN9n01kH3MbCiTz/nA29P1i/TxJz j8tzfecYdvy0f+fg4LrZlT3Q7cAmX3zf5WiDrbFYGmJd3xqHWiITUMM9Cy6BBBF6a1Sq lNXDCL8PfhyTuOv3HMSVY5OLURlucIkfkGMH1scJ23RAbL10tHYuhUQFFdMM2IbEAzuR W79WKFg6blLSb2QLn05588JMeIiZGMnoZu1lkCncLcmbHoRzAJ1EpbY/fZVPoGewHHBC aoCyPGdq2intnF03IsIs9h+8+bfNy4H5f4rIASVMTHqk/RrTpN00syW4b4TPnzoRzlIB 5wmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:reply-to:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=rcmrFW3Dr1vNlM5Is2qt5uKhf1itfbAZotMkb/RlS5o=; fh=AuaFKPUwFYzSLqc7bUwLZldSXfNG4AOo7Dj5zlnvlas=; b=GzT4Y0pVUt2wObsAOCVHBGycMi3f9/DEajx0O0My5ip1a6oUFVAaKWjy5Yj/bhcpW4 Nuqv/GzD0fnCizGqNiwbX5aj7TxKlHkho84i3bnK0LEAiS/CaohB3OwfCtEOAm5EEpf2 viW3S534D3A1KMmzjF0qihPkrCXDTlsx8qR6exEvxJ0JZfD39clFkS4PatTKIoeOkBpF CNmwT9SzAq8WczJFPCQE7m3JTMn5GENL87TTBl3maD36B/3sDNg2Fp0Wd825h+6tKvr7 JTeULb5hzgfxjCsDuuAqQL349jc+4R3O3wM9FKmsgHlsYOMNWPbChUofSXjWuCzIf8em BIpA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=db8UkwCt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id w63-20020a638242000000b005bd2ab86667si2030891pgd.651.2023.11.07.05.47.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Nov 2023 05:47:14 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=db8UkwCt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id A6ADF81A3342; Tue, 7 Nov 2023 05:46:15 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234781AbjKGNpx (ORCPT <rfc822;lhua1029@gmail.com> + 32 others); Tue, 7 Nov 2023 08:45:53 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42830 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234852AbjKGNpd (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 7 Nov 2023 08:45:33 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1D7AB198A for <linux-kernel@vger.kernel.org>; Tue, 7 Nov 2023 05:45:14 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPS id 7EBB0C433BB; Tue, 7 Nov 2023 13:45:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1699364713; bh=ObpMazyJAc9ynk+EHag+YrlsvY0hIfWuMvTMCmZzkQc=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=db8UkwCtxkR0AVCzsfl4QwWzaeRpAHGVpQvU5Hf45+XEMRCFzcLhqOvilLqRxwFMA 5R7SnhOf7i6GwLiOys7agJ64LYdSMdqju5l3ROwZKqm+g9X0n/RE1k44rJwEaM298J 2hfDSbkTO1tkHZ/6K4md4a3fYyjeC10vxlQtRsjgeImUbdJ7pc67qLvz7IA3a/HuZq 5YajAE4SOlewLtSJL5olwX/9nSnxQcLleDxXnlzt6fCBWzAwDSSQB54WhgAo//ji9p nAbH54C+TCexSiZ2xI8HpwtC34d4yIlGhdJTKlqr4o9Nlg5r28SUrMqEIEwS5ob4Yl iIVigfhSlEcMA== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6795BC4332F; Tue, 7 Nov 2023 13:45:13 +0000 (UTC) From: Joel Granados via B4 Relay <devnull+j.granados.samsung.com@kernel.org> Date: Tue, 07 Nov 2023 14:45:03 +0100 Subject: [PATCH 03/10] ftrace: Remove the now superfluous sentinel elements from ctl_table array MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20231107-jag-sysctl_remove_empty_elem_kernel-v1-3-e4ce1388dfa0@samsung.com> References: <20231107-jag-sysctl_remove_empty_elem_kernel-v1-0-e4ce1388dfa0@samsung.com> In-Reply-To: <20231107-jag-sysctl_remove_empty_elem_kernel-v1-0-e4ce1388dfa0@samsung.com> To: Luis Chamberlain <mcgrof@kernel.org>, willy@infradead.org, josh@joshtriplett.org, Kees Cook <keescook@chromium.org>, Eric Biederman <ebiederm@xmission.com>, Iurii Zaikin <yzaikin@google.com>, Steven Rostedt <rostedt@goodmis.org>, Masami Hiramatsu <mhiramat@kernel.org>, Mark Rutland <mark.rutland@arm.com>, Thomas Gleixner <tglx@linutronix.de>, John Stultz <jstultz@google.com>, Stephen Boyd <sboyd@kernel.org>, Andy Lutomirski <luto@amacapital.net>, Will Drewry <wad@chromium.org>, Ingo Molnar <mingo@redhat.com>, Peter Zijlstra <peterz@infradead.org>, Juri Lelli <juri.lelli@redhat.com>, Vincent Guittot <vincent.guittot@linaro.org>, Dietmar Eggemann <dietmar.eggemann@arm.com>, Ben Segall <bsegall@google.com>, Mel Gorman <mgorman@suse.de>, Daniel Bristot de Oliveira <bristot@redhat.com>, Valentin Schneider <vschneid@redhat.com>, Petr Mladek <pmladek@suse.com>, John Ogness <john.ogness@linutronix.de>, Sergey Senozhatsky <senozhatsky@chromium.org>, "Naveen N. Rao" <naveen.n.rao@linux.ibm.com>, Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com>, "David S. Miller" <davem@davemloft.net>, Balbir Singh <bsingharora@gmail.com>, Alexei Starovoitov <ast@kernel.org>, Daniel Borkmann <daniel@iogearbox.net>, John Fastabend <john.fastabend@gmail.com>, Andrii Nakryiko <andrii@kernel.org>, Martin KaFai Lau <martin.lau@linux.dev>, Song Liu <song@kernel.org>, Yonghong Song <yonghong.song@linux.dev>, KP Singh <kpsingh@kernel.org>, Stanislav Fomichev <sdf@google.com>, Hao Luo <haoluo@google.com>, Jiri Olsa <jolsa@kernel.org> Cc: linux-kernel@vger.kernel.org, kexec@lists.infradead.org, linux-fsdevel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, bpf@vger.kernel.org, Joel Granados <j.granados@samsung.com> X-Mailer: b4 0.13-dev-86aa5 X-Developer-Signature: v=1; a=openpgp-sha256; l=1388; i=j.granados@samsung.com; h=from:subject:message-id; bh=d6hPZmC0K0IZzUwuA4aA7VK86RM6Vm7GkvrWR105S0E=; b=owEB7QES/pANAwAKAbqXzVK3lkFPAcsmYgBlSj9lKwF0fwW5XohsA5vvIrvTl6CihI1Q3EeNJ 1+nbY0Q/K6JAbMEAAEKAB0WIQSuRwlXJeYxJc7LJ5C6l81St5ZBTwUCZUo/ZQAKCRC6l81St5ZB T4lYC/95wZ4kifDVujQZe0FCBvIwJyiKps3QZSfbJ79+rERGzcohQ++TiJw7ZyOi4hRzK3EiPYT p+cbzWPvvvihGq/oGOA6EGSIuQg2p3Xrsx5XSvuQnML8O1+wEkgiPWaeI+SWN8l0aDN6IMNZZcb txsFxM+IQTvCL9BBs8oOU3y3/8/7X1e/GJ90E/roVtTI4pE3VOQRy4s07Ah8WsFaMvWaCna70kW DQxvwXFmfeaC2b3bcM4fh4evrnw0Uf9NIRk2HepfG4qOq/hTywIPExdzlmdkpkoXGETgrkkFJte J/WDVMw1D4UcPI/MYKMQc81OCVnJh3AXc1BVRExO8OPH9h+Z5QSwlyXwhSmQoHpldVT21rZTevU cFVhJwUOeZ1xQlPvOXycjFtpOw6YTqXqgRGJfdogL25Z3X82bdmsnjSln7B2J013ZounxTYi0Hu Rt53vLQUCKnZKYnj1S4BsunkR9corlfOEoO5q/qU+hjvcNxWDIS8SOD/tdD5DS95+9lTQ= X-Developer-Key: i=j.granados@samsung.com; a=openpgp; fpr=F1F8E46D30F0F6C4A45FF4465895FAAC338C6E77 X-Endpoint-Received: by B4 Relay for j.granados@samsung.com/default with auth_id=70 X-Original-From: Joel Granados <j.granados@samsung.com> Reply-To: <j.granados@samsung.com> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Tue, 07 Nov 2023 05:46:15 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1781913181026214862 X-GMAIL-MSGID: 1781913181026214862 |
Series |
[01/10] kernel misc: Remove the now superfluous sentinel elements from ctl_table array
|
|
Commit Message
Joel Granados via B4 Relay
Nov. 7, 2023, 1:45 p.m. UTC
From: Joel Granados <j.granados@samsung.com> This commit comes at the tail end of a greater effort to remove the empty elements at the end of the ctl_table arrays (sentinels) which will reduce the overall build time size of the kernel and run time memory bloat by ~64 bytes per sentinel (further information Link : https://lore.kernel.org/all/ZO5Yx5JFogGi%2FcBo@bombadil.infradead.org/) Remove sentinel elements from ftrace_sysctls and user_event_sysctls Signed-off-by: Joel Granados <j.granados@samsung.com> --- kernel/trace/ftrace.c | 1 - kernel/trace/trace_events_user.c | 1 - 2 files changed, 2 deletions(-)
Comments
On Tue, 07 Nov 2023 14:45:03 +0100 Joel Granados via B4 Relay <devnull+j.granados.samsung.com@kernel.org> wrote: > From: Joel Granados <j.granados@samsung.com> > > This commit comes at the tail end of a greater effort to remove the > empty elements at the end of the ctl_table arrays (sentinels) which > will reduce the overall build time size of the kernel and run time > memory bloat by ~64 bytes per sentinel (further information Link : > https://lore.kernel.org/all/ZO5Yx5JFogGi%2FcBo@bombadil.infradead.org/) > > Remove sentinel elements from ftrace_sysctls and user_event_sysctls > Both looks good to me. (since register_sysctl_init() uses ARRAY_SIZE() macro to get the array size.) Acked-by: Masami Hiramatsu (Google) <mhiramat@kernel.org> > Signed-off-by: Joel Granados <j.granados@samsung.com> > --- > kernel/trace/ftrace.c | 1 - > kernel/trace/trace_events_user.c | 1 - > 2 files changed, 2 deletions(-) > > diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c > index 8de8bec5f366..fd40d02a23c7 100644 > --- a/kernel/trace/ftrace.c > +++ b/kernel/trace/ftrace.c > @@ -8264,7 +8264,6 @@ static struct ctl_table ftrace_sysctls[] = { > .mode = 0644, > .proc_handler = ftrace_enable_sysctl, > }, > - {} > }; > > static int __init ftrace_sysctl_init(void) > diff --git a/kernel/trace/trace_events_user.c b/kernel/trace/trace_events_user.c > index 6f046650e527..bef1bdc62acf 100644 > --- a/kernel/trace/trace_events_user.c > +++ b/kernel/trace/trace_events_user.c > @@ -2694,7 +2694,6 @@ static struct ctl_table user_event_sysctls[] = { > .mode = 0644, > .proc_handler = set_max_user_events_sysctl, > }, > - {} > }; > > static int __init trace_events_user_init(void) > > -- > 2.30.2 >
On Wed, 8 Nov 2023 19:29:49 +0900 Masami Hiramatsu (Google) <mhiramat@kernel.org> wrote: > On Tue, 07 Nov 2023 14:45:03 +0100 > Joel Granados via B4 Relay <devnull+j.granados.samsung.com@kernel.org> wrote: > > > From: Joel Granados <j.granados@samsung.com> > > > > This commit comes at the tail end of a greater effort to remove the > > empty elements at the end of the ctl_table arrays (sentinels) which > > will reduce the overall build time size of the kernel and run time > > memory bloat by ~64 bytes per sentinel (further information Link : > > https://lore.kernel.org/all/ZO5Yx5JFogGi%2FcBo@bombadil.infradead.org/) > > > > Remove sentinel elements from ftrace_sysctls and user_event_sysctls > > > > Both looks good to me. (since register_sysctl_init() uses ARRAY_SIZE() > macro to get the array size.) > > Acked-by: Masami Hiramatsu (Google) <mhiramat@kernel.org> Agreed. Acked-by: Steven Rostedt (Google) <rostedt@goodmis.org> -- Steve
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c index 8de8bec5f366..fd40d02a23c7 100644 --- a/kernel/trace/ftrace.c +++ b/kernel/trace/ftrace.c @@ -8264,7 +8264,6 @@ static struct ctl_table ftrace_sysctls[] = { .mode = 0644, .proc_handler = ftrace_enable_sysctl, }, - {} }; static int __init ftrace_sysctl_init(void) diff --git a/kernel/trace/trace_events_user.c b/kernel/trace/trace_events_user.c index 6f046650e527..bef1bdc62acf 100644 --- a/kernel/trace/trace_events_user.c +++ b/kernel/trace/trace_events_user.c @@ -2694,7 +2694,6 @@ static struct ctl_table user_event_sysctls[] = { .mode = 0644, .proc_handler = set_max_user_events_sysctl, }, - {} }; static int __init trace_events_user_init(void)