From owner-cvs-src@FreeBSD.ORG Wed Nov 5 02:32:22 2003 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9D26E16A4CE; Wed, 5 Nov 2003 02:32:22 -0800 (PST) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3179843FE9; Wed, 5 Nov 2003 02:32:22 -0800 (PST) (envelope-from harti@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.9/8.12.9) with ESMTP id hA5AWMXJ050682; Wed, 5 Nov 2003 02:32:22 -0800 (PST) (envelope-from harti@repoman.freebsd.org) Received: (from harti@localhost) by repoman.freebsd.org (8.12.9/8.12.9/Submit) id hA5AWLtd050681; Wed, 5 Nov 2003 02:32:21 -0800 (PST) (envelope-from harti) Message-Id: <200311051032.hA5AWLtd050681@repoman.freebsd.org> From: Hartmut Brandt Date: Wed, 5 Nov 2003 02:32:21 -0800 (PST) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/netgraph ng_base.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Nov 2003 10:32:22 -0000 harti 2003/11/05 02:32:21 PST FreeBSD src repository Modified files: sys/netgraph ng_base.c Log: Replace the lock-less algorithm for the free item list with a more conservative lock. The problem with the lock-less algorithm is that it suffers from the ABA problem. Running an application with funnels a couple of 100kpkts/s through the netgraph system on a dual CPU system with MPSAFE drivers will panic almost immediatly with the old algorithm. It may be possible to eliminate the contention between threads that insert free items into the list and those that get free items by using the Michael/Scott queue algorithm that has two locks. Revision Changes Path 1.71 +36 -64 src/sys/netgraph/ng_base.c