From: Yuanhan Liu <yuanhan.liu@linux.intel.com>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: dev@dpdk.org, Patrik Andersson <patrik.r.andersson@ericsson.com>,
Jan Wickbom <jan.wickbom@ericsson.com>
Subject: Re: [dpdk-dev] [PATCH v6] vhost: allow for many vhost user ports
Date: Thu, 22 Dec 2016 11:16:17 +0800 [thread overview]
Message-ID: <20161222031617.GX18991@yliu-dev.sh.intel.com> (raw)
In-Reply-To: <20161221100636.71a27b22@xeon-e3>
On Wed, Dec 21, 2016 at 10:06:36AM -0800, Stephen Hemminger wrote:
> On Wed, 21 Dec 2016 17:45:13 +0800
> Yuanhan Liu <yuanhan.liu@linux.intel.com> wrote:
>
> > From: Jan Wickbom <jan.wickbom@ericsson.com>
> >
> > Currently select() is used to monitor file descriptors for vhostuser
> > ports. This limits the number of ports possible to create since the
> > fd number is used as index in the fd_set and we have seen fds > 1023.
> > This patch changes select() to poll(). This way we can keep an
> > packed (pollfd) array for the fds, e.g. as many fds as the size of
> > the array.
> >
> > Also see:
> > http://dpdk.org/ml/archives/dev/2016-April/037024.html
> >
> > Reported-by: Patrik Andersson <patrik.r.andersson@ericsson.com>
> > Signed-off-by: Jan Wickbom <jan.wickbom@ericsson.com>
> > Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
>
> Why not epoll()? It scales much better. The old System V poll
> is just as bad with 1023 fd's.
Indeed, there was a plan to use epoll() to fix this issue. It's been
delayed long enough that Jan came up with a fix with poll recently.
I don't have strong preference to epoll() over poll, for following
reasons:
- epoll() is Linux only, though I don't know other platforms (mainly
*BSD) actually care vhost-user or not.
- epoll indeed scales much better, but I don't think the scale actually
matters a lot here: vhost-user negotiation normally happens once on
QEMU startup, and it's a short lived process. Both facts make it be
non-performance critical.
- 1023 is also not a big problem so far: vhost lib hardcodes the max
vhost devices we could support to be 1024 after all.
For above reasons and Jan already came up with a solution (that would
work for most platforms), I think I'm fine with this poll() so far.
--yliu
next prev parent reply other threads:[~2016-12-22 3:14 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-01 15:26 [dpdk-dev] [PATCH] " Jan Wickbom
2016-12-06 6:56 ` Yuanhan Liu
2016-12-06 11:42 ` Jan Wickbom
2016-12-07 7:43 ` Yuanhan Liu
2016-12-07 10:12 ` Yuanhan Liu
2016-12-07 13:23 ` Jan Wickbom
2016-12-08 5:50 ` Yuanhan Liu
2016-12-12 16:55 ` Jan Wickbom
2016-12-07 12:46 ` [dpdk-dev] [PATCH v2] " Jan Wickbom
2016-12-12 16:50 ` [dpdk-dev] [PATCH v3] " Jan Wickbom
2016-12-13 9:14 ` Yuanhan Liu
2016-12-13 13:15 ` Jan Wickbom
2016-12-13 13:19 ` [dpdk-dev] [PATCH v4] " Jan Wickbom
2016-12-14 3:25 ` Yuanhan Liu
2016-12-14 15:30 ` [dpdk-dev] [PATCH v5] " Jan Wickbom
2016-12-21 9:45 ` [dpdk-dev] [PATCH v6] " Yuanhan Liu
2016-12-21 18:06 ` Stephen Hemminger
2016-12-22 3:16 ` Yuanhan Liu [this message]
2017-01-12 4:05 ` Yuanhan Liu
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=20161222031617.GX18991@yliu-dev.sh.intel.com \
--to=yuanhan.liu@linux.intel.com \
--cc=dev@dpdk.org \
--cc=jan.wickbom@ericsson.com \
--cc=patrik.r.andersson@ericsson.com \
--cc=stephen@networkplumber.org \
/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).