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 DDD3AEB8FBC for ; Wed, 6 Sep 2023 12:35:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239501AbjIFMff (ORCPT ); Wed, 6 Sep 2023 08:35:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50172 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234499AbjIFMfd (ORCPT ); Wed, 6 Sep 2023 08:35:33 -0400 Received: from mailout1.w1.samsung.com (mailout1.w1.samsung.com [210.118.77.11]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B68341713; Wed, 6 Sep 2023 05:35:28 -0700 (PDT) Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20230906123525euoutp01aef263d18f43afc5e0f456b68b34412b~CT2m_4MNh1721017210euoutp01T; Wed, 6 Sep 2023 12:35:25 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20230906123525euoutp01aef263d18f43afc5e0f456b68b34412b~CT2m_4MNh1721017210euoutp01T DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1694003725; bh=kSfDM2PxptQrTVQMPAG5rz9E3Gh0CgYjQq2vX1wh1u8=; h=Date:From:To:CC:Subject:In-Reply-To:References:From; b=m+6wDQ82ef/d8/4nlWMYTE9kfnIAoWlhMhdqHBBfihfqWuP8iM3eVNlzJjRaHltMU 2l4lDxXybgq/aUTbfAyOFFW1c/WG3S6g0Slu0hR8E1wgIfPIBWUX5aRY9fX8h2g49x 0RiNloUw+2A+/56qP9XBwg7AqfowYcMjmZDUd1vg= Received: from eusmges3new.samsung.com (unknown [203.254.199.245]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20230906123525eucas1p15d5663db311f0d147c190276abfe8f84~CT2mw_TAz2306723067eucas1p1U; Wed, 6 Sep 2023 12:35:25 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges3new.samsung.com (EUCPMTA) with SMTP id 5D.86.37758.C0278F46; Wed, 6 Sep 2023 13:35:25 +0100 (BST) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p2.samsung.com (KnoxPortal) with ESMTPA id 20230906123524eucas1p22d0bf30fe10ce0ee7ca45eca03ef3235~CT2mJczO42726327263eucas1p29; Wed, 6 Sep 2023 12:35:24 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20230906123524eusmtrp28aa6f6cde31078bfe52b8c173cbb675a~CT2mG2adp0571505715eusmtrp2L; Wed, 6 Sep 2023 12:35:24 +0000 (GMT) X-AuditID: cbfec7f5-815ff7000002937e-38-64f8720cdaa5 Received: from eusmtip2.samsung.com ( [203.254.199.222]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 02.16.14344.C0278F46; Wed, 6 Sep 2023 13:35:24 +0100 (BST) Received: from CAMSVWEXC02.scsc.local (unknown [106.1.227.72]) by eusmtip2.samsung.com (KnoxPortal) with ESMTPA id 20230906123524eusmtip2c81fad208fd37b2f2d78a8b26ceda34c~CT2ltQB-30461004610eusmtip2c; Wed, 6 Sep 2023 12:35:24 +0000 (GMT) Received: from localhost (106.210.248.249) by CAMSVWEXC02.scsc.local (2002:6a01:e348::6a01:e348) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 6 Sep 2023 13:35:23 +0100 Date: Wed, 6 Sep 2023 14:35:21 +0200 From: Joel Granados To: Alexey Gladkov CC: Luis Chamberlain , Linus Torvalds , Joel Granados , , , "David S. Miller" , Florian Westphal , , Jan Karcher , Wen Gu , Simon Horman , Tony Lu , , Matthieu Baerts , Christian Borntraeger , , Heiko Carstens , Stefan Schmidt , Will Deacon , Julian Anastasov , , Joerg Reuter , , Alexander Gordeev , , Xin Long , Herbert Xu , , Vasily Gorbik , , Ralf Baechle , Steffen Klassert , Pablo Neira Ayuso , , Roopa Prabhu , David Ahern , , Catalin Marinas , Jozsef Kadlecsik , Wenjia Zhang , , Alexander Aring , Nikolay Aleksandrov , , Santosh Shilimkar , , Sven Schnelle , "D. Wythe" , Eric Dumazet , , , Paolo Abeni , Iurii Zaikin , Marcelo Ricardo Leitner , , Karsten Graul , Mat Martineau , Miquel Raynal , Jakub Kicinski Subject: Re: [GIT PULL] sysctl changes for v6.6-rc1 Message-ID: <20230906123521.xrqcmr3ilpvp2ze6@localhost> MIME-Version: 1.0 Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="l5htxkzwtgg23zjg" Content-Disposition: inline In-Reply-To: X-Originating-IP: [106.210.248.249] X-ClientProxiedBy: CAMSVWEXC01.scsc.local (2002:6a01:e347::6a01:e347) To CAMSVWEXC02.scsc.local (2002:6a01:e348::6a01:e348) X-Brightmail-Tracker: H4sIAAAAAAAAA2WTe0xTZxjG851zelrQmkNh+gWMbhWJA1YBcb5TcJq4eWbMLon+ITNznZwg GRRtxcvYMqR4AUWr6JDikKorhRYYiFUqm1CUe7h4CzjUlYu6FgEHVcAAKxzYTPbf733f58n3 PH98IlIyJvQWRSt2c0qFPEZKu1Pm6pHm98TK4cig5E4ExQ1/0WBNXAG28lQBdI1Zaag1/SGE fv0xBGNlh0k415xMQaHlIAE91Z1CMKcZEbRoXwrg6tNXNDiy8xEctc8H9RUngu4TnQK4qx+g 4VSSGCZy4mDk+CzITFUT0Hg0Fvp/yiKgxXzc9ZDuEyjpui+A8t/qKLh/9SEBdyznaHhiTaNA o1OT0JPjEEBHup6CzqJ+AtTn/yZh1FAjgKa0CRIMjU8IaNP0IKg6/LsAGouShFCdM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6i6i0okZfjPC OKgZuVk6R38q70HOhFgiZniOtne3zkfb20aLUg8yUkmUNDmekTUjf8svHsOdn9krsSyZOCnK J8Db38cvQOjtLwzw5TnZhiV+I7LnxoiSmDiGSWSk//ZhHBvnNEw3Mag1eJmIoTT+/voIbceo 3EDUptrsuOfE27gYodoWrg4TX/9sl3fR8ked+tTAOu2PuwpCU1C264htnF7CuSTYXp4dlxWy c6Bf0X/tUpYp5uSOA+Sfd/K3tHgLpJHHh4vVrV/5blp4/axGnhkujB7xHN49qBGmV8QYQx+4 Dhue08VsZjb/sPa0yRwRa3hlv/nwW64BODqk2+PM//x9oX48NE4vPJg8E9BgVh6QyCvZbWJc IFY5XOkwvhfZEjldVpNZex5LfK194e0j4rgx08xiGjPbeUTUTqLoeB33g+53d/4R2FLU/+bN p8ort9nHhr3ROx7uEnVN6KRbbjv24W4PHiGLFfm441KZ6B9l6Qk3rAQAAA== X-CMS-MailID: 20230906123524eucas1p22d0bf30fe10ce0ee7ca45eca03ef3235 X-Msg-Generator: CA X-RootMTR: 20230906115909eucas1p2fcf08f26861b318571224dad6bf5e864 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20230906115909eucas1p2fcf08f26861b318571224dad6bf5e864 References: Precedence: bulk List-ID: X-Mailing-List: netfilter-devel@vger.kernel.org --l5htxkzwtgg23zjg Content-Type: text/plain; charset="iso-8859-1" Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Sep 06, 2023 at 01:58:49PM +0200, Alexey Gladkov wrote: > On Tue, Aug 29, 2023 at 01:44:55PM -0700, Luis Chamberlain wrote: > > The following changes since commit 06c2afb862f9da8dc5efa4b6076a0e48c3fb= aaa5: > >=20 > > Linux 6.5-rc1 (2023-07-09 13:53:13 -0700) > >=20 > > are available in the Git repository at: > >=20 > > git://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux.git/ tags/= sysctl-6.6-rc1 > >=20 > > for you to fetch changes up to 53f3811dfd5e39507ee3aaea1be09aabce8f9c98: > >=20 > > sysctl: Use ctl_table_size as stopping criteria for list macro (2023-= 08-15 15:26:18 -0700) > >=20 > > ---------------------------------------------------------------- > > sysctl-6.6-rc1 > >=20 > > Long ago we set out to remove the kitchen sink on kernel/sysctl.c array= s and > > placings sysctls to their own sybsystem or file to help avoid merge con= flicts. > > Matthew Wilcox pointed out though that if we're going to do that we mig= ht as > > well also *save* space while at it and try to remove the extra last sys= ctl > > entry added at the end of each array, a sentintel, instead of bloating = the > > kernel by adding a new sentinel with each array moved. > >=20 > > Doing that was not so trivial, and has required slowing down the moves = of > > kernel/sysctl.c arrays and measuring the impact on size by each new mov= e. > >=20 > > The complex part of the effort to help reduce the size of each sysctl i= s being > > done by the patient work of el se=F1or Don Joel Granados. A lot of this= is truly > > painful code refactoring and testing and then trying to measure the sav= ings of > > each move and removing the sentinels. Although Joel already has code wh= ich does > > most of this work, experience with sysctl moves in the past shows is we= need to > > be careful due to the slew of odd build failures that are possible due = to the > > amount of random Kconfig options sysctls use. > >=20 > > To that end Joel's work is split by first addressing the major housekee= ping > > needed to remove the sentinels, which is part of this merge request. Th= e rest > > of the work to actually remove the sentinels will be done later in futu= re > > kernel releases. >=20 > This is very interesting for me. I'm also refactoring sysctl based on > discussion with Linus a while ago. >=20 > Could you please add me to the Cc in the next patches? I just sent the next batch for this set for review. You can see it here https://lore.kernel.org/all/20230906-jag-sysctl_remove_empty_elem_arch-v1-0= -3935d4854248@samsung.com/ Will add you for the next ones. Best >=20 > > At first I was only going to send his first 7 patches of his patch seri= es, > > posted 1 month ago, but in retrospect due to the testing the changes ha= ve > > received in linux-next and the minor changes they make this goes with t= he > > entire set of patches Joel had planned: just sysctl house keeping. Ther= e are > > networking changes but these are part of the house keeping too. > >=20 > > The preliminary math is showing this will all help reduce the overall b= uild > > time size of the kernel and run time memory consumed by the kernel by a= bout > > ~64 bytes per array where we are able to remove each sentinel in the fu= ture. > > That also means there is no more bloating the kernel with the extra ~64= bytes > > per array moved as no new sentinels are created. > >=20 > > Most of this has been in linux-next for about a month, the last 7 patch= es took > > a minor refresh 2 week ago based on feedback. > >=20 > > ---------------------------------------------------------------- > > Joel Granados (14): > > sysctl: Prefer ctl_table_header in proc_sysctl > > sysctl: Use ctl_table_header in list_for_each_table_entry > > sysctl: Add ctl_table_size to ctl_table_header > > sysctl: Add size argument to init_header > > sysctl: Add a size arg to __register_sysctl_table > > sysctl: Add size to register_sysctl > > sysctl: Add size arg to __register_sysctl_init > > sysctl: Add size to register_net_sysctl function > > ax.25: Update to register_net_sysctl_sz > > netfilter: Update to register_net_sysctl_sz > > networking: Update to register_net_sysctl_sz > > vrf: Update to register_net_sysctl_sz > > sysctl: SIZE_MAX->ARRAY_SIZE in register_net_sysctl > > sysctl: Use ctl_table_size as stopping criteria for list macro > >=20 > > arch/arm64/kernel/armv8_deprecated.c | 2 +- > > arch/s390/appldata/appldata_base.c | 2 +- > > drivers/net/vrf.c | 3 +- > > fs/proc/proc_sysctl.c | 90 +++++++++++++++++--------= -------- > > include/linux/sysctl.h | 31 +++++++++--- > > include/net/ipv6.h | 2 + > > include/net/net_namespace.h | 10 ++-- > > ipc/ipc_sysctl.c | 4 +- > > ipc/mq_sysctl.c | 4 +- > > kernel/ucount.c | 5 +- > > net/ax25/sysctl_net_ax25.c | 3 +- > > net/bridge/br_netfilter_hooks.c | 3 +- > > net/core/neighbour.c | 8 ++- > > net/core/sysctl_net_core.c | 3 +- > > net/ieee802154/6lowpan/reassembly.c | 8 ++- > > net/ipv4/devinet.c | 3 +- > > net/ipv4/ip_fragment.c | 3 +- > > net/ipv4/route.c | 8 ++- > > net/ipv4/sysctl_net_ipv4.c | 3 +- > > net/ipv4/xfrm4_policy.c | 3 +- > > net/ipv6/addrconf.c | 3 +- > > net/ipv6/icmp.c | 5 ++ > > net/ipv6/netfilter/nf_conntrack_reasm.c | 3 +- > > net/ipv6/reassembly.c | 3 +- > > net/ipv6/route.c | 9 ++++ > > net/ipv6/sysctl_net_ipv6.c | 16 ++++-- > > net/ipv6/xfrm6_policy.c | 3 +- > > net/mpls/af_mpls.c | 6 ++- > > net/mptcp/ctrl.c | 3 +- > > net/netfilter/ipvs/ip_vs_ctl.c | 8 ++- > > net/netfilter/ipvs/ip_vs_lblc.c | 10 ++-- > > net/netfilter/ipvs/ip_vs_lblcr.c | 10 ++-- > > net/netfilter/nf_conntrack_standalone.c | 4 +- > > net/netfilter/nf_log.c | 7 +-- > > net/rds/tcp.c | 3 +- > > net/sctp/sysctl.c | 4 +- > > net/smc/smc_sysctl.c | 3 +- > > net/sysctl_net.c | 26 +++++++--- > > net/unix/sysctl_net_unix.c | 3 +- > > net/xfrm/xfrm_sysctl.c | 8 ++- > > 40 files changed, 222 insertions(+), 113 deletions(-) >=20 > --=20 > Rgrds, legion >=20 --=20 Joel Granados --l5htxkzwtgg23zjg Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEErkcJVyXmMSXOyyeQupfNUreWQU8FAmT4cgkACgkQupfNUreW QU9+Cwv+PGlN6idIMQ5c8C0f+ZfC5w4Z+JE4kmlQCz1bP2MeE/pPTaPtyWYqpG8L fCfed2PJj3OndPFVZ8htgmNw43rVuzq+FLpoXoS6A+GQTwt+oFYhkmEHImix1EHY LgHQwS53MI/8uswyrLCgFK1wB3oWOl2iSsNmafe2N9DNQnjtNMHWA45X9zejzEu3 yIroWgdeLsDjCje7bCASIxWYMQ0mLCcHYnHhLi9t3oLmtCxrfqz/YvUoAtuUGJId EsmlWY0oVOSbUnAv7/CUX6Vh0zXFxtT91spcvDNl8S1araoo1HlooVdK96Odh/Ly hiP9KFjySgIdD5HpsT1tSMbEgdx/r1Iv8z4HWJDcpoz4vXeBJRTrdu+H4XJcvXlB r9R97zixnSmMaNnAIsNh37llJAYe2pmy9I9/lXAB12U/Z/WQ47aMUZCzIHcuyX8F RTLOFn64GT9n7pWmFNOllKMnkTWbxeCJhzmDbbndW5RhtVt5XbxCBYL8RZ9ne9PD fMmoGngO =CaN7 -----END PGP SIGNATURE----- --l5htxkzwtgg23zjg--