From: John B. <jjb...@gm...> - 2007-07-30 12:15:02
|
> For the moment buffering in userspace is the only way. Thanks very much for the reply. I've implemented userspace buffering, but I think the buffered writes have to be shared between threads and it appears that the the (perl) thread synchronisation on each 4k write is also a significant overhead (running the same load with the 'no-op' version of threads::shared reduces the CPU load significantly). > We already have a solution for this, but it involves modifying core > parts of the linux kernel, and has dependencies on other, pending > patches, so it's not clear when this will be fixed. Maybe in > linux-2.6.24 but more likely 2.6.25. That sounds great. In the meantime, I've had the the ->direct_io field in the fuse_file_info struct pointed out to me. It seems that the current perl bindings don't expose this, but if I modify the Fuse.xs perl XS wrapper to set the flag unconditionally in open, it appears to allow the original write() size to come through to my application code. which is great. If I understand correctly, setting this field asks fuse to bypass the page cache, so it would also disable any cacheing of the file contents (I haven't tested this). That's OK for my application. Do you think this would be a workable approach? Or are there complications and possible problems with this route? regards, jb |