This is the mail archive of the java-discuss@sourceware.cygnus.com mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Serious problem with multithreaded I/O on Linux


Tom Tromey wrote:
> Bryce> Why are blocking IO calls not gc-safe, anyway?
> 
> I don't think it wants to block all the threads (though I could be
> wrong as I haven't dug through all that code yet).  Instead I believe
> it is changing the protection on the page so that the read() works.
> In incremental mode the Boehm GC write-protects pages to implement a
> write barrier.

Note that this only affects ports based on MPROTECT_VDB, such as
Linux/i386, FreeBSD and Irix.  The Solaris port uses /proc to track
dirty pages.

I simply commented out "#define MPROTECT_VDB" at line 593 in
boehm-gc/config.h.  Suddenly, my multithreaded tests run very well!

This ought to be filed as a GC bug, since incremental mode is
incompatible with pthreads, at least on Linux.

-- 
Jeff Sturm
jsturm@sigma6.com

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]