From: Nick Piggin <nickpiggin@yahoo.com.au>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
Andrew Morton <akpm@osdl.org>, Linus Torvalds <torvalds@osdl.org>,
Ingo Molnar <mingo@elte.hu>, Thomas Gleixner <tglx@linutronix.de>,
Andi Kleen <ak@suse.de>,
Martin Mares <mj@atrey.karlin.mff.cuni.cz>,
bjornw@axis.com, schwidefsky@de.ibm.com,
benedict.gaster@superh.com, lethal@linux-sh.org,
Chris Zankel <chris@zankel.net>,
Marc Gauthier <marc@tensilica.com>,
Joe Taylor <joe@tensilica.com>,
David Mosberger-Tang <davidm@hpl.hp.com>,
rth@twiddle.net, spyro@f2s.com, starvik@axis.com,
tony.luck@intel.com, linux-ia64@vger.kernel.org,
ralf@linux-mips.org, linux-mips@linux-mips.org,
grundler@parisc-linux.org, parisc-linux@parisc-linux.org,
linuxppc-dev@ozlabs.org, paulus@samba.org, linux390@de.ibm.com,
davem@davemloft.net
Subject: Re: [PATCH 00/05] robust per_cpu allocation for modules
Date: Sun, 16 Apr 2006 07:06:14 +0000 [thread overview]
Message-ID: <4441ECE6.5010709@yahoo.com.au> (raw)
In-Reply-To: <Pine.LNX.4.58.0604152323560.16853@gandalf.stny.rr.com>
Steven Rostedt wrote:
> On Sun, 16 Apr 2006, Nick Piggin wrote:
>>Why is your module using so much per-cpu memory, anyway?
>
>
> Wasn't my module anyway. The problem appeared in the -rt patch set, when
> tracing was turned on. Some module was affected, and grew it's per_cpu
> size by quite a bit. In fact we had to increase PERCPU_ENOUGH_ROOM by up
> to something like 300K.
Well that's easy then, just configure PERCPU_ENOUGH_ROOM to be larger
when tracing is on in the -rt patchset? Or use alloc_percpu for the
tracing data?
>>I don't think it would have been hard for the original author to make
>>it robust... just not both fast and robust. PERCPU_ENOUGH_ROOM seems
>>like an ugly hack at first glance, but I'm fairly sure it was a result
>>of design choices.
>
> Yeah, and I discovered the reasons for those choices as I worked on this.
> I've put a little more thought into this and still think there's a
> solution to not slow things down.
>
> Since the per_cpu_offset section is still smaller than the
> PERCPU_ENOUGH_ROOM and robust, I could still copy it into a per cpu memory
> field, and even add the __per_cpu_offset to it. This would still save
> quite a bit of space.
Well I don't think making it per-cpu would help much (presumably it
is not going to be written to very frequently) -- I guess it would
be a small advantage on NUMA. The main problem is the extra load in
the fastpath.
You can't start the next load until the results of the first come
back.
> So now I'm asking for advice on some ideas that can be a work around to
> keep the robustness and speed.
>
> Is there a way (for archs that support it) to allocate memory in a per cpu
> manner. So each CPU would have its own variable table in the memory that
> is best of it. Then have a field (like the pda in x86_64) to point to
> this section, and use the linker offsets to index and find the per_cpu
> variables.
>
> So this solution still has one more redirection than the current solution
> (per_cpu_offset__##var -> __per_cpu_offset -> actual_var where as the
> current solution is __per_cpu_offset -> actual_var), but all the loads
> would be done from memory that would only be specified for a particular
> CPU.
>
> The generic case would still be the same as the patches I already sent,
> but the archs that can support it, can have something like the above.
>
> Would something like that be acceptible?
I still don't understand what the justification is for slowing down
this critical bit of infrastructure for something that is only a
problem in the -rt patchset, and even then only a problem when tracing
is enabled.
--
SUSE Labs, Novell Inc.
Send instant messages to your online friends http://au.messenger.yahoo.com
WARNING: multiple messages have this Message-ID (diff)
From: Nick Piggin <nickpiggin@yahoo.com.au>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Andrew Morton <akpm@osdl.org>,
linux-mips@linux-mips.org,
David Mosberger-Tang <davidm@hpl.hp.com>,
linux-ia64@vger.kernel.org,
Martin Mares <mj@atrey.karlin.mff.cuni.cz>,
spyro@f2s.com, Joe Taylor <joe@tensilica.com>,
Andi Kleen <ak@suse.de>,
linuxppc-dev@ozlabs.org, paulus@samba.org,
benedict.gaster@superh.com, bjornw@axis.com,
Ingo Molnar <mingo@elte.hu>,
grundler@parisc-linux.org, starvik@axis.com,
Linus Torvalds <torvalds@osdl.org>,
Thomas Gleixner <tglx@linutronix.de>,
rth@twiddle.net, Chris Zankel <chris@zankel.net>,
tony.luck@intel.com, LKML <linux-kernel@vger.kernel.org>,
ralf@linux-mips.org, Marc Gauthier <marc@tensilica.com>,
lethal@linux-sh.org, schwidefsky@de.ibm.com, linux390@de.ibm.com,
davem@davemloft.net, parisc-linux@parisc-linux.org
Subject: Re: [PATCH 00/05] robust per_cpu allocation for modules
Date: Sun, 16 Apr 2006 17:06:14 +1000 [thread overview]
Message-ID: <4441ECE6.5010709@yahoo.com.au> (raw)
In-Reply-To: <Pine.LNX.4.58.0604152323560.16853@gandalf.stny.rr.com>
Steven Rostedt wrote:
> On Sun, 16 Apr 2006, Nick Piggin wrote:
>>Why is your module using so much per-cpu memory, anyway?
>
>
> Wasn't my module anyway. The problem appeared in the -rt patch set, when
> tracing was turned on. Some module was affected, and grew it's per_cpu
> size by quite a bit. In fact we had to increase PERCPU_ENOUGH_ROOM by up
> to something like 300K.
Well that's easy then, just configure PERCPU_ENOUGH_ROOM to be larger
when tracing is on in the -rt patchset? Or use alloc_percpu for the
tracing data?
>>I don't think it would have been hard for the original author to make
>>it robust... just not both fast and robust. PERCPU_ENOUGH_ROOM seems
>>like an ugly hack at first glance, but I'm fairly sure it was a result
>>of design choices.
>
> Yeah, and I discovered the reasons for those choices as I worked on this.
> I've put a little more thought into this and still think there's a
> solution to not slow things down.
>
> Since the per_cpu_offset section is still smaller than the
> PERCPU_ENOUGH_ROOM and robust, I could still copy it into a per cpu memory
> field, and even add the __per_cpu_offset to it. This would still save
> quite a bit of space.
Well I don't think making it per-cpu would help much (presumably it
is not going to be written to very frequently) -- I guess it would
be a small advantage on NUMA. The main problem is the extra load in
the fastpath.
You can't start the next load until the results of the first come
back.
> So now I'm asking for advice on some ideas that can be a work around to
> keep the robustness and speed.
>
> Is there a way (for archs that support it) to allocate memory in a per cpu
> manner. So each CPU would have its own variable table in the memory that
> is best of it. Then have a field (like the pda in x86_64) to point to
> this section, and use the linker offsets to index and find the per_cpu
> variables.
>
> So this solution still has one more redirection than the current solution
> (per_cpu_offset__##var -> __per_cpu_offset -> actual_var where as the
> current solution is __per_cpu_offset -> actual_var), but all the loads
> would be done from memory that would only be specified for a particular
> CPU.
>
> The generic case would still be the same as the patches I already sent,
> but the archs that can support it, can have something like the above.
>
> Would something like that be acceptible?
I still don't understand what the justification is for slowing down
this critical bit of infrastructure for something that is only a
problem in the -rt patchset, and even then only a problem when tracing
is enabled.
--
SUSE Labs, Novell Inc.
Send instant messages to your online friends http://au.messenger.yahoo.com
WARNING: multiple messages have this Message-ID (diff)
From: Nick Piggin <nickpiggin@yahoo.com.au>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
Andrew Morton <akpm@osdl.org>, Linus Torvalds <torvalds@osdl.org>,
Ingo Molnar <mingo@elte.hu>, Thomas Gleixner <tglx@linutronix.de>,
Andi Kleen <ak@suse.de>,
Martin Mares <mj@atrey.karlin.mff.cuni.cz>,
bjornw@axis.com, schwidefsky@de.ibm.com,
benedict.gaster@superh.com, lethal@linux-sh.org,
Chris Zankel <chris@zankel.net>,
Marc Gauthier <marc@tensilica.com>,
Joe Taylor <joe@tensilica.com>,
David Mosberger-Tang <davidm@hpl.hp.com>,
rth@twiddle.net, spyro@f2s.com, starvik@axis.com,
tony.luck@intel.com, linux-ia64@vger.kernel.org,
ralf@linux-mips.org, linux-mips@linux-mips.org,
grundler@parisc-linux.org, parisc-linux@parisc-linux.org,
linuxppc-dev@ozlabs.org, paulus@samba.org, linux390@de.ibm.com,
davem@davemloft.net
Subject: Re: [PATCH 00/05] robust per_cpu allocation for modules
Date: Sun, 16 Apr 2006 17:06:14 +1000 [thread overview]
Message-ID: <4441ECE6.5010709@yahoo.com.au> (raw)
In-Reply-To: <Pine.LNX.4.58.0604152323560.16853@gandalf.stny.rr.com>
Steven Rostedt wrote:
> On Sun, 16 Apr 2006, Nick Piggin wrote:
>>Why is your module using so much per-cpu memory, anyway?
>
>
> Wasn't my module anyway. The problem appeared in the -rt patch set, when
> tracing was turned on. Some module was affected, and grew it's per_cpu
> size by quite a bit. In fact we had to increase PERCPU_ENOUGH_ROOM by up
> to something like 300K.
Well that's easy then, just configure PERCPU_ENOUGH_ROOM to be larger
when tracing is on in the -rt patchset? Or use alloc_percpu for the
tracing data?
>>I don't think it would have been hard for the original author to make
>>it robust... just not both fast and robust. PERCPU_ENOUGH_ROOM seems
>>like an ugly hack at first glance, but I'm fairly sure it was a result
>>of design choices.
>
> Yeah, and I discovered the reasons for those choices as I worked on this.
> I've put a little more thought into this and still think there's a
> solution to not slow things down.
>
> Since the per_cpu_offset section is still smaller than the
> PERCPU_ENOUGH_ROOM and robust, I could still copy it into a per cpu memory
> field, and even add the __per_cpu_offset to it. This would still save
> quite a bit of space.
Well I don't think making it per-cpu would help much (presumably it
is not going to be written to very frequently) -- I guess it would
be a small advantage on NUMA. The main problem is the extra load in
the fastpath.
You can't start the next load until the results of the first come
back.
> So now I'm asking for advice on some ideas that can be a work around to
> keep the robustness and speed.
>
> Is there a way (for archs that support it) to allocate memory in a per cpu
> manner. So each CPU would have its own variable table in the memory that
> is best of it. Then have a field (like the pda in x86_64) to point to
> this section, and use the linker offsets to index and find the per_cpu
> variables.
>
> So this solution still has one more redirection than the current solution
> (per_cpu_offset__##var -> __per_cpu_offset -> actual_var where as the
> current solution is __per_cpu_offset -> actual_var), but all the loads
> would be done from memory that would only be specified for a particular
> CPU.
>
> The generic case would still be the same as the patches I already sent,
> but the archs that can support it, can have something like the above.
>
> Would something like that be acceptible?
I still don't understand what the justification is for slowing down
this critical bit of infrastructure for something that is only a
problem in the -rt patchset, and even then only a problem when tracing
is enabled.
--
SUSE Labs, Novell Inc.
Send instant messages to your online friends http://au.messenger.yahoo.com
next prev parent reply other threads:[~2006-04-16 7:06 UTC|newest]
Thread overview: 97+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-04-14 21:18 [PATCH 00/05] robust per_cpu allocation for modules Steven Rostedt
2006-04-14 21:18 ` Steven Rostedt
2006-04-14 21:18 ` Steven Rostedt
2006-04-14 21:18 ` Steven Rostedt
2006-04-14 22:06 ` Andrew Morton
2006-04-14 22:06 ` Andrew Morton
2006-04-14 22:06 ` Andrew Morton
2006-04-14 22:12 ` Steven Rostedt
2006-04-14 22:12 ` Steven Rostedt
2006-04-14 22:12 ` Steven Rostedt
2006-04-14 22:12 ` Chen, Kenneth W
2006-04-14 22:12 ` Chen, Kenneth W
2006-04-14 22:12 ` Chen, Kenneth W
2006-04-14 22:12 ` Chen, Kenneth W
2006-04-14 22:19 ` Steven Rostedt
2006-04-15 3:10 ` [PATCH 00/08] robust per_cpu allocation for modules - V2 Steven Rostedt
2006-04-15 3:10 ` Steven Rostedt
2006-04-15 3:10 ` Steven Rostedt
2006-04-15 5:32 ` [PATCH 00/05] robust per_cpu allocation for modules Nick Piggin
2006-04-15 5:32 ` Nick Piggin
2006-04-15 5:32 ` Nick Piggin
2006-04-15 20:17 ` Steven Rostedt
2006-04-15 20:17 ` Steven Rostedt
2006-04-15 20:17 ` Steven Rostedt
2006-04-16 2:47 ` Nick Piggin
2006-04-16 2:47 ` Nick Piggin
2006-04-16 2:47 ` Nick Piggin
2006-04-16 3:53 ` Steven Rostedt
2006-04-16 3:53 ` Steven Rostedt
2006-04-16 3:53 ` Steven Rostedt
2006-04-16 7:02 ` Paul Mackerras
2006-04-16 7:02 ` Paul Mackerras
2006-04-16 7:02 ` Paul Mackerras
2006-04-16 13:40 ` Steven Rostedt
2006-04-16 13:40 ` Steven Rostedt
2006-04-16 13:40 ` Steven Rostedt
2006-04-16 13:40 ` Steven Rostedt
2006-04-16 14:03 ` Sam Ravnborg
2006-04-16 14:03 ` Sam Ravnborg
2006-04-16 14:03 ` Sam Ravnborg
2006-04-16 15:34 ` Arnd Bergmann
2006-04-16 15:34 ` Arnd Bergmann
2006-04-16 15:34 ` Arnd Bergmann
2006-04-16 18:03 ` Tony Luck
2006-04-16 18:03 ` Tony Luck
2006-04-16 18:03 ` Tony Luck
2006-04-17 0:45 ` Steven Rostedt
2006-04-17 0:45 ` Steven Rostedt
2006-04-17 0:45 ` Steven Rostedt
2006-04-17 2:07 ` Arnd Bergmann
2006-04-17 2:07 ` Arnd Bergmann
2006-04-17 2:07 ` Arnd Bergmann
2006-04-17 2:17 ` Steven Rostedt
2006-04-17 2:17 ` Steven Rostedt
2006-04-17 2:17 ` Steven Rostedt
2006-04-17 20:06 ` Ravikiran G Thirumalai
2006-04-17 20:06 ` Ravikiran G Thirumalai
2006-04-17 20:06 ` Ravikiran G Thirumalai
2006-04-17 6:47 ` Rusty Russell
2006-04-17 6:47 ` Rusty Russell
2006-04-17 6:47 ` Rusty Russell
2006-04-17 11:33 ` Steven Rostedt
2006-04-17 11:33 ` Steven Rostedt
2006-04-17 11:33 ` Steven Rostedt
2006-04-16 7:06 ` Nick Piggin [this message]
2006-04-16 7:06 ` Nick Piggin
2006-04-16 7:06 ` Nick Piggin
2006-04-16 16:06 ` Steven Rostedt
2006-04-16 16:06 ` Steven Rostedt
2006-04-16 16:06 ` Steven Rostedt
2006-04-17 17:10 ` Andi Kleen
2006-04-17 17:10 ` Andi Kleen
2006-04-17 17:10 ` Andi Kleen
2006-04-17 16:55 ` Christoph Lameter
2006-04-17 16:55 ` Christoph Lameter
2006-04-17 16:55 ` Christoph Lameter
2006-04-17 22:02 ` Ravikiran G Thirumalai
2006-04-17 22:02 ` Ravikiran G Thirumalai
2006-04-17 22:02 ` Ravikiran G Thirumalai
2006-04-17 23:44 ` Steven Rostedt
2006-04-17 23:44 ` Steven Rostedt
2006-04-17 23:44 ` Steven Rostedt
2006-04-17 23:48 ` Christoph Lameter
2006-04-17 23:48 ` Christoph Lameter
2006-04-17 23:48 ` Christoph Lameter
2006-04-18 1:51 ` Steven Rostedt
2006-04-18 1:51 ` Steven Rostedt
2006-04-18 1:51 ` Steven Rostedt
2006-04-18 6:42 ` Nick Piggin
2006-04-18 6:42 ` Nick Piggin
2006-04-18 6:42 ` Nick Piggin
2006-04-18 12:47 ` Steven Rostedt
2006-04-18 12:47 ` Steven Rostedt
2006-04-18 12:47 ` Steven Rostedt
2006-04-16 6:35 ` Paul Mackerras
2006-04-16 6:35 ` Paul Mackerras
2006-04-16 6:35 ` Paul Mackerras
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=4441ECE6.5010709@yahoo.com.au \
--to=nickpiggin@yahoo.com.au \
--cc=ak@suse.de \
--cc=akpm@osdl.org \
--cc=benedict.gaster@superh.com \
--cc=bjornw@axis.com \
--cc=chris@zankel.net \
--cc=davem@davemloft.net \
--cc=davidm@hpl.hp.com \
--cc=grundler@parisc-linux.org \
--cc=joe@tensilica.com \
--cc=lethal@linux-sh.org \
--cc=linux-ia64@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@linux-mips.org \
--cc=linux390@de.ibm.com \
--cc=linuxppc-dev@ozlabs.org \
--cc=marc@tensilica.com \
--cc=mingo@elte.hu \
--cc=mj@atrey.karlin.mff.cuni.cz \
--cc=parisc-linux@parisc-linux.org \
--cc=paulus@samba.org \
--cc=ralf@linux-mips.org \
--cc=rostedt@goodmis.org \
--cc=rth@twiddle.net \
--cc=schwidefsky@de.ibm.com \
--cc=spyro@f2s.com \
--cc=starvik@axis.com \
--cc=tglx@linutronix.de \
--cc=tony.luck@intel.com \
--cc=torvalds@osdl.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.