Date: Thu, 6 Oct 2005 22:34:13 +0400 From: Gleb Smirnoff <glebius@FreeBSD.org> To: dima <_pppp@mail.ru> Cc: arch@FreeBSD.org Subject: Re: [REVIEW/TEST] polling(4) changes Message-ID: <20051006183413.GH14542@cell.sick.ru> In-Reply-To: <E1ENYQn-000AAm-00._pppp-mail-ru@f49.mail.ru> References: <20050930211716.GP45345@cell.sick.ru> <E1ENYQn-000AAm-00._pppp-mail-ru@f49.mail.ru>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20051006183413.GH14542>
