Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 4 Feb 2016 16:00:30 +0300
From:      Slawa Olhovchenkov <slw@zxy.spb.ru>
To:        Luigi Rizzo <rizzo@iet.unipi.it>
Cc:        Adrian Chadd <adrian.chadd@gmail.com>, "stable@freebsd.org" <stable@freebsd.org>
Subject:   Re: 82576 + NETMAP + VLAN
Message-ID:  <20160204130029.GC88527@zxy.spb.ru>
In-Reply-To: <20160202204446.GQ88527@zxy.spb.ru>
References:  <20151018185639.GF42243@zxy.spb.ru> <CAJ-VmonO8ok=twgBGVMBiAs=AyRs4LUoDX6pGBtWStvndGKGzg@mail.gmail.com> <20151018210049.GT6469@zxy.spb.ru> <CAJ-Vmonfxz5vjVHqp6gS97mhnU10SLgohRA35O8MQLUzHvcsrw@mail.gmail.com> <20151022163519.GF6469@zxy.spb.ru> <CAJ-Vmok56uBJgJh4Bwr7yjNwsigU=ySBJ08H26caODAAxXNLRA@mail.gmail.com> <CA%2BhQ2%2Bg0ggpS%2BE5nOpON66efs7cwsed=NvaKa=mzsg6FycGhiQ@mail.gmail.com> <20160202204446.GQ88527@zxy.spb.ru>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Feb 02, 2016 at 11:44:47PM +0300, Slawa Olhovchenkov wrote:

> On Thu, Oct 22, 2015 at 11:24:53AM -0700, Luigi Rizzo wrote:
> 
> > On Thu, Oct 22, 2015 at 11:12 AM, Adrian Chadd <adrian.chadd@gmail.com> wrote:
> > > On 22 October 2015 at 09:35, Slawa Olhovchenkov <slw@zxy.spb.ru> wrote:
> > >> On Sun, Oct 18, 2015 at 07:45:52PM -0700, Adrian Chadd wrote:
> > >>
> > >>> Heh, file a bug with luigi; it should be defined better inside netmap itself.
> > >>
> > >> I am CC: luigi.
> > >>
> > >> Next question: do kevent RX/TX sync?
> > >> In my setup I am need to manual NIOCTXSYNC/NIOCRXSYNC.
> > >
> > > Hi,
> > >
> > > Nope. kqueue() doesn't do the implicit sync like poll() does; it's
> > > just the notification path.
> > 
> > actually not. When the file descriptor is registered there
> > is an implicit sync, and there is another one when an event
> > is posted for the file descriptor.
> > 
> > unless there are bugs, of course.
> 
> I found strange behaivor:
> 
> 1. open netmap and register in main thread
> 2. kevent register in different thread
> 3. result: got event by kevent but no ring sinc (all head,tail,cur
> still 0).
> 
> Is this normal? Or is this bug?
> 
> open and registering netmap in same thread as kevent resolve this.

Also, kevent+netmap deadlocked for me:

  PID    TID COMM             TDNAME           KSTACK                       
 1095 100207 addos            -                mi_switch+0xe1 sleepq_catch_signals+0xab sleepq_timedwait_sig+0x10 _sleep+0x238 kern_nanosleep+0x10e sys_nanosleep+0x51 amd64_syscall+0x40f Xfast_syscall+0xfb 
 1095 100208 addos            worker#0         mi_switch+0xe1 sleepq_catch_signals+0xab sleepq_wait_sig+0xf _sleep+0x27d kern_kevent+0x401 sys_kevent+0x12a amd64_syscall+0x40f Xfast_syscall+0xfb 
 1095 100209 addos            worker#1         mi_switch+0xe1 turnstile_wait+0x42a __mtx_lock_sleep+0x26b knote+0x38 freebsd_selwakeup+0x8b netmap_notify+0x55 netmap_pipe_txsync+0x156 netmap_poll+0x400 netmap_knrw+0x6e kqueue_register+0x799 kern_kevent+0x158 sys_kevent+0x12a amd64_syscall+0x40f Xfast_syscall+0xfb 
 1095 100210 addos            worker#2         mi_switch+0xe1 sleepq_catch_signals+0xab sleepq_wait_sig+0xf _sleep+0x27d kern_kevent+0x401 sys_kevent+0x12a amd64_syscall+0x40f Xfast_syscall+0xfb 
 1095 100211 addos            worker#NOIP      mi_switch+0xe1 sleepq_catch_signals+0xab sleepq_wait_sig+0xf _sleep+0x27d kern_kevent+0x401 sys_kevent+0x12a amd64_syscall+0x40f Xfast_syscall+0xfb 
 1095 100212 addos            balancer         mi_switch+0xe1 turnstile_wait+0x42a __mtx_lock_sleep+0x26b knote+0x38 freebsd_selwakeup+0x8b netmap_notify+0x2a netmap_pipe_rxsync+0x54 netmap_poll+0x774 netmap_knrw+0x6e kern_kevent+0x5cc sys_kevent+0x12a amd64_syscall+0x40f Xfast_syscall+0xfb 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20160204130029.GC88527>