From owner-freebsd-arch@FreeBSD.ORG Thu Oct 6 16:17:20 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 E9A7716A41F; Thu, 6 Oct 2005 16:17:20 +0000 (GMT) (envelope-from _pppp@mail.ru) Received: from f49.mail.ru (f49.mail.ru [194.67.57.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1DA1343D6A; Thu, 6 Oct 2005 16:17:19 +0000 (GMT) (envelope-from _pppp@mail.ru) Received: from mail by f49.mail.ru with local id 1ENYQn-000AAm-00; Thu, 06 Oct 2005 20:17:17 +0400 Received: from [212.5.170.174] by win.mail.ru with HTTP; Thu, 06 Oct 2005 20:17:17 +0400 From: dima <_pppp@mail.ru> To: Gleb Smirnoff Mime-Version: 1.0 X-Mailer: mPOP Web-Mail 2.19 X-Originating-IP: [212.5.170.174] Date: Thu, 06 Oct 2005 20:17:17 +0400 In-Reply-To: <20050930211716.GP45345@cell.sick.ru> Content-Type: text/plain; charset=koi8-r Content-Transfer-Encoding: 8bit Message-Id: Cc: arch@FreeBSD.org Subject: Re[2]: [REVIEW/TEST] polling(4) changes X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: dima <_pppp@mail.ru> 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 16:17:21 -0000 Seems to be a first considerable step regarding the ideas discussed in March :) 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: for( i = 0; i < poll_handlers; ++i ) { mtx_lock( &iface_lock[i] ); pr[i].handler(pr[i].ifp, POLL_ONLY, count); mtx_unlock( &iface_lock[i] ); }