[REVIEW/TEST] polling(4) changes

dima _pppp at mail.ru
Thu Oct 6 09:17:21 PDT 2005


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] );
}




More information about the freebsd-arch mailing list