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 BBDC1C004D4 for ; Wed, 18 Jan 2023 08:11:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230017AbjARIL0 (ORCPT ); Wed, 18 Jan 2023 03:11:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36144 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230094AbjARIKQ (ORCPT ); Wed, 18 Jan 2023 03:10:16 -0500 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0B07667944; Tue, 17 Jan 2023 23:40:52 -0800 (PST) Received: by verein.lst.de (Postfix, from userid 2407) id 9A32A68D13; Wed, 18 Jan 2023 08:40:47 +0100 (CET) Date: Wed, 18 Jan 2023 08:40:47 +0100 From: Christoph Hellwig To: Song Liu Cc: Thomas Gleixner , Luis Chamberlain , Christophe Leroy , songliubraving@fb.com, Peter Zijlstra , Christoph Hellwig , linux-modules@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH/RFC] module: replace module_layout with module_memory Message-ID: <20230118074047.GA27385@lst.de> References: <20230106220959.3398792-1-song@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2007-11-01) Precedence: bulk List-ID: On Tue, Jan 17, 2023 at 10:50:55AM -0800, Song Liu wrote: > Hi Thomas and Luis, > > Could you please share your comments on this? Specifically, is this on > the right direction? And, what's your preference with Christophe's > suggestions? > > "I dislike how it looks with enums, things like > mod->mod_mem[MOD_MEM_TYPE_INIT > _TEXT] are odd and don't read nicely. > Could we have something nicer like mod->mod_mem_init_text ? > I know it will complicate your for_each_mod_mem_type() but it would look > nicer." FYI, I don't particularly like the array either. But if it makes the code much simpler I can live with it.