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 236D1C433F5 for ; Tue, 7 Dec 2021 15:45:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239040AbhLGPsl (ORCPT ); Tue, 7 Dec 2021 10:48:41 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35058 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233893AbhLGPsj (ORCPT ); Tue, 7 Dec 2021 10:48:39 -0500 Received: from sin.source.kernel.org (sin.source.kernel.org [IPv6:2604:1380:40e1:4800::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 68522C061574; Tue, 7 Dec 2021 07:45:08 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sin.source.kernel.org (Postfix) with ESMTPS id B52CBCE19FA; Tue, 7 Dec 2021 15:45:06 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E7173C341D1; Tue, 7 Dec 2021 15:45:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1638891904; bh=g79tkc/a+Li5BdZaeuK+ZFDVc5mc9Hy5yd/urszLIjY=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=b/o07wXvn9scK9L/0XbEe3ESpzVniuQqpX7m2hqBrhK9LrG6UyTvvaOs5qYetNj3G blxSRKe8CxJc9RkEfPjYIkAc10oXVzQQmDCo0zA7LQTYcKosbQ7+ZScZp66vADvuVx nn0cse+bXmpP3CS76l/UidEmb4OwIa9y/rZtqU0d0QnQmixMYf1XFNiuQnocCbMjsB uZKEjRZ1OzUMaRG+JY3y5XYXmq1vAaMUUznIyJham4OsQc5SMOgoZNTwxsBrkNMhqf GWhM6MQ/JOFsS8Bh0TRoZ6QP3tkjQsYogxhC8MI14s8j1kK9VfGI5uI1pAO362v7EJ UVWR5G0E7izCA== Received: by mail-wr1-f47.google.com with SMTP id d24so30538049wra.0; Tue, 07 Dec 2021 07:45:04 -0800 (PST) X-Gm-Message-State: AOAM530KzmAN8bEAUUlBH7cXWz3F2IVWCeBqGTzfihXu6VXuMGklibkd eIgFAPMyVNMlXSMe0PTAMkJAywZ9fV5h2zVC9Bo= X-Google-Smtp-Source: ABdhPJwSjluaVW946SNUj9vmslHGrDrlZH11Hx32c+bZFjNzQOKfgQhzJkCPBop9NKH1wyvBiaVtudSZnKvhS0MQeEw= X-Received: by 2002:a5d:64ea:: with SMTP id g10mr52657201wri.137.1638891903239; Tue, 07 Dec 2021 07:45:03 -0800 (PST) MIME-Version: 1.0 References: <20211207150927.3042197-1-arnd@kernel.org> <20211207150927.3042197-2-arnd@kernel.org> In-Reply-To: From: Arnd Bergmann Date: Tue, 7 Dec 2021 16:44:47 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [RFC 1/3] headers: add more types to linux/types.h To: Matthew Wilcox Cc: Linux Kernel Mailing List , Arnd Bergmann , Al Viro , Andrew Morton , Guenter Roeck , Kees Cook , Linus Torvalds , Masahiro Yamada , Nathan Chancellor , Nick Desaulniers , Stephen Rothwell , kernel test robot , Ingo Molnar , Peter Zijlstra , Will Deacon , Waiman Long , Boqun Feng , Thomas Gleixner , Tejun Heo , kernelci@groups.io, Linux FS-devel Mailing List , Linux Kbuild mailing list , llvm@lists.linux.dev Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Dec 7, 2021 at 4:21 PM Matthew Wilcox wrote: > > On Tue, Dec 07, 2021 at 04:09:25PM +0100, Arnd Bergmann wrote: > > +struct list_lru { > > + struct list_lru_node *node; > > +#ifdef CONFIG_MEMCG_KMEM > > + struct list_head list; > > + int shrinker_id; > > + bool memcg_aware; > > +#endif > > +}; > > This is the only one that gives me qualms. While there are other > CONFIG options mentioned in types.h they're properties of the platform, > eg CONFIG_HAVE_UID16, CONFIG_64BIT, CONFIG_ARCH_DMA_ADDR_T_64BIT, etc. > I dislike it that changing this CONFIG option is going to result in > rebuilding the _entire_ kernel. CONFIG_MEMCG_KMEM just isn't that > central to how everything works. I included this one because 'struct list_lru' is used in 'struct super_block', which I move into 'linux/fs_types.h' in the third patch. It is otherwise not used a lot though, and 'struct super_block' is rarely much outside of file system code. If we leave super_block in fs.h or in a separate header, it should be fine. Arnd