Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 06 Oct 2005 20:17:17 +0400
From:      dima <_pppp@mail.ru>
To:        Gleb Smirnoff <glebius@FreeBSD.org>
Cc:        arch@FreeBSD.org
Subject:   Re[2]: [REVIEW/TEST] polling(4) changes
Message-ID:  <E1ENYQn-000AAm-00._pppp-mail-ru@f49.mail.ru>
In-Reply-To: <20050930211716.GP45345@cell.sick.ru>

next in thread | previous in thread | raw e-mail | index | archive | help
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] );
}





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E1ENYQn-000AAm-00._pppp-mail-ru>