From: Steven Rostedt <rostedt@goodmis.org>
To: Yoshihiro YUNOMAE <yoshihiro.yunomae.ez@hitachi.com>
Cc: Namhyung Kim <namhyung@kernel.org>,
linux-kernel@vger.kernel.org,
Hidehiro Kawai <hidehiro.kawai.ez@hitachi.com>,
Frederic Weisbecker <fweisbec@gmail.com>,
Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>,
Ingo Molnar <mingo@redhat.com>,
yrl.pp-manager.tt@hitachi.com
Subject: Re: [PATCH V2 1/2] ftrace: Make saved_cmdlines use seq_read
Date: Thu, 29 May 2014 23:08:28 -0400 [thread overview]
Message-ID: <20140529230828.4d10eb3d@gandalf.local.home> (raw)
In-Reply-To: <20140220084431.3839.51793.stgit@yunodevel>
On Thu, 20 Feb 2014 17:44:31 +0900
Yoshihiro YUNOMAE <yoshihiro.yunomae.ez@hitachi.com> wrote:
> Current tracing_saved_cmdlines_read() implementation is naive;
> simply allocate a big buffer, construct output data on the
> buffer for each read operation, and then copy a portion of
> the buffer to the user space buffer. This can cause a couple of
> issues such as a slow memory allocation, high cpu usage, and a
> corruption of the output data.
>
> To address these issues, make saved_cmdlines use seq_read.
I changed the subject and change log to the following. The patch is
untouched:
tracing: Have saved_cmdlines use the seq_read infrastructure
Current tracing_saved_cmdlines_read() implementation is naive; It
allocates a large buffer, constructs output data to that buffer for
each read operation, and then copies a portion of the buffer to the
user space buffer. This has several issues such as slow memory
allocation, high CPU usage, and even corruption of the output data.
The seq_read infrastructure is made to handle this type of work.
By converting it to use seq_read() the code becomes smaller,
simplified, as well as correct.
-- Steve
next prev parent reply other threads:[~2014-05-30 3:08 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-20 8:44 [PATCH V2 0/2] ftrace: Introduce the new I/F "nr_saved_cmdlines" Yoshihiro YUNOMAE
2014-02-20 8:44 ` [PATCH V2 1/2] ftrace: Make saved_cmdlines use seq_read Yoshihiro YUNOMAE
2014-05-30 3:08 ` Steven Rostedt [this message]
2014-02-20 8:44 ` [PATCH V2 2/2] ftrace: Introduce nr_saved_cmdlines I/F Yoshihiro YUNOMAE
2014-05-30 14:02 ` Steven Rostedt
2014-05-30 17:08 ` Steven Rostedt
2014-06-02 0:28 ` Yoshihiro YUNOMAE
2014-05-26 7:20 ` [PATCH V2 0/2] ftrace: Introduce the new I/F "nr_saved_cmdlines" Yoshihiro YUNOMAE
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=20140529230828.4d10eb3d@gandalf.local.home \
--to=rostedt@goodmis.org \
--cc=fweisbec@gmail.com \
--cc=hidehiro.kawai.ez@hitachi.com \
--cc=linux-kernel@vger.kernel.org \
--cc=masami.hiramatsu.pt@hitachi.com \
--cc=mingo@redhat.com \
--cc=namhyung@kernel.org \
--cc=yoshihiro.yunomae.ez@hitachi.com \
--cc=yrl.pp-manager.tt@hitachi.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
all inboxes | Powered by JetHome®