netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Graf <tgraf@redhat.com>
To: Ben Pfaff <blp@nicira.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, 04 Dec 2013 22:48:36 +0100	[thread overview]
Message-ID: <529FA334.4050202@redhat.com> (raw)
In-Reply-To: <20131204180818.GB16940@nicira.com>

On 12/04/2013 07:08 PM, Ben Pfaff wrote:
> On Wed, Dec 04, 2013 at 06:20:53PM +0100, Thomas Graf wrote:
>> How about we limit the number of mmaped sockets to a configurable
>> maximum that defaults to 16 or 32?
>
> Maybe you mean that we should only mmap some of the sockets that we
> create.  If so, this approach is reasonable,

Yes, that's what I meant.

> if one can come up with a
> good heuristic to decide which sockets should be mmaped.  One place
> one could start would be to mmap the sockets that correspond to
> physical ports.

That sounds reasonable, e.g. I would assume ports connected to tap
devices to produce only a limited number of upcalls anyway.

We can also consider enabling/disabling mmaped rings on demand based
on upcall statistics.

> Maybe you mean that we should only create 16 or 32 Netlink sockets,
> and divide the datapath ports among those sockets.  OVS once used this
> approach.  We stopped using it because it has problems with fairness:
> if two ports are assigned to one socket, and one of those ports has a
> huge volume of new flows (or otherwise sends a lot of packets to
> userspace), then it can drown out the occasional packet from the other
> port.  We keep talking about new, more flexible approaches to
> achieving fairness, though, and maybe some of those approaches would
> allow us to reduce the number of sockets we need, which would make
> mmaping all of them feasible.

I can see the fairness issue. It will result in a large amount of open
file descriptors though. I doubt this will scale much beyond 16K ports,
correct?

  reply	other threads:[~2013-12-04 21:48 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
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 [this message]
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=529FA334.4050202@redhat.com \
    --to=tgraf@redhat.com \
    --cc=blp@nicira.com \
    --cc=dborkman@redhat.com \
    --cc=dev@openvswitch.org \
    --cc=ffusco@redhat.com \
    --cc=fleitner@redhat.com \
    --cc=jesse@nicira.com \
    --cc=netdev@vger.kernel.org \
    --cc=xiyou.wangcong@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
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;
as well as URLs for NNTP newsgroup(s).