GEOM (ggate) compression consumer +problem

Ivan Voras ivoras at fer.hr
Sat Oct 2 08:01:13 PDT 2004


Dmitry Frolov wrote:
> * Ivan Voras <ivoras at fer.hr> [01.10.2004 17:17]:
> 
>>But, I still can't solve the wdrain problem. I've tried it on a recent 
>>BETA6 kernel and it still remains. Writes get slower and slower 
>>(actually, the frequency of writes), and then something locks up (with 
>>no CPU usage...). Sometimes, *any* writes to any filesystem lock up.
> 
> 
> Looks very similar to a syncing problem found in md(4).
> Take a look at cvs log entry for revision 1.115 of md.c:
> 
> http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/dev/md/md.c

Thank you! It's exactly the same problem I've got. After including 
O_DIRECT and O_FSYNC flags to the open() call, the problems dissapear 
(though performance takes a big hit).

Also, it's the same problem with ggatel. This small patch solves it:


--- ggatel.c.old        Sat Oct  2 16:48:08 2004
+++ ggatel.c    Sat Oct  2 16:48:11 2004
@@ -160,7 +160,7 @@
         struct g_gate_ctl_create ggioc;
         int fd;

-       fd = open(path, g_gate_openflags(flags));
+       fd = open(path, g_gate_openflags(flags) | O_DIRECT | O_FSYNC);
         if (fd < 0)
                 err(EXIT_FAILURE, "Cannot open %s", path);
         ggioc.gctl_version = G_GATE_VERSION;


I've poslihed some quirks from the ggatec, so it should now be ready for 
somewhat broader testing ;)

(It's at http://ivoras.sharanet.org/ggcomp.tgz ; expect about 10x worse 
performance compared to performance without compression).


More information about the freebsd-hackers mailing list