Re: sys_paccept: disable paccept() until API design is resolved

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Rémi
Date: Tuesday, September 16, 2008 - 11:50 pm

On Wednesday 17 September 2008 02:17:25 ext Ulrich Drepper, you wrote:

Hmm. In a multithreaded program, it makes a lot of sense to use blocking I/O 
in general - not just blocking accept(). Of course, this assumes that there 
is only one file descriptor to wait on at a time. This is not necessarily 
true for I/O, nor is it for accept(). For instance, modern TCP servers should 
have an IPv4 and an IPv6 socket to accept() from...

If the code path is such that only one file descriptor is being waited on at a 
time, then using blocking I/O halves the number of syscalls, and thirds the 
number of context switch between hardware packet reception, and userland data 
deliver (3 to 1).


Right.

Then again... Why not recommend threaded programs to use sigwait() in a 
dedicated task and give up on the asynchronous signal handlers completely?

-- 
Rémi Denis-Courmont
Maemo Software, Nokia Devices R&D
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
sys_paccept: disable paccept() until API design is resolved, Michael Kerrisk, (Tue Sep 16, 5:05 am)
Re: sys_paccept: disable paccept() until API design is res ..., Rémi, (Tue Sep 16, 11:50 pm)