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 5833DC74A5B for ; Tue, 21 Mar 2023 16:56:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230249AbjCUQ4O (ORCPT ); Tue, 21 Mar 2023 12:56:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46278 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229749AbjCUQ4K (ORCPT ); Tue, 21 Mar 2023 12:56:10 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C1E8F3756B; Tue, 21 Mar 2023 09:56:09 -0700 (PDT) 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=aWRXn4qd7nGpPUiNMqqImVVM3mu78Lrs3TrOsbvgJcA=; b=EcvwQ4+rTdqMikqp4h6IbYe7eq x+/vaeND8+Pnbide5qsQEu7wYbE4sWV7+0lhEEDCDYRV2P022yybUtLmdd5MufQcMXYw1RJ8r16sF sAOns7KcD48sCnMH+KouTPnh2hmZgMDxgUyVMFsNbvgWHWALUWu85iGi2ZUycA8MQWG7U4/aaEjdk fQYCMKCnePPcW9WTTpKSu0A+LWQfKQapAWjYxKLn49WjpJZqxZeSMcsWMxpnWhnJqnuabZ6LBwkp3 YJf7QMmkf3Ash6d1yn/7K7EpJYmaIz3Remo7y74HflrHb7rGRZkPNsJo3E1QkOU9Vk+FU1OxRjjvk Braj4VWQ==; Received: from mcgrof by bombadil.infradead.org with local (Exim 4.96 #2 (Red Hat Linux)) id 1pefHH-00D91D-2j; Tue, 21 Mar 2023 16:56:03 +0000 Date: Tue, 21 Mar 2023 09:56:03 -0700 From: Luis Chamberlain To: Matthew Wilcox Cc: Yangtao Li , Alexander Viro , Christian Brauner , Andrew Morton , Kees Cook , Iurii Zaikin , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH] fs/drop_caches: move drop_caches sysctls into its own file Message-ID: References: <20230321130908.6972-1-frank.li@vivo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: Luis Chamberlain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Mar 21, 2023 at 04:42:32PM +0000, Matthew Wilcox wrote: > On Tue, Mar 21, 2023 at 09:09:07PM +0800, Yangtao Li wrote: > > +static struct ctl_table drop_caches_table[] = { > > + { > > + .procname = "drop_caches", > > + .data = &sysctl_drop_caches, > > + .maxlen = sizeof(int), > > + .mode = 0200, > > + .proc_handler = drop_caches_sysctl_handler, > > + .extra1 = SYSCTL_ONE, > > + .extra2 = SYSCTL_FOUR, > > + }, > > + {} > > +}; > > Could we avoid doing this until we no longer need an entire zero entry > after the last one? That may be 2-3 kernel release from now. The way to use ARRAY_SIZE() really is to deprecate the crap APIs that allow messy directory sysctl structures. > Also, please post scripts/bloat-o-meter results > for before-and-after. It should be one extry ~ ctl_table per move. Luis