netdev
[Top] [All Lists]

[patch] do not readlock all buckets in /proc/net/tcp

To: netdev@xxxxxxxxxxx
Subject: [patch] do not readlock all buckets in /proc/net/tcp
From: Marcus Meissner <meissner@xxxxxxx>
Date: Mon, 5 Jul 2004 13:09:49 +0200
Sender: netdev-bounce@xxxxxxxxxxx
User-agent: Mutt/1.5.6i
Hi,

This patch makes the files /proc/net/tcp and /proc/net/tcp6 not acquire
the readlock for every bucket.

On ppc64 and ia64 the readlocks are so expensive, that reading /proc/net/tcp
takes 0.25 seconds on a usual p670 LPAR.

And it locks 65536 buckets where just 20 chains are used at all in a normal
non-netserver setup.

Ciao, Marcus

Changelog:
        Readlock only non-empty hash chains to avoid 65536 readlocks.

        Signed-Off-By: Marcus Meissner <meissner@xxxxxxx>

Attachment: tcp-proc-walk
Description: Text document

<Prev in Thread] Current Thread [Next in Thread>