lkml.org 
[lkml]   [2003]   [Jan]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC] High-speed data relay filesystem

Andreas Dilger wrote:
> The main drawback is that our 5MB buffer fills in about 1 second on a
> fast machine, so if we had an efficient file interface to user-space
> like relayfs we might be able to keep up and collect longer traces, or
> we might just be better off writing the logs directly to a file from
> the kernel to avoid 2x crossing of user-kernel interface. I wonder if
> we mmap the relayfs file and write with O_DIRECT if that would be zero
> copy from kernel space to kernel space, or if it would just blow up?

That's similar to how we've been operating for LTT for a while now. The
kernel buffers are allocated using rvmalloc and mmapped to user-space.
When the daemon needs to dump to file, it issues a write using the pointer
to the mmapped area. There's no data crossing the user-kernel interface
at any point. It's a zero-copy system. This way, we've been able to handle
mutli-MB buffers very efficiently (and on fast machines MB trace buffers
fill very fast).

> In any case, having relayfs would probably allow us to remove a bunch
> of excess baggage from our code.

Great, glad you're interested.

Karim

===================================================
Karim Yaghmour
karim@opersys.com
Embedded and Real-Time Linux Expert
===================================================
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:32    [W:0.034 / U:5.708 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site