Does the poll()ing a shared pipe bug also affects nginx?

Maxim Dounin mdounin at
Fri Dec 17 16:46:50 MSK 2010


On Fri, Dec 17, 2010 at 12:47:20PM +0000, Mark Alan wrote:

> At the dovecot mailing list there has been a discussion about what
> seems to be a bug where, in linux, systems poll()ing a shared pipe
> triggers unnecessary context switches.
> Does ningx also poll()s shared pipes?
> The bug report (from dovecot author):
> (full patch here:
> And the answer from the linux kernel people:

No, this particular problem shouldn't affect nginx.  It uses 
socketpairs (not pipes), waits for read events (not write), and 
they aren't actually shared (though each worker has sockets to 
other workers, each worker only waits on his own socket and 
doesn't touch sockets to other workers).

Maxim Dounin

More information about the nginx mailing list