From: Karim Yaghmour <karim@opersys.com>
To: Andi Kleen <ak@muc.de>
Cc: Tom Zanussi <zanussi@us.ibm.com>,
linux-kernel <linux-kernel@vger.kernel.org>,
Andrew Morton <akpm@osdl.org>,
Roman Zippel <zippel@linux-m68k.org>,
Robert Wisniewski <bob@watson.ibm.com>,
Tim Bird <tim.bird@AM.SONY.COM>
Subject: Re: [PATCH] relayfs redux, part 2
Date: Mon, 31 Jan 2005 14:38:12 -0500 [thread overview]
Message-ID: <41FE8924.2000809@opersys.com> (raw)
In-Reply-To: <20050131125758.GA23172@muc.de>
Andi Kleen wrote:
> It's doing a complicated function call which does who knows what in
> the logging fast path (I stopped reading after some point)
> It definitely is not putc !
I was anticipating some people would have this requirement, and this
is why I introduced the ad-hoc mode. Roman asked me to get rid of it
because nobody had yet asked for it, so this is why it was dropped.
As it is, the implementation you are suggesting is insufficient for
LTT, which is relayfs' first formal client. I think that it would be
better to provide two underlying mechanisms for relayfs at this point,
we had already stripped it as thin as it would go for things like LTT.
>>separate grabbing a slot in the buffer from the memcpy because some
>>applications such as ltt want to be able to directly write into the
>>slot without having to copy it into another buffer first. How about
>
>
> If the inline function to log was fast enough it wouldn't need
> any such hacks.
Actually that's not true. There are two problems with this statement:
a- It requires prepackaged data units.
b- It's only useful for fixed-size data units.
Any efficient client that has complex data units will want to write
directly into the buffer instead of creating an intermediate package
which is then memcopied. With the modified code, we are now forced
to create an intermediate package, which is wrong. Also, if the client
wants to log variable-size events, he would have to re-implement lots
of the writing code.
Note that I really think relay_write() should be dropped altogether.
Clients should call on relay_reserve() and do whatever is necessary
after that.
> Note that gcc is quite good at optimizing memcpy, so essentially
> when you e.g. do log(singleint) it should be roughly equivalent
> to a int store into the buffer + the check if there is enough
> buffer space.
I understand the point you are trying to make, but I really think that
this is best implemented as two separate buffering schemes instead of
breaking the existing one (which had already been trimmed down quite
thin following Roman's input.)
> You could avoid the local_irq_save() if you use separate interrupt
> buffers that are only accessed in non nesting interrupt context
> (like softirqs) That would require a sorting step at output though. Not
> sure if it's worth it. The problem is that hardirqs can nest anyways,
> so it wouldn't work for them. However a lot of important code runs
> in softirq (like the network stack) where this is true.
For the kind of data sizes we are looking at for LTT (100GBs) splitting
buffers is not viable anyway.
Karim
--
Author, Speaker, Developer, Consultant
Pushing Embedded and Real-Time Linux Systems Beyond the Limits
http://www.opersys.com || karim@opersys.com || 1-866-677-4546
next prev parent reply other threads:[~2005-01-31 19:44 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-01-28 19:38 [PATCH] relayfs redux, part 2 Tom Zanussi
2005-01-28 20:48 ` Tim Bird
2005-01-28 22:24 ` Andrew Morton
2005-01-29 8:08 ` Andi Kleen
2005-01-30 4:58 ` Tom Zanussi
2005-01-31 12:57 ` Andi Kleen
2005-01-31 16:26 ` Tom Zanussi
2005-01-31 19:41 ` Karim Yaghmour
2005-01-31 21:03 ` Tom Zanussi
2005-01-31 21:12 ` Karim Yaghmour
2005-01-31 19:38 ` Karim Yaghmour [this message]
2005-01-29 8:15 ` Greg KH
2005-01-30 5:02 ` Tom Zanussi
2005-01-31 22:10 ` Karim Yaghmour
2005-01-31 22:33 ` Greg KH
2005-01-31 22:35 ` Karim Yaghmour
2005-01-31 23:12 ` Roman Zippel
2005-02-01 15:44 ` Tom Zanussi
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=41FE8924.2000809@opersys.com \
--to=karim@opersys.com \
--cc=ak@muc.de \
--cc=akpm@osdl.org \
--cc=bob@watson.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=tim.bird@AM.SONY.COM \
--cc=zanussi@us.ibm.com \
--cc=zippel@linux-m68k.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox