Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 28 May 2014 21:45:33 -0700
From:      Adrian Chadd <adrian@freebsd.org>
To:        Fred Pedrisa <fredhps10@hotmail.com>
Cc:        freebsd-current <freebsd-current@freebsd.org>, Jan Bramkamp <crest@rlwinm.de>
Subject:   Re: KQueue vs Select (NetMap)
Message-ID:  <CAJ-VmomB=30k1T8u6p1Zd-eQhhkb1FygX87OrTpziHe0gYPC8w@mail.gmail.com>
In-Reply-To: <COL131-DS25BDC42287725E7A2D3344B0240@phx.gbl>
References:  <COL131-DS24C9EC384D928E5FEB71C3B0240@phx.gbl> <00c301cf7aee$b00caea0$10260be0$@rlwinm.de> <COL131-DS25BDC42287725E7A2D3344B0240@phx.gbl>

next in thread | previous in thread | raw e-mail | index | archive | help
The advantage is being able to include it in the rest of a kqueue IO
loop where it's doing other things.


-a

On 28 May 2014 20:53, Fred Pedrisa <fredhps10@hotmail.com> wrote:
> Hello,
>
> Yes, but kqueue support was added in recent commits as it says in the netmap
> changelog, is there any advantage ?
>
> -----Mensagem original-----
> De: owner-freebsd-current@freebsd.org
> [mailto:owner-freebsd-current@freebsd.org] Em nome de Jan Bramkamp
> Enviada em: quinta-feira, 29 de maio de 2014 00:30
> Para: freebsd-current@freebsd.org
> Assunto: Re: KQueue vs Select (NetMap)
>
>
> On 29.05.2014 03:04, Fred Pedrisa wrote:
>> Hey Guys,
>>
>>
>>
>> How does kQueue performs over select with netmap ?
> You are asking for a comparison between apples and oranges. Netmap is an API
> for high performance access to the low-level features of modern NICs. It
> works on batches of frames in hardware queues.
>
> The kqueue() and kevent() system calls are an event notification API. It is
> mostly used by application dealing with a large amount of non-blocking
> sockets (or other file descriptors). It reduces overhead inherent in
> select() and poll() by preserving state between calls. It also supports
> multiple types of events (read ready, write ready, timer expired, async i/o,
> etc.).
>
> Afaik the netmap pseudo-device supports only select() and poll(). This is no
> performance problem because every thread will only deal with a small number
> of file descriptors to netmap devices.
>
> Netmap is designed to bypass the FreeBSD IP stack (for most frames).
> Kqueue is designed to scale to many sockets per process within the FreeBSD
> IP stack.
> _______________________________________________
> freebsd-current@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-current
> To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"
>
> _______________________________________________
> freebsd-current@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-current
> To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAJ-VmomB=30k1T8u6p1Zd-eQhhkb1FygX87OrTpziHe0gYPC8w>