2009-03-12 02:39:52

by Steven Rostedt

[permalink] [raw]
Subject: [PATCH 0/4] [GIT PULL] memory saving ring buffer for tip/tracing/ftrace

Ingo,

This patch series implements a better memory management by the
ring buffer. It only allocates the buffers for the online CPUS, as well
as keeps the buffers to a minimum size until they are used.

Please pull the latest tip/tracing/ftrace tree, which can be found at:

git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-2.6-trace.git
tip/tracing/ftrace


Steven Rostedt (4):
tracing: keep ring buffer to minimum size till used
tracing: expand the ring buffers when an event is activated
tracing: fix trace_wait to know to wait on all cpus or just one
ring-buffer: only allocate buffers for online cpus

----
kernel/trace/ring_buffer.c | 266 +++++++++++++++++++++++++++++++++++--------
kernel/trace/trace.c | 118 +++++++++++++++----
kernel/trace/trace.h | 3 +
kernel/trace/trace_events.c | 8 ++
4 files changed, 319 insertions(+), 76 deletions(-)

--


2009-03-12 07:08:20

by Pierre Ossman

[permalink] [raw]
Subject: Re: [PATCH 0/4] [GIT PULL] memory saving ring buffer for tip/tracing/ftrace

On Wed, 11 Mar 2009 22:37:20 -0400
Steven Rostedt <[email protected]> wrote:

> Ingo,
>
> This patch series implements a better memory management by the
> ring buffer. It only allocates the buffers for the online CPUS, as well
> as keeps the buffers to a minimum size until they are used.
>
> Please pull the latest tip/tracing/ftrace tree, which can be found at:
>
> git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-2.6-trace.git
> tip/tracing/ftrace
>
>
> Steven Rostedt (4):
> tracing: keep ring buffer to minimum size till used
> tracing: expand the ring buffers when an event is activated
> tracing: fix trace_wait to know to wait on all cpus or just one
> ring-buffer: only allocate buffers for online cpus
>

How difficult is it to apply this to 2.6.27? Fedora is still on that
kernel and it would be nice if I could get my memory back on a
distribution kernel. :)

Rgds
--
-- Pierre Ossman

WARNING: This correspondence is being monitored by the
Swedish government. Make sure your server uses encryption
for SMTP traffic and consider using PGP for end-to-end
encryption.


Attachments:
signature.asc (198.00 B)

2009-03-12 07:35:15

by KOSAKI Motohiro

[permalink] [raw]
Subject: Re: [PATCH 0/4] [GIT PULL] memory saving ring buffer for tip/tracing/ftrace

> How difficult is it to apply this to 2.6.27? Fedora is still on that
> kernel and it would be nice if I could get my memory back on a
> distribution kernel. :)

Difficult.
but you can use "trace_entries=1" kernel boot parameter :)

2009-03-12 09:20:35

by Pierre Ossman

[permalink] [raw]
Subject: Re: [PATCH 0/4] [GIT PULL] memory saving ring buffer for tip/tracing/ftrace

On Thu, 12 Mar 2009 16:34:55 +0900 (JST)
KOSAKI Motohiro <[email protected]> wrote:

> > How difficult is it to apply this to 2.6.27? Fedora is still on that
> > kernel and it would be nice if I could get my memory back on a
> > distribution kernel. :)
>
> Difficult.
> but you can use "trace_entries=1" kernel boot parameter :)
>

Ah. I got a tip for trace_buf_size=1, but that didn't work. Your
version was much better. :)

Rgds
--
-- Pierre Ossman

WARNING: This correspondence is being monitored by the
Swedish government. Make sure your server uses encryption
for SMTP traffic and consider using PGP for end-to-end
encryption.


Attachments:
signature.asc (198.00 B)

2009-03-12 10:49:36

by Neil Horman

[permalink] [raw]
Subject: Re: [PATCH 0/4] [GIT PULL] memory saving ring buffer for tip/tracing/ftrace

On Thu, Mar 12, 2009 at 08:07:58AM +0100, Pierre Ossman wrote:
> On Wed, 11 Mar 2009 22:37:20 -0400
> Steven Rostedt <[email protected]> wrote:
>
> > Ingo,
> >
> > This patch series implements a better memory management by the
> > ring buffer. It only allocates the buffers for the online CPUS, as well
> > as keeps the buffers to a minimum size until they are used.
> >
> > Please pull the latest tip/tracing/ftrace tree, which can be found at:
> >
> > git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-2.6-trace.git
> > tip/tracing/ftrace
> >
> >
> > Steven Rostedt (4):
> > tracing: keep ring buffer to minimum size till used
> > tracing: expand the ring buffers when an event is activated
> > tracing: fix trace_wait to know to wait on all cpus or just one
> > ring-buffer: only allocate buffers for online cpus
> >
>
> How difficult is it to apply this to 2.6.27? Fedora is still on that
> kernel and it would be nice if I could get my memory back on a
> distribution kernel. :)

I'm looking into it currently. I'll post a test kernel when I have something
for you.
Neil

2009-03-12 12:12:28

by Pierre Ossman

[permalink] [raw]
Subject: Re: [PATCH 0/4] [GIT PULL] memory saving ring buffer for tip/tracing/ftrace

On Thu, 12 Mar 2009 06:47:21 -0400
Neil Horman <[email protected]> wrote:

> On Thu, Mar 12, 2009 at 08:07:58AM +0100, Pierre Ossman wrote:
> >
> > How difficult is it to apply this to 2.6.27? Fedora is still on that
> > kernel and it would be nice if I could get my memory back on a
> > distribution kernel. :)
>
> I'm looking into it currently. I'll post a test kernel when I have something
> for you.

F9 kernel if possible, as that's what the test machine is running.

Rgds
--
-- Pierre Ossman

WARNING: This correspondence is being monitored by the
Swedish government. Make sure your server uses encryption
for SMTP traffic and consider using PGP for end-to-end
encryption.


Attachments:
signature.asc (198.00 B)

2009-03-12 13:14:48

by Neil Horman

[permalink] [raw]
Subject: Re: [PATCH 0/4] [GIT PULL] memory saving ring buffer for tip/tracing/ftrace

On Thu, Mar 12, 2009 at 01:12:07PM +0100, Pierre Ossman wrote:
> On Thu, 12 Mar 2009 06:47:21 -0400
> Neil Horman <[email protected]> wrote:
>
> > On Thu, Mar 12, 2009 at 08:07:58AM +0100, Pierre Ossman wrote:
> > >
> > > How difficult is it to apply this to 2.6.27? Fedora is still on that
> > > kernel and it would be nice if I could get my memory back on a
> > > distribution kernel. :)
> >
> > I'm looking into it currently. I'll post a test kernel when I have something
> > for you.
>
> F9 kernel if possible, as that's what the test machine is running.
>
I doubt I'll get an update into F9, given that it will go end of life soon, but
I'll try
Neil

> Rgds
> --
> -- Pierre Ossman
>
> WARNING: This correspondence is being monitored by the
> Swedish government. Make sure your server uses encryption
> for SMTP traffic and consider using PGP for end-to-end
> encryption.

2009-03-12 13:39:34

by Steven Rostedt

[permalink] [raw]
Subject: Re: [PATCH 0/4] [GIT PULL] memory saving ring buffer for tip/tracing/ftrace


On Thu, 12 Mar 2009, Pierre Ossman wrote:

> On Thu, 12 Mar 2009 16:34:55 +0900 (JST)
> KOSAKI Motohiro <[email protected]> wrote:
>
> > > How difficult is it to apply this to 2.6.27? Fedora is still on that
> > > kernel and it would be nice if I could get my memory back on a
> > > distribution kernel. :)
> >
> > Difficult.
> > but you can use "trace_entries=1" kernel boot parameter :)
> >
>
> Ah. I got a tip for trace_buf_size=1, but that didn't work. Your
> version was much better. :)

Yeah, the name changed within the versions.

-- Steve