Re: the very first step towards MULTIPROCESSOR friendly PF

2015-09-04 Thread Alexandr Nedvedicky
Hello, after reading emails from Philip Guenther and Mark Kettenis, doing some RTFM on locking in OpenBSD kernel I have a new patch. I call it as a smp-step-0. Patch introduces a KERNEL_LOCK() to PF. Many dances with KERNEL_LOCK() happens in pf_test(). From future work point of view there are

Re: the very first step towards MULTIPROCESSOR friendly PF

2015-08-27 Thread Alexandr Nedvedicky
/large snip Assuming the locking in MULTIPROCESSOR goes like: interrupt grabs splsoftnet - ip_input - PF grabs KERNEL_LOCK() We need to take care of ioctl() call path and purge thread. Those need to get synchronize with packets using KERNEL_LOCK(). They should not to mess with

Re: the very first step towards MULTIPROCESSOR friendly PF

2015-08-27 Thread Martin Pieuchot
On 27/08/15(Thu) 14:19, Alexandr Nedvedicky wrote: /large snip Assuming the locking in MULTIPROCESSOR goes like: interrupt grabs splsoftnet - ip_input - PF grabs KERNEL_LOCK() We need to take care of ioctl() call path and purge thread. Those need to get synchronize with packets

Re: the very first step towards MULTIPROCESSOR friendly PF

2015-08-27 Thread Martin Pieuchot
On 27/08/15(Thu) 11:10, Alexandr Nedvedicky wrote: On Wed, Aug 26, 2015 at 06:12:10PM +0200, Mark Kettenis wrote: Date: Wed, 26 Aug 2015 17:30:14 +0200 From: Alexandr Nedvedicky alexandr.nedvedi...@oracle.com Hello, I'm not sure I got everything right in Calgary. So this patch

Re: the very first step towards MULTIPROCESSOR friendly PF

2015-08-27 Thread Alexandr Nedvedicky
On Wed, Aug 26, 2015 at 06:12:10PM +0200, Mark Kettenis wrote: Date: Wed, 26 Aug 2015 17:30:14 +0200 From: Alexandr Nedvedicky alexandr.nedvedi...@oracle.com Hello, I'm not sure I got everything right in Calgary. So this patch should roughly illustrates how I think we should start

the very first step towards MULTIPROCESSOR friendly PF

2015-08-26 Thread Alexandr Nedvedicky
Hello, I'm not sure I got everything right in Calgary. So this patch should roughly illustrates how I think we should start moving forward to make PF MULTIPROCESSOR friendly. It's quite likely my proposal/way is completely off, I'll be happy if you put me back to ground. The brief summary of