From: Song Liu <song@kernel.org>
To: Christoph Hellwig <hch@lst.de>
Cc: Thomas Gleixner <tglx@linutronix.de>,
Luis Chamberlain <mcgrof@kernel.org>,
Christophe Leroy <christophe.leroy@csgroup.eu>,
songliubraving@fb.com, Peter Zijlstra <peterz@infradead.org>,
linux-modules@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH/RFC] module: replace module_layout with module_memory
Date: Thu, 19 Jan 2023 00:29:36 -0800 [thread overview]
Message-ID: <CAPhsuW5WFEHfGrSW5nYRRohmLMAfWoZiOCBgCdgzOCmn+Q_vVA@mail.gmail.com> (raw)
In-Reply-To: <20230119053545.GA16775@lst.de>
On Wed, Jan 18, 2023 at 9:35 PM Christoph Hellwig <hch@lst.de> wrote:
>
> On Wed, Jan 18, 2023 at 01:52:51PM -0800, Song Liu wrote:
> > In this way we can use the array in the for loops, and use mod->core_text,
> > etc. when we only need to access one of them.
>
> Just use the array please instead of making it too ugly. If that
> is the only sensible way to iterate we have a good argument for the
> array and can live with it.
Hmm.. I think it won't be ugly outside of the struct definition...
Alternatively, how about use something like
#define core_text mod_mem[MOD_MEM_TYPE_TEXT]
...
which is similar to
struct sock {
/*
* Now struct inet_timewait_sock also uses sock_common, so please just
* don't add nothing before this first member (__sk_common) --acme
*/
struct sock_common __sk_common;
#define sk_node __sk_common.skc_node
#define sk_nulls_node __sk_common.skc_nulls_node
...
};
?
Thanks,
Song
next prev parent reply other threads:[~2023-01-20 4:29 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-06 22:09 [PATCH/RFC] module: replace module_layout with module_memory Song Liu
2023-01-09 18:03 ` Christophe Leroy
2023-01-09 18:24 ` Song Liu
2023-01-09 20:51 ` Song Liu
2023-01-10 6:31 ` Christophe Leroy
2023-01-10 6:51 ` Song Liu
2023-01-18 15:07 ` Peter Zijlstra
2023-01-18 17:52 ` Song Liu
2023-01-10 18:31 ` Song Liu
2023-01-17 18:50 ` Song Liu
2023-01-18 7:40 ` Christoph Hellwig
2023-01-18 17:37 ` Song Liu
2023-01-18 21:52 ` Song Liu
2023-01-19 5:35 ` Christoph Hellwig
2023-01-19 8:29 ` Song Liu [this message]
2023-01-20 17:42 ` Song Liu
2023-01-23 6:57 ` Christoph Hellwig
2023-01-24 18:01 ` Song Liu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAPhsuW5WFEHfGrSW5nYRRohmLMAfWoZiOCBgCdgzOCmn+Q_vVA@mail.gmail.com \
--to=song@kernel.org \
--cc=christophe.leroy@csgroup.eu \
--cc=hch@lst.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-modules@vger.kernel.org \
--cc=mcgrof@kernel.org \
--cc=peterz@infradead.org \
--cc=songliubraving@fb.com \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).