From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Hemminger Subject: Re: [PATCH v6] vhost: allow for many vhost user ports Date: Wed, 21 Dec 2016 10:06:36 -0800 Message-ID: <20161221100636.71a27b22@xeon-e3> References: <1481729401-27546-1-git-send-email-jan.wickbom@ericsson.com> <1482313513-1709-1-git-send-email-yuanhan.liu@linux.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: dev@dpdk.org, Patrik Andersson , Jan Wickbom To: Yuanhan Liu Return-path: Received: from mail-pg0-f51.google.com (mail-pg0-f51.google.com [74.125.83.51]) by dpdk.org (Postfix) with ESMTP id 7C97F10CBB for ; Wed, 21 Dec 2016 19:06:44 +0100 (CET) Received: by mail-pg0-f51.google.com with SMTP id g1so48585782pgn.0 for ; Wed, 21 Dec 2016 10:06:44 -0800 (PST) In-Reply-To: <1482313513-1709-1-git-send-email-yuanhan.liu@linux.intel.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Wed, 21 Dec 2016 17:45:13 +0800 Yuanhan Liu wrote: > From: Jan Wickbom > > 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 > Signed-off-by: Jan Wickbom > Signed-off-by: Yuanhan Liu Why not epoll()? It scales much better. The old System V poll is just as bad with 1023 fd's.