Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 02 Apr 2003 15:10:13 -0800
From:      Terry Lambert <tlambert2@mindspring.com>
To:        Jeff Roberson <jroberson@chesapeake.net>
Cc:        current@freebsd.org
Subject:   Re: libthr and 1:1 threading.
Message-ID:  <3E8B6DD5.7231C0F6@mindspring.com>
References:  <20030402152516.J64602-100000@mail.chesapeake.net>

next in thread | previous in thread | raw e-mail | index | archive | help
Jeff Roberson wrote:
> On Wed, 2 Apr 2003, Terry Lambert wrote:
> > Is the disk I/O really that big of an issue?  All writes will
> > be on underlying non-blocking descriptors; I guess you are
> > saying that the interleaved I/O is more important, further
> > down the system call interface than the top, and this becomes
> > an issue?
> 
> UNIX distinguishes between short term and long term blocking calls.  Non
> blocking io only avoids blocking for indeterminate periods of time.  The
> 20ms or so you're paying per IO on an IDE system is 20ms that no other
> threads can run.  This makes a difference.

See other message.  The fault should be tripped, but the process
should not wait around for the result, if it was tripped as the
result of a read on an async fd.  Instead an EAGAIN should go to
user space, and that 20ms should be used for something else in
user space, while the drive gets busy with the DMA.

This is arguably a bug in FreeBSD's handling of demand faults
on non-blocking fd's, compared to SVR4 and Solaris' handling.


> > It seems to me that maybe the correct fix for this is to use
> > AIO instead of non-blocking I/O, then?
> 
> Our AIO implementation needs some rethinking.  I'm not sure how
> effecient it actually is.

I will guess it suffers from the same "faulting == halting"
problem...


> > Also, any ETA on the per process signal mask handing bug in
> > libthr?  Might not be safe to convert everything up front, in
> > a rush of eager enthusiasm...
> 
> Which bug is that?  I'm not aware of it.

KSE mailing list, starting Monday or so:
] We still haven't heard from jeff with regard to the process
] signal mask removal.

-- Terry



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3E8B6DD5.7231C0F6>