Re: Switch select(2) to kqueue-based implementation

2020-12-16 Thread Visa Hankala
On Tue, Dec 15, 2020 at 05:23:45PM +, Visa Hankala wrote: > On Tue, Dec 15, 2020 at 07:46:01AM -0300, Martin Pieuchot wrote: > > @@ -636,43 +651,59 @@ dopselect(struct proc *p, int nd, fd_set > > if (sigmask) > > dosigsuspend(p, *sigmask &~ sigcantmask); > > > > -retry: > > -

Re: Switch select(2) to kqueue-based implementation

2020-12-16 Thread Martin Pieuchot
On 15/12/20(Tue) 17:23, Visa Hankala wrote: > On Tue, Dec 15, 2020 at 07:46:01AM -0300, Martin Pieuchot wrote: > > @@ -636,43 +651,59 @@ dopselect(struct proc *p, int nd, fd_set > > if (sigmask) > > dosigsuspend(p, *sigmask &~ sigcantmask); > > > > -retry: > > - ncoll =

Re: Switch select(2) to kqueue-based implementation

2020-12-15 Thread Visa Hankala
On Tue, Dec 15, 2020 at 07:46:01AM -0300, Martin Pieuchot wrote: > @@ -636,43 +651,59 @@ dopselect(struct proc *p, int nd, fd_set > if (sigmask) > dosigsuspend(p, *sigmask &~ sigcantmask); > > -retry: > - ncoll = nselcoll; > - atomic_setbits_int(>p_flag, P_SELECT); >

Re: Switch select(2) to kqueue-based implementation

2020-12-15 Thread Martin Pieuchot
On 12/12/20(Sat) 11:29, Visa Hankala wrote: > On Fri, Dec 11, 2020 at 09:35:59AM -0300, Martin Pieuchot wrote: > > On 10/12/20(Thu) 09:59, Martin Pieuchot wrote: > > > All previous kqueue refactoring have been committed, here's a final diff > > > to modify the internal implementation of

Re: Switch select(2) to kqueue-based implementation

2020-12-13 Thread Visa Hankala
On Sat, Dec 12, 2020 at 11:29:02AM +, Visa Hankala wrote: > On Fri, Dec 11, 2020 at 09:35:59AM -0300, Martin Pieuchot wrote: > > +/* > > + * Convert given kqueue event into corresponding select(2) bit. > > + */ > > +int > > +pselcollect(struct proc *p, struct kevent *kevp, fd_set *pobits[3]) >

Re: Switch select(2) to kqueue-based implementation

2020-12-12 Thread Visa Hankala
On Fri, Dec 11, 2020 at 09:35:59AM -0300, Martin Pieuchot wrote: > On 10/12/20(Thu) 09:59, Martin Pieuchot wrote: > > All previous kqueue refactoring have been committed, here's a final diff > > to modify the internal implementation of {p,}select(2) to query kqfilter > > handlers instead of poll

Re: Switch select(2) to kqueue-based implementation

2020-12-11 Thread Martin Pieuchot
On 10/12/20(Thu) 09:59, Martin Pieuchot wrote: > All previous kqueue refactoring have been committed, here's a final diff > to modify the internal implementation of {p,}select(2) to query kqfilter > handlers instead of poll ones. > > {p,}poll(2) are left untouched to ease the transition. > >

Switch select(2) to kqueue-based implementation

2020-12-10 Thread Martin Pieuchot
All previous kqueue refactoring have been committed, here's a final diff to modify the internal implementation of {p,}select(2) to query kqfilter handlers instead of poll ones. {p,}poll(2) are left untouched to ease the transition. Here's what I said in the original mail back in May [0]: > The

Re: Switch select(2) to kqueue-based implementation

2020-12-04 Thread Martin Pieuchot
On 30/11/20(Mon) 17:23, Martin Pieuchot wrote: > On 30/11/20(Mon) 17:06, Visa Hankala wrote: > > On Mon, Nov 30, 2020 at 01:28:14PM -0300, Martin Pieuchot wrote: > > > I plan to commit this in 3 steps, to ease a possible revert: > > > - kevent(2) refactoring > > > - introduction of newer kq*

Re: Switch select(2) to kqueue-based implementation

2020-11-30 Thread Martin Pieuchot
On 30/11/20(Mon) 17:06, Visa Hankala wrote: > On Mon, Nov 30, 2020 at 01:28:14PM -0300, Martin Pieuchot wrote: > > I plan to commit this in 3 steps, to ease a possible revert: > > - kevent(2) refactoring > > - introduction of newer kq* APIs > > - dopselect rewrite > > Please send a separate

Switch select(2) to kqueue-based implementation

2020-11-30 Thread Martin Pieuchot
Now that the kqueue refactoring has been committed, here's once again the diff to modify the internal implementation of {p,}select(2) to query kqfilter handlers instead of poll ones. {p,}poll(2) are left untouched to ease the transition. I plan to commit this in 3 steps, to ease a possible