Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp1342942pxm; Sat, 26 Feb 2022 12:22:52 -0800 (PST) X-Google-Smtp-Source: ABdhPJzjvlO+bsva1I3R685D9vPW2dJtWHUcBMJN+bl0GaNSkh5BafdqIY2UhvHrJtXW1n5LDgrF X-Received: by 2002:a17:902:d2cd:b0:14f:c169:dc6f with SMTP id n13-20020a170902d2cd00b0014fc169dc6fmr13290066plc.170.1645906972401; Sat, 26 Feb 2022 12:22:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645906972; cv=none; d=google.com; s=arc-20160816; b=aNz2nFvtnlLoPYnOva5trv29d7cJxdK8Bq1bSBiMiBbbpwIfpltj+nmtJLe5/VARku 5ZfoPCxgmjreshAgUoCpZejh3Qr36+g8RBgQp6zV6cJzGwoWPo14wod1cizWjdwCG/I9 fi81CQQcxcYdsZQvbf10PzWnIDdFLHpSfF7CuhpcitWMPj4mWQwXLCbvEiSwzNT9zMCB ghUCiJnpagw4RF8j+EphTQs8OG2ILPcwudrFCB7TSWoIO+HzgRqLDaZKNTYBUnxbwdAc HRKBAeq9W8cdDhy2+aw0sYr9oHxnbY6fnaKi/GIUc5ZjMfw/K+wLra4Wdw9PvZx3kF5z kB6Q== 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=jxSlVaBmXz/dVNo8icv8AU6oobDK34V/whJUepgdojM=; b=zEeEvk0X163REW9WEThdxKV72r2Nsk7nY0lX7ydEBwRdvslTOxStFTcRCMXplMCcNM KoTkFb2cKpujGd2Ingfir6VGWctwsSp8bcIw5AimKAyQSosP8dJQ409xtxyTNOpUT1cU Rf0p2EwWstvX3zv/en25Kc/lEZy+PLY2QlMX9aWW8/gvwrN4BMDbjm3JEgj2By1kypaX hZgUjPPuBP2b+Of2w4AFU2ZTHLMojoIkCgRxjnq1OH1PK8A2ZCAEZNTi/A3ZfMbowm4o cyoU0eQ35xtIYNUTrZVzSImTVlam/9IAjj0HV+rmgwZjXdWYmqki81QUf6V9VJPmJIt1 opfg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=aW03886M; 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 j7-20020a056a00174700b004e0314afb5bsi5880185pfc.179.2022.02.26.12.22.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 26 Feb 2022 12:22:52 -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=aW03886M; 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 978152C2B2C; Sat, 26 Feb 2022 12:14:10 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229483AbiBZUOg (ORCPT + 99 others); Sat, 26 Feb 2022 15:14:36 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56668 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229436AbiBZUOf (ORCPT ); Sat, 26 Feb 2022 15:14:35 -0500 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 496BF55BC6; Sat, 26 Feb 2022 12:14:00 -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=jxSlVaBmXz/dVNo8icv8AU6oobDK34V/whJUepgdojM=; b=aW03886MhAt0oh4a2AME0c7m5U QWT37fnD7HG/48pZXDm6TSh+J/O2AFiZxqmsNgHN+GUYLsNwmIq1iAsshrpdcP/On6qXjX2SwjVYn CYYr5dFJzsH5onQ7aV9YzCgOoKx/rKqSQTeHiHVPjInbSkBUjuAIP1DBD7VvITIAYkty7UckNCKpn 8pqy+DQ1rIi6w7Dka+0C8tgEDq8G33N9oRcAUjuf7+s+BH/b0otja3bWgII5qrGAlxtRf1JfHzcyk 7hkRlsl660Q/7RqS6rZpyfiYZMGofaIB7oSTWWYfTCNU68t1Pw1DG2Pohr/PMrNc8/R7W+NhP464p V0Zqq9SQ==; Received: from mcgrof by bombadil.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1nO3Rj-008Tvl-BV; Sat, 26 Feb 2022 20:13:39 +0000 Date: Sat, 26 Feb 2022 12:13:39 -0800 From: Luis Chamberlain To: Meng Tang Cc: keescook@chromium.org, yzaikin@google.com, guoren@kernel.org, nickhu@andestech.com, green.hu@gmail.com, deanbo422@gmail.com, ebiggers@kernel.org, tytso@mit.edu, wad@chromium.org, john.johansen@canonical.com, jmorris@namei.org, serge@hallyn.com, linux-csky@vger.kernel.org, linux-fscrypt@vger.kernel.org, linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org Subject: Re: [PATCH v3 2/2] fs/proc: Optimize arrays defined by struct ctl_path Message-ID: References: <20220224133217.1755-1-tangmeng@uniontech.com> <20220224133217.1755-2-tangmeng@uniontech.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220224133217.1755-2-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 Thu, Feb 24, 2022 at 09:32:17PM +0800, Meng Tang wrote: > Previously, arrays defined by struct ctl_path is terminated > with an empty one. When we actually only register one ctl_path, > we've gone from 8 bytes to 16 bytes. > > The optimization has been implemented in the previous patch, > here to remove unnecessary terminate ctl_path with an empty one. > > Signed-off-by: Meng Tang If these things are built-in, can you verify you're saving bytes with size before and after the patch? I wonder if having something like DECLARE_SYSCTL_PATH_ONE() would make this nicer on the eyes, and also useful for the other changes you are making. Do you have many other single path entries you are changing later? Luis