Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 02 Oct 2004 17:00:27 +0200
From:      Ivan Voras <ivoras@fer.hr>
To:        hackers@freebsd.org, current@freebsd.org
Subject:   Re: GEOM (ggate) compression consumer +problem
Message-ID:  <415EC28B.4030900@fer.hr>
In-Reply-To: <20041002133512.GA16646@nerve.riss-telecom.ru>
References:  <415BDFC2.1020304@fer.hr> <415C9967.3090309@jonny.eng.br> <415D2E86.5060007@fer.hr> <20041002133512.GA16646@nerve.riss-telecom.ru>

next in thread | previous in thread | raw e-mail | index | archive | help
Dmitry Frolov wrote:
> * Ivan Voras <ivoras@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).



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?415EC28B.4030900>