On Wed, Mar 28, 2018 at 09:29:35AM +0200, Thomas Monjalon wrote: > 28/03/2018 04:08, Tan, Jianfeng: > > Hi Thomas , > > > > From: Thomas Monjalon [mailto:tho...@monjalon.net] > > > 27/03/2018 15:59, Anatoly Burakov: > > > > Under the hood, we create a separate thread to deal with replies to > > > > asynchronous requests, that will just wait to be notified by the > > > > main thread, or woken up on a timer. > > > > > > I really don't like that a library is creating a thread. > > > We don't even know where the thread is created (which core). > > > Can it be a rte_service? or in the interrupt thread? > > > > Agree that we'd better not adding so many threads in a library. > > > > I was considering to merge all the threads into the interrupt thread, > > however, we don't have an interrupt thread in freebsd. Further, we don't > > implement alarm API in freebsd. That's why I tend to current > > implementation, and optimize it later. > > I would prefer we improve the current code now instead of polluting more > with more uncontrolled threads. > +1 I think it would be worthwhile adding an interrupt thread to BSD, and it should not be a massive amount of work. Having a single interrupt thread has a lot of benefits, I think.
/Bruce