From owner-freebsd-arch@FreeBSD.ORG Thu Oct 6 18:34:17 2005 Return-Path: X-Original-To: arch@FreeBSD.org Delivered-To: freebsd-arch@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2E10916A41F for ; Thu, 6 Oct 2005 18:34:17 +0000 (GMT) (envelope-from glebius@FreeBSD.org) Received: from cell.sick.ru (cell.sick.ru [217.72.144.68]) by mx1.FreeBSD.org (Postfix) with ESMTP id 814A043D48 for ; Thu, 6 Oct 2005 18:34:16 +0000 (GMT) (envelope-from glebius@FreeBSD.org) Received: from cell.sick.ru (glebius@localhost [127.0.0.1]) by cell.sick.ru (8.13.3/8.13.3) with ESMTP id j96IYDIG029007 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 6 Oct 2005 22:34:14 +0400 (MSD) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.sick.ru (8.13.3/8.13.1/Submit) id j96IYDii029006; Thu, 6 Oct 2005 22:34:13 +0400 (MSD) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.sick.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Thu, 6 Oct 2005 22:34:13 +0400 From: Gleb Smirnoff To: dima <_pppp@mail.ru> Message-ID: <20051006183413.GH14542@cell.sick.ru> References: <20050930211716.GP45345@cell.sick.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.6i Cc: arch@FreeBSD.org Subject: Re: [REVIEW/TEST] polling(4) changes X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Oct 2005 18:34:17 -0000 On Thu, Oct 06, 2005 at 08:17:17PM +0400, dima wrote: d> Seems to be a first considerable step regarding the ideas discussed in March :) d> But, my idea about the separate locking of each interface dissappeared from this implementation. mtx_poll is good to protect the pollrec array and other sensitive variables. But we could get advantage of SMP machines writing polling loops like this: d> d> for( i = 0; i < poll_handlers; ++i ) { d> mtx_lock( &iface_lock[i] ); d> pr[i].handler(pr[i].ifp, POLL_ONLY, count); d> mtx_unlock( &iface_lock[i] ); d> } What is the benefit here? The driver must have its own lock. -- Totus tuus, Glebius. GLEBIUS-RIPN GLEB-RIPE