Date: Fri, 07 Oct 2005 15:38:36 +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: <E1ENqYe-0006Z2-00._pppp-mail-ru@f19.mail.ru> In-Reply-To: <20051007102229.GL14542@cell.sick.ru>
next in thread | previous in thread | raw e-mail | index | archive | help
> d> The loop body should really look like > d> if( mtx_try_lock( &iface_lock[i] ) ) { > d> pr[i].handler( pr[i].ifp, POLL_ONLY, count ); > d> mtx_unlock( &iface_lock[i] ); > d> } > d> I skipped this first to make the idea clearer. > > Yes, this approach should be better. > > d> > Really we do not have several kernel threads in polling. netisr_poll() is always > d> > run by one thread - swi1:net. Well, we have also idle_poll thread, but it is > d> > very special case. Frankly speaking, it can't work without help from netisr_poll(). > d> > The current polling is designed for a single threaded kernel, for RELENG_4. We > d> > can't achieve parallelization with strong redesign. The future plans are to create > d> > per-interface CPU bound threads. The plans can change. You are welcome to help. > d> > d> idle_poll can significantly increase network response time. I'd suggest per-CPU (not per-interface) threads. This would keep user_frac code much simpler. > > No, please don't spawn more idle_poll threads! :) Not idle_poll but swi threads actually. Btw, the loop discussed is just the same in ether_poll() and netisr_poll(). It could be splitted as a separate (inline?) function. Such complex macros aren't any good ;) > As said, the idle_poll thread can't work on its own. idle_poll needs netisr_poll() > to push it sometimes out of the priority pit. It is described in first mail of > this thread. idle_poll should surely remain a single entity. > > d> Not sure about the coding help in the next weeks. My current project is on the pre-release stage and the kid is going to be born soon. I can join a bit later though. > > There is no promises in the free project. Join when you can.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E1ENqYe-0006Z2-00._pppp-mail-ru>