Re: I/O completion ports for Linux

Theodore Y. Ts'o (tytso@MIT.EDU)
Tue, 31 Mar 1998 19:43:38 -0500


Date: Fri, 27 Mar 1998 17:52:38 -0800 (PST)
From: Robey Pointer <robey@lag.net>

The following is a patch against Linux 2.1.84 to implement "I/O
completion ports" similar to VMS/NT. It will probably patch against
more recent kernels, with slight changes. (I used 84 because it was
the last one I could boot from when I started the patch -- the next
version of the patch will be against one of the 2.1.9x probably.)

An I/O completion port is a special fd that receives notification of
completed I/O (hence the name...) from other fd's. You can start an
I/O operation from one thread, and any other thread can pick up the
result later, when the I/O is finished.

Hi Robey,

This is very welcome indeed. Just two days ago, I was talking
to a fellow attendee at the Internet Engineering Task Force (the
standards body for the Internet). This fellow is from.... ah.... a very
large vendor which sells web browsers for Unix and NT. He was talking
to me specifically about the possibility of adding I/O completion ports
to Linux. The problem is that the poll() interface simply doesn't scale to
30,000+ connections. As a result, none of the Unix ports of his
company's product is able to complete with the NT port of his product,
and he considered this to be a Bad Thing.

The only other choice is to spawn separate kernel threads for
each of the 30,000 connections, but given that most of these connections
are idle most of the time, this tends not to be a very good use of the
system's resources.

I haven't looked at the your implementation or the details of
the interface yet, and it may require polishing, but ultimately it would
be a Very Good Thing to have a feature like this added to Linux.

- Ted

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu