public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Ben Pfaff <blp@nicira•com>
To: Thomas Graf <tgraf@redhat•com>
Cc: jesse@nicira•com, dev@openvswitch•org, netdev@vger•kernel.org,
	dborkman@redhat•com, ffusco@redhat•com, fleitner@redhat•com,
	xiyou.wangcong@gmail•com
Subject: Re: [PATCH openvswitch v3] netlink: Implement & enable memory mapped netlink i/o
Date: Wed, 4 Dec 2013 08:33:28 -0800	[thread overview]
Message-ID: <20131204163328.GE30874@nicira.com> (raw)
In-Reply-To: <1d9af26b2798901c68ae9aef704d6313b71d3287.1386069453.git.tgraf@redhat.com>

On Tue, Dec 03, 2013 at 12:19:02PM +0100, Thomas Graf wrote:
> Based on the initial patch by Cong Wang posted a couple of months
> ago.
> 
> This is the user space counterpart needed for the kernel patch
> '[PATCH net-next 3/8] openvswitch: Enable memory mapped Netlink i/o'
> 
> Allows the kernel to construct Netlink messages on memory mapped
> buffers and thus avoids copying. The functionality is enabled on
> sockets used for unicast traffic.
> 
> Further optimizations are possible by avoiding the copy into the
> ofpbuf after reading.
> 
> Signed-off-by: Thomas Graf <tgraf@redhat•com>

If I'm doing the calculations correctly, this mmaps 8 MB per ring-based
Netlink socket on a system with 4 kB pages.  OVS currently creates one
Netlink socket for each datapath port.  With 1000 ports (a moderate
number; we sometimes test with more), that is 8 GB of address space.  On
a 32-bit architecture that is impossible.  On a 64-bit architecture it
is possible but it may reserve an actual 8 GB of RAM: OVS often runs
with mlockall() since it is something of a soft real-time system (users
don't want their packet delivery delayed to page data back in).

Do you have any thoughts about this issue?

  parent reply	other threads:[~2013-12-04 16:33 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-03 11:19 [PATCH openvswitch v3] netlink: Implement & enable memory mapped netlink i/o Thomas Graf
     [not found] ` <1d9af26b2798901c68ae9aef704d6313b71d3287.1386069453.git.tgraf-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2013-12-04  1:54   ` 答复: " Zhuangyuxin
     [not found]     ` <9C2DE4B8FE85984BA1B0581235F6B2ED0F5D440A-tJwL4pWccCZdGU6diIvhbAK1hpo4iccwjNknBlVQO8k@public.gmane.org>
2013-12-04  9:08       ` Thomas Graf
2013-12-04 16:33 ` Ben Pfaff [this message]
2013-12-04 17:20   ` Thomas Graf
     [not found]     ` <529F6475.3090903-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2013-12-04 17:56       ` Kais Belgaied
2013-12-04 18:08     ` Ben Pfaff
2013-12-04 21:48       ` Thomas Graf
2013-12-04 22:20         ` Jesse Gross
2013-12-05 22:08           ` Thomas Graf
2013-12-05 22:54             ` Ben Pfaff

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20131204163328.GE30874@nicira.com \
    --to=blp@nicira$(echo .)com \
    --cc=dborkman@redhat$(echo .)com \
    --cc=dev@openvswitch$(echo .)org \
    --cc=ffusco@redhat$(echo .)com \
    --cc=fleitner@redhat$(echo .)com \
    --cc=jesse@nicira$(echo .)com \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=tgraf@redhat$(echo .)com \
    --cc=xiyou.wangcong@gmail$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox