From owner-freebsd-net@FreeBSD.ORG Thu Jun 9 21:12:11 2005 Return-Path: X-Original-To: freebsd-net@freebsd.org Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9B09316A41C for ; Thu, 9 Jun 2005 21:12:11 +0000 (GMT) (envelope-from vladgalu@gmail.com) Received: from zproxy.gmail.com (zproxy.gmail.com [64.233.162.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id 593B343D1F for ; Thu, 9 Jun 2005 21:12:11 +0000 (GMT) (envelope-from vladgalu@gmail.com) Received: by zproxy.gmail.com with SMTP id 9so364618nzo for ; Thu, 09 Jun 2005 14:12:07 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=VHtMo43vBv1nj3+g8m0LWox1A7DlsKJ4vAMBffmc11TrA/xT1LN96GL/2xoMYxBrWBrJggmR8mZR+3hYrms40Lykd1kwp97PzvYrrNA9FWBW98xgAaoLLzbSbP/QTLNhfjO6Fb3yfp4GqsJ7VwIglBWlDeGx5TU0qmS5e3PDfSg= Received: by 10.36.46.20 with SMTP id t20mr662385nzt; Thu, 09 Jun 2005 14:12:07 -0700 (PDT) Received: by 10.36.86.4 with HTTP; Thu, 9 Jun 2005 14:12:07 -0700 (PDT) Message-ID: <79722fad05060914123edd1004@mail.gmail.com> Date: Fri, 10 Jun 2005 00:12:07 +0300 From: Vlad GALU To: freebsd-pf@freebsd.org, freebsd-net@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Cc: Subject: Please review & test this X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Vlad GALU List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Jun 2005 21:12:11 -0000 As you may all know, the packet classifier in ALTQ is very slow on large numbers of classes, because it stores them linearly, in an array. I rewrote the way classes are stored, replacing the array with a hash table. I tested [1] on a system with about 8000 classes and noticed a remarkable performance difference (the system went from almost unusable to nice & smooth). It breaks the ABI by adding an extra TAILQ_ENTRY member to the HFSC class structure, though. If anyone reviews and tests it, I would be grateful. [1] http://night.rdslink.ro/dudu/altq/altq_hfschash.diff P.S. please keep in mind that I'm not exactly a black belt in kernel programming, so glitches might exist. I would be most happy to hear some suggestions. --=20 If it's there, and you can see it, it's real. If it's not there, and you can see it, it's virtual. If it's there, and you can't see it, it's transparent. If it's not there, and you can't see it, you erased it.