From: Ingo Molnar <mingo@elte.hu>
To: Lai Jiangshan <laijs@cn.fujitsu.com>
Cc: Steven Rostedt <srostedt@redhat.com>,
Frederic Weisbecker <fweisbec@gmail.com>,
LKML <linux-kernel@vger.kernel.org>,
Steven Rostedt <rostedt@goodmis.org>
Subject: Re: [PATCH] ring_buffer: enlarge RB_MAX_SMALL_DATA
Date: Wed, 15 Apr 2009 12:32:10 +0200 [thread overview]
Message-ID: <20090415103210.GG6669@elte.hu> (raw)
In-Reply-To: <49E5A593.6090605@cn.fujitsu.com>
* Lai Jiangshan <laijs@cn.fujitsu.com> wrote:
> Steven Rostedt wrote:
> > On Mon, 2009-04-13 at 11:00 +0800, Lai Jiangshan wrote:
> >> When I am writing userspace tools for ftrace, I found
> >> RB_MAX_SMALL_DATA is too small, some events waste an 'u32'
> >> to save the actually length.
> >
> > Although I like the idea, I want to look at something else.
> >
> > 2^27 is: 134,217,728
> > 2^26 is: 67,108,864
> >
> > That is the count in nanoseconds. Thus we go from 134 millisecs to 67
> > millisecs before we must add an extended counter.
> >
> > I guess that is not an issue, since 67ms is still quite big. For sparse
> > tracing, it could add more extended counters where none were needed. But
> > this I doubt this is an issue.
>
> 67ms < 0.1sec, It sounds not very good.
>
> >
> >> This fix will break previous userspace tools,
> >> so complaints are also welcome.
> >
> > Unfortunately, this changes the API to userspace. For those parsers that
> > do this in binary. I think the answer is, before we add this, we export
> > the format of the ring buffer headers just like we do for other formats.
> > This way, a user tool can default to the old way if the format file does
> > not exist, and can know the current format with the file.
> >
> > I'll work on adding that format file sometime this week.
> >
>
> I think ftrace is still in develop-circle, changing its API to
> userspace is sometimes OK. Will you agreed this fix after you add
> that format file? It saves about 0%-12%(depends on tracer) memory.
Yes, /debug APIs can be changed indeed.
And compressing tracer memory consumption is a high priority design
target: lower memory consumption doesnt just mean less RAM footprint
and less disk footprint, it also means less CPU cache footprint,
less intrusive tracing, faster tracing, etc. etc.
So compression is a very important goal - and we only want to stop
doing it when the direct CPU overhead or the compression complexity
it introduces offsets the size win. In this particular case we are
still far from that cutoff point IMHO.
Ingo
next prev parent reply other threads:[~2009-04-15 10:32 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-13 3:00 [PATCH] ring_buffer: enlarge RB_MAX_SMALL_DATA Lai Jiangshan
2009-04-13 14:43 ` Steven Rostedt
2009-04-15 9:14 ` Lai Jiangshan
2009-04-15 10:32 ` Ingo Molnar [this message]
2009-04-15 13:45 ` Steven Rostedt
2009-04-15 14:12 ` Ingo Molnar
2009-04-15 14:23 ` Steven Rostedt
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=20090415103210.GG6669@elte.hu \
--to=mingo@elte.hu \
--cc=fweisbec@gmail.com \
--cc=laijs@cn.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rostedt@goodmis.org \
--cc=srostedt@redhat.com \
/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