Re: [RFC] High-speed data relay filesystem

Karim Yaghmour
2003-01-07T20:27:12Z

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
===================================================