From: Peter Zijlstra <peterz@infradead.org>
To: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: Andi Kleen <ak@linux.intel.com>, Andi Kleen <andi@firstfloor.org>,
x86@kernel.org, linux-kernel@vger.kernel.org, oleg@redhat.com,
paulmck@linux.vnet.ibm.com, rusty@rustcorp.com.au,
mingo@kernel.org
Subject: Re: [RFC][PATCH] module: Optimize __module_address() using a latched RB-tree
Date: Thu, 26 Feb 2015 18:16:26 +0100 [thread overview]
Message-ID: <20150226171626.GW21418@twins.programming.kicks-ass.net> (raw)
In-Reply-To: <2065867235.184322.1424969735591.JavaMail.zimbra@efficios.com>
On Thu, Feb 26, 2015 at 04:55:35PM +0000, Mathieu Desnoyers wrote:
> > Dunno, it seemed like a good a place as any.
>
> My personal coding-style is to put all definitions
> at the top of C files, but I don't know if it's within
> the kernel coding style guide lines or just something
> I'm personally used to. I have no strong opinion here.
So I had all the data structure definition in the C file as well to keep
them private, and then you get into the situation where you can't put it
at the top anyhow.
I further wanted to keep the entire mod_tree stuff together so it can be
easily read. I suppose I can move it to the top of that section, but the
reason I had it there is that it didn't need to exist before that.
> > @@ -269,8 +275,15 @@ struct module {
> > /* Startup function. */
> > int (*init)(void);
> >
> > + /*
> > + * If this is non-NULL, vfree after init() returns
> > + *
> > + * cacheline align here, such that:
> > + * module_init, module_core, init_size, core_size and
> > + * tree_node[0]
> > + * are on the same cacheline.
>
> Fat-fingered newline ? ;)
I made it:
/*
* If this is non-NULL, vfree after init() returns.
*
* Cacheline align here, such that:
* module_init, module_core, init_size, core_size,
* init_text_size, core_text_size and tree_node[0]
* are on the same cacheline.
*/
To be consistent with the other comment.
> > + */
> > + void *module_init ____cacheline_aligned;
> >
> > /* Here is the actual code + data, vfree'd on unload. */
> > void *module_core;
> > @@ -281,6 +294,8 @@ struct module {
> > /* The size of the executable code in each section. */
> > unsigned int init_text_size, core_text_size;
> >
> > + struct module_node tree_node[4];
>
> 4 -> nr_module_addr_latch
Yeah, I dunno, that means moving that enum to the header file, I kinda
liked having it all together in the C file.
What Rusty want though.
next prev parent reply other threads:[~2015-02-26 17:16 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-21 1:38 [PATCH 1/3] x86: Move msr accesses out of line Andi Kleen
2015-02-21 1:38 ` [PATCH 2/3] x86: Add trace point for MSR accesses Andi Kleen
2015-02-21 1:38 ` [PATCH 3/3] perf, x86: Remove old MSR perf tracing code Andi Kleen
2015-02-23 17:04 ` [PATCH 1/3] x86: Move msr accesses out of line Peter Zijlstra
2015-02-23 17:43 ` Andi Kleen
2015-02-25 12:27 ` Peter Zijlstra
2015-02-25 18:20 ` Andi Kleen
2015-02-25 18:34 ` Borislav Petkov
2015-02-26 11:43 ` [RFC][PATCH] module: Optimize __module_address() using a latched RB-tree Peter Zijlstra
2015-02-26 12:00 ` Ingo Molnar
2015-02-26 14:12 ` Peter Zijlstra
2015-02-27 11:51 ` Rusty Russell
2015-02-26 16:02 ` Mathieu Desnoyers
2015-02-26 16:43 ` Peter Zijlstra
2015-02-26 16:55 ` Mathieu Desnoyers
2015-02-26 17:16 ` Peter Zijlstra [this message]
2015-02-26 17:22 ` Peter Zijlstra
2015-02-26 18:28 ` Paul E. McKenney
2015-02-26 19:06 ` Mathieu Desnoyers
2015-02-26 19:13 ` Peter Zijlstra
2015-02-26 19:41 ` Paul E. McKenney
2015-02-26 19:45 ` Peter Zijlstra
2015-02-26 22:32 ` Peter Zijlstra
2015-02-26 20:52 ` Andi Kleen
2015-02-26 22:36 ` Peter Zijlstra
2015-02-27 10:01 ` Peter Zijlstra
2015-02-28 23:30 ` Paul E. McKenney
2015-02-28 16:41 ` Peter Zijlstra
2015-02-28 16:56 ` Peter Zijlstra
2015-02-28 23:32 ` Paul E. McKenney
2015-03-02 9:24 ` Peter Zijlstra
2015-03-02 16:58 ` Paul E. McKenney
2015-02-27 12:02 ` Rusty Russell
2015-02-27 14:30 ` Peter Zijlstra
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=20150226171626.GW21418@twins.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=ak@linux.intel.com \
--cc=andi@firstfloor.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=mingo@kernel.org \
--cc=oleg@redhat.com \
--cc=paulmck@linux.vnet.ibm.com \
--cc=rusty@rustcorp.com.au \
--cc=x86@kernel.org \
/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
all inboxes | Powered by JetHome®