Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp6079895rwb; Wed, 18 Jan 2023 00:28:30 -0800 (PST) X-Google-Smtp-Source: AMrXdXsTkoG9JiO4J5VvhuFndifw6zCcfnajMgIw2C/5rVYHJ0bPGXOfTmBoBrlf39N1Ka/2u+T8 X-Received: by 2002:a17:903:41d2:b0:189:ba1f:b178 with SMTP id u18-20020a17090341d200b00189ba1fb178mr8610155ple.9.1674030510712; Wed, 18 Jan 2023 00:28:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674030510; cv=none; d=google.com; s=arc-20160816; b=XK6i9h8Inum3bh5tx6rFeeYAB+g/9eZs1nwVuctHq85JneFxKHHjLrtUriv1V445lk EkZfhgddDHg0opqmbndd7Jv/+GIDprw2xCgJUjU3mkHXLmV8CW8QnR2n8leLMaz7tM1i jYjVyePcULLThhxA1mARpGU36n6VH1oPrkcGWAZ2xsYLfEK/BwIZGN5eGXp3M9gCOlq0 9OqEdyQkSenatgcz8+wqrcAKdZ0ahGuBOu825vmNCXYKTUNq8wbDPHrWEGcOe79PRRzI 3FIYxlpw48+G0inU92mCVD/++J4kHdwNHraE2iLmfKaTTUBYWDkcj807lfktXwktlZdM 2WxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=in+hjyz/62LpCI0EngC982D7QXLDOm5/lRLm0n/StJU=; b=DeHZHHsGJoH6nOA4lRosdvqmaqiIL1DjGtcuP75Vr88MxMdgSaxp+Kz3Nsupv0MFF9 wVhz3edCegWuelQWGODUnwc78wAfdM+gEJxx7O57tAlCqPdHpx/arf2wDATLCWiLolwI eGstUl5PzA8rWs/+xduAqYWpRin645RaAQccn6vumXW0fmt5DZdS10IOU5tKCWbX7SYW Hx9AMbAAj/YJlHtP+fCPy4yRJCAvUwFsEo/mRi3stkpnH6Y8aWzhH9HRrERbinLZrPaI BuyTDpXFoKK+7PEbQ62YjlN8WzBiW3wSHMYHNWktRZsEtwa0i/Nqi8N1oZKKRWKDngDu SeDA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q1-20020a170902dac100b00194635a92fdsi20125453plx.525.2023.01.18.00.28.24; Wed, 18 Jan 2023 00:28:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229790AbjARILe (ORCPT + 46 others); Wed, 18 Jan 2023 03:11:34 -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) X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_NONE autolearn=ham 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 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.