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


Bryce McKinlay wrote:
> Why are blocking IO calls not gc-safe, anyway?

Blocking I/O isn't the problem.  The GC plays tricks with mprotect() for
its incremental mode... by write-protecting a heap address, it can trap
page faults and detect when a heap block is changed.  That works fine in
user mode.  But if the kernel tries to modify a read-only block, such as
during a read() system call, the call will fail without generating a
page fault.

If we don't use incremental mode, I think the wrapped system calls can
safely be removed.

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