From owner-freebsd-current@FreeBSD.ORG Wed Jul 14 18:42:44 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0325116A4CE; Wed, 14 Jul 2004 18:42:44 +0000 (GMT) Received: from cell.sick.ru (cell.sick.ru [217.72.144.68]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4563C43D1F; Wed, 14 Jul 2004 18:42:43 +0000 (GMT) (envelope-from glebius@freebsd.org) Received: from cell.sick.ru (glebius@localhost [127.0.0.1]) by cell.sick.ru (8.12.11/8.12.8) with ESMTP id i6EIgem3011341 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 14 Jul 2004 22:42:41 +0400 (MSD) (envelope-from glebius@freebsd.org) Received: (from glebius@localhost) by cell.sick.ru (8.12.11/8.12.11/Submit) id i6EIgefu011340; Wed, 14 Jul 2004 22:42:40 +0400 (MSD) (envelope-from glebius@freebsd.org) X-Authentication-Warning: cell.sick.ru: glebius set sender to glebius@freebsd.org using -f Date: Wed, 14 Jul 2004 22:42:40 +0400 From: Gleb Smirnoff To: Poul-Henning Kamp Message-ID: <20040714184240.GB11214@cell.sick.ru> References: <20040714154254.GB9999@cell.sick.ru> <12611.1089830161@critter.freebsd.dk> Mime-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <12611.1089830161@critter.freebsd.dk> User-Agent: Mutt/1.5.6i cc: Robert Watson cc: current@freebsd.org Subject: Re: Some netgraph node global locking patches X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jul 2004 18:42:44 -0000 On Wed, Jul 14, 2004 at 08:36:01PM +0200, Poul-Henning Kamp wrote: P> >Yes it does. But qsort() already used in ng_ppp is as much recursive as P> >qsort_r() is. It will help us to get rid of global variable. P> >I Cc phk@ to this mail, because he copied qsort() to libkern from libc. P> P> It was put there to get rid of a couple of badly implemented bubble P> sorts. P> P> It is true that qsort() is recursive, but it is limited to log2(N) P> levels and kernel programmers hopefully don't routinely sort arrays P> of hundreds of things in the kernel. >From a snap view I see no problems copying qsort_r() to libkern. What do you think? It will help us to get rid of global in ng_ppp. -- Totus tuus, Glebius. GLEBIUS-RIPN GLEB-RIPE