From: Jens Axboe <jens.axboe@oracle.com>
To: Tom Zanussi <zanussi@comcast.net>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Mathieu Desnoyers <compudj@krystal.dyndns.org>,
Martin Bligh <mbligh@google.com>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
prasad@linux.vnet.ibm.com,
Linus Torvalds <torvalds@linux-foundation.org>,
Thomas Gleixner <tglx@linutronix.de>,
Steven Rostedt <rostedt@goodmis.org>,
od@suse.com, "Frank Ch. Eigler" <fche@redhat.com>,
Andrew Morton <akpm@linux-foundation.org>,
hch@lst.de, David Wilder <dwilder@us.ibm.com>
Subject: Re: [RFC PATCH 1/1] relay revamp v5
Date: Mon, 6 Oct 2008 09:40:39 +0200 [thread overview]
Message-ID: <20081006074039.GE19428@kernel.dk> (raw)
In-Reply-To: <1223270572.7054.76.camel@charm-linux>
On Mon, Oct 06 2008, Tom Zanussi wrote:
> The full relay patch.
>
> Basically it includes the changes from the previous 11 that I posted and
> in addition completely separates the reading part of relay from the
> writing part. With the new changes, relay really does become just what
> its name says and and nothing more - it accepts pages from tracers, and
> relays the data to userspace via read(2) or splice(2) (and therefore
> sendfile(2)). It doesn't allocate any buffer space and provides no
> write functions - those are expected to be supplied by some other
> component such as the unified ring-buffer or any other tracer that might
> want relay pages of trace data to userspace.
>
> Includes original relay write functions and buffers (the no-vmap
> page-based versions of the previous patchset), which have been split out
> into a new file called relay_pagewriter.c and provide one means of
> writing into pages and feeding them into relay. blktrace and kvmtrace
> have been 'ported' over to using pagewriter instead of relay directly.
>
> Signed-off-by: Tom Zanussi <zanussi@comcast.net>
>
> diff --git a/block/blktrace.c b/block/blktrace.c
> index eb9651c..8ba7094 100644
> --- a/block/blktrace.c
> +++ b/block/blktrace.c
> @@ -35,7 +35,7 @@ static void trace_note(struct blk_trace *bt, pid_t pid, int action,
> {
> struct blk_io_trace *t;
>
> - t = relay_reserve(bt->rchan, sizeof(*t) + len);
> + t = kmalloc(sizeof(*t) + len, GFP_KERNEL);
> if (t) {
> const int cpu = smp_processor_id();
>
Ugh, that's no good - it's both way too expensive, and also requires an
atomic allocation.
> @@ -166,7 +168,7 @@ void __blk_add_trace(struct blk_trace *bt, sector_t sector, int bytes,
> if (unlikely(tsk->btrace_seq != blktrace_seq))
> trace_note_tsk(bt, tsk);
>
> - t = relay_reserve(bt->rchan, sizeof(*t) + pdu_len);
> + t = kmalloc(sizeof(*t) + pdu_len, GFP_KERNEL);
> if (t) {
> cpu = smp_processor_id();
> sequence = per_cpu_ptr(bt->sequence, cpu);
Ditto - I don't think this approach is viable at all, sorry!
--
Jens Axboe
next prev parent reply other threads:[~2008-10-06 7:41 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-29 5:40 [RFC PATCH 7/11] relay - Remove padding-related code from relay_read()/relay_splice_read() et al Tom Zanussi
2008-09-29 16:27 ` Mathieu Desnoyers
2008-09-30 5:04 ` Tom Zanussi
2008-10-06 5:22 ` [RFC PATCH 0/1] relay revamp v5 Tom Zanussi
2008-10-06 5:22 ` [RFC PATCH 1/1] " Tom Zanussi
2008-10-06 7:40 ` Jens Axboe [this message]
2008-10-07 4:55 ` Tom Zanussi
2008-09-30 9:04 ` [RFC PATCH 7/11] relay - Remove padding-related code from relay_read()/relay_splice_read() et al Jens Axboe
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=20081006074039.GE19428@kernel.dk \
--to=jens.axboe@oracle.com \
--cc=a.p.zijlstra@chello.nl \
--cc=akpm@linux-foundation.org \
--cc=compudj@krystal.dyndns.org \
--cc=dwilder@us.ibm.com \
--cc=fche@redhat.com \
--cc=hch@lst.de \
--cc=linux-kernel@vger.kernel.org \
--cc=mbligh@google.com \
--cc=od@suse.com \
--cc=prasad@linux.vnet.ibm.com \
--cc=rostedt@goodmis.org \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
--cc=zanussi@comcast.net \
/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