|Arne H. Juul||Dec 11, 2006 6:47 am|
|Arne H. Juul||Dec 11, 2006 7:06 am|
|Achilleas Mantzios||Dec 11, 2006 7:25 am|
|Achilleas Mantzios||Dec 11, 2006 7:48 am|
|Kostik Belousov||Dec 11, 2006 9:11 am|
|Arne H. Juul||Dec 11, 2006 2:40 pm|
|David Xu||Dec 11, 2006 4:15 pm|
|Arne H. Juul||Dec 11, 2006 4:25 pm|
|Arne H. Juul||Dec 11, 2006 4:50 pm|
|David Xu||Dec 11, 2006 5:04 pm|
|Daniel Eischen||Dec 11, 2006 5:08 pm|
|Bruce Evans||Dec 11, 2006 9:54 pm|
|Poul-Henning Kamp||Dec 11, 2006 10:43 pm|
|Daniel Eischen||Dec 12, 2006 5:21 am|
|Kostik Belousov||Dec 12, 2006 5:59 am|
|Daniel Eischen||Dec 12, 2006 6:24 am|
|Daniel Eischen||Dec 12, 2006 6:35 am|
|Kostik Belousov||Dec 12, 2006 6:38 am|
|Greg Lewis||Dec 12, 2006 11:31 am|
|Daniel Eischen||Dec 12, 2006 12:49 pm|
|David Xu||Dec 12, 2006 3:29 pm|
|Arne H. Juul||Dec 12, 2006 5:59 pm|
|Bruce Evans||Dec 12, 2006 7:28 pm|
|Julian Elischer||Dec 12, 2006 11:12 pm|
|Bruce Evans||Dec 13, 2006 3:28 am|
|David Xu||Dec 13, 2006 4:10 am|
|Subject:||close() of active socket does not work on FreeBSD 6|
|From:||Julian Elischer (jul...@elischer.org)|
|Date:||Dec 12, 2006 11:12:08 pm|
Bruce Evans wrote:
On Wed, 13 Dec 2006, David Xu wrote:
On Wednesday 13 December 2006 04:49, Daniel Eischen wrote:
On Tue, 12 Dec 2006, Poul-Henning Kamp wrote:
In message <2006...@delplex.bde.org>, Bruce Evans writes:
On Mon, 11 Dec 2006, Daniel Eischen wrote:
It's probably a nightmare in the kernel too. close() starts looking like revoke(), and revoke() has large problems and bugs in this area.
There is the distinctive difference that revoke() operates on a name and close() on a filedescriptor, but otherwise I agree.
Well, if threads waiting on IO are interruptable by signals, can't we make a new signal that's only used by the kernel and send it to all threads waiting on IO for that descriptor? When it gets out to actually setup the signal handler, it just resumes like it is returning from an SA_RESTART signal handler (which according to another posting would reissue the IO command and get EBADF).
Stop using signal, it is slow for threaded process, first you don't know which threads are using the descriptor, second, you have to run long code path in kernel signal code to find and deliver the signals to all interested threads, that is too expensive for benchmark like apache benchmark.
A signal would be fast enough for revoke() since revoke() is not used much, and would work well if the signal could be sent, and is unmaskable, and all device drivers catch signals (oops, all of them act like applications whose signal catching function just sets a flag, except while they sleep, so they have the usual problems with just setting a flag -- they may run for too long before actually using the setting). However, I think there is no way to determine which threads are using an fd short of doing the equivalent of fstat(1) searching throuhj kmem. Kernel data structures just aren't set up to do this search efficiently, and shouldn't be bloated to do it.
that's processes.. which thread in the process is the one that is currently waiting on the socket?
For close() on non-devices, there is the additional problem of infinite disk waits due to things like nfs servers down and bugs. Then signals don't work and you wouldn't like close() by a thread trying to clean up the problem to hang too. Otherwise close()/revoke() would be a good way to cancel an infinite disk wait.
_______________________________________________ free...@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-arch To unsubscribe, send any mail to "free...@freebsd.org"