Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp329377pxm; Wed, 2 Mar 2022 16:32:17 -0800 (PST) X-Google-Smtp-Source: ABdhPJziF2c44Iyxrf0kqmPTLr1g+mIEAdZuOwzUKkuxnwMW68+T51XcTLfQ31ZH/gxWEYDzWPXZ X-Received: by 2002:a17:903:1c8:b0:150:12cd:a02d with SMTP id e8-20020a17090301c800b0015012cda02dmr33136995plh.174.1646267536892; Wed, 02 Mar 2022 16:32:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646267536; cv=none; d=google.com; s=arc-20160816; b=dwVzbj1eiIpAw3KUBAheXYONWVkQXN/i8Z0w6zDnpa0hCbbc4kI/rpM583z2aTNY4m /aL0/BwI+O9LE+jLzqRU6jZ32+TxbMRXngEa5wqP8doSwKU3uEO+mCEXS0v8M4InIVH4 1cRuD4uHJpzF6hvg5qQ7uyl0VAWU6VQjFNGCAIS7RXmBFKnh+1lNJMPiwMq2pyyoPgji DSEa6S4axOjGpFuIDXNTxuE2ECdQgybvZ11BlKUdZojICfWn0RCvpahKG6qVAupYWpIz 1pMywZskSi7BDCD9fM1Tq+WleqPv5WaSwb+Ap/ZWNHKrxzpATu8Xc3Y/Wlkfn2iihpew 6rgQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=cA/im1dmXrUD82WWJsDC0s7CUiOhwfEqA+Dub8QQkec=; b=wzcV5qMOQ9gOcJcITsqYKx3iEmmZjkCpbyP461Aa5t9gZHzhtHn0KvHNrbJPQ4rsNn uMzPhv8WBRSf6xlUcOTK8i4seipx+7MCPspKaeJa06eNSI53mHECA+aQbs/DT9tf/dYr nuzHrzyw26+NuHWwm0zM2NKoEssfa2OYt6UzEyDoeu8gewRAqn/ijDCCCQWRHWB2cQiS dFlIdFBoeMCnC5Wxb5lrVtvrHYpVZjQFfd+kFgsFgCDbnX7UdLw4OjQoC3YUGA9H+jD7 vpcsJmPJGgsiJZGJxYcGo862djqC9CSwMY4YP2Fu6cHdCocLJY31YYLAfYodA1ojv+Eu Aj0A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=zAd5g+Ld; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id v20-20020a17090a459400b001bc588cc06asi411659pjg.90.2022.03.02.16.32.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Mar 2022 16:32:16 -0800 (PST) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=zAd5g+Ld; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 2BB6C238912; Wed, 2 Mar 2022 15:43:29 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229960AbiCBWvu (ORCPT + 99 others); Wed, 2 Mar 2022 17:51:50 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41026 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229998AbiCBWvr (ORCPT ); Wed, 2 Mar 2022 17:51:47 -0500 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AE1B11029D6; Wed, 2 Mar 2022 14:50:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=cA/im1dmXrUD82WWJsDC0s7CUiOhwfEqA+Dub8QQkec=; b=zAd5g+LdzL45SyO0HIcd9iun5W VgrSAbIUAYOTkevd8vRxwz005p7+xxZyOq0L6EPqCtROxfRcUXCdRuwsCSuLXTdoZ2vwPai7uoAwP k3y2seROOh7zl1VvKLgP40kSRqteL9FyhA5YL3fui299PIX5p/IWFTO3sxuxBYGFaggaGZsimlWRU hxCbylspbhoBc43fu5k0NaWB2Kp1Wq3POByJsMwxmibqiAOiWvjp8lLdIeEEZqTh8u3yDGvMt/jEa wjph19ZVoEh1GChk4TUunJsiyujzuqQ9Q6CT1Gjnb07PhP1cgXLy6cPUxsLBpZ8gR6fg9xhglAHmi bT1EGwQA==; Received: from mcgrof by bombadil.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1nPXnB-004dAP-N4; Wed, 02 Mar 2022 22:49:57 +0000 Date: Wed, 2 Mar 2022 14:49:57 -0800 From: Luis Chamberlain To: Meng Tang Cc: keescook@chromium.org, yzaikin@google.com, ebiederm@xmission.com, willy@infradead.org, nixiaoming@huawei.com, nizhen@uniontech.com, zhanglianjie@uniontech.com, sujiaxun@uniontech.com, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org Subject: Re: [PATCH v3 1/2] fs/proc: optimize exactly register one ctl_table Message-ID: References: <20220302025511.20374-1-tangmeng@uniontech.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220302025511.20374-1-tangmeng@uniontech.com> Sender: Luis Chamberlain X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE, T_SCC_BODY_TEXT_LINE autolearn=no 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: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Mar 02, 2022 at 10:55:10AM +0800, Meng Tang wrote: > Sysctls are being moved out of kernel/sysctl.c and out to > their own respective subsystems / users to help with easier > maintance and avoid merge conflicts. But when we move just > one entry and to its own new file the last entry for this > new file must be empty, so we are essentialy bloating the > kernel one extra empty entry per each newly moved sysctl. > > To help with this, this adds support for registering just > one ctl_table, therefore not bloating the kernel when we > move a single ctl_table to its own file. > > Since the process of registering just one single table is the > same as that of registering an array table, so the code is > similar to registering an array table. The difference between > registering just one table and registering an array table is > that we no longer traversal through pointers when registering > a single table. These lead to that we have to add a complete > implementation process for register just one ctl_table, so we > have to add so much code. > > Suggested-by: Matthew Wilcox > Signed-off-by: Meng Tang Is there really no helpers which you can add to share code? Now that you did this work, look carefully. Luis