state-threads
[Top] [All Lists]

[PATCH] improve _st_vp_idle() speed

To: <state-threads@xxxxxxxxxxx>
Subject: [PATCH] improve _st_vp_idle() speed
From: Sascha Schumann <sascha@xxxxxxxxxxx>
Date: Mon, 11 Jun 2001 12:02:55 +0200 (MEST)
Sender: owner-state-threads@xxxxxxxxxxx
    Hi,

    applications which use large IO queues spend a lot of time
    poll()ing fds.  The attached patch tries to minimize the
    impact of the O(n) interface by introducing a couple of
    changes to _st_vp_idle():

    1.  The manual iteration over all fds to copy them has been
        replaced by a memcpy per IO-queue.

    2.  The function of the iteration over the final pollfd array
        has been changed to only check for active fds and avoid
        any memory writes.  When an active fd is found, it skips
        all further checks for that particular IO queue and
        memcpy's the complete fd set.

    This patch has been extensively tested under real world
    conditions (the application uses about 10K sockets and
    frequently st_poll()s 5K of them).

    - Sascha                                     Experience IRCG
      http://schumann.cx/                http://schumann.cx/ircg

Attachment: st-fast-poll.patch
Description: Text document

<Prev in Thread] Current Thread [Next in Thread>
  • [PATCH] improve _st_vp_idle() speed, Sascha Schumann <=