From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yuanhan Liu Subject: Re: [PATCH 10/12] vhost: support to kick in secondary process Date: Sat, 30 Sep 2017 16:18:46 +0800 Message-ID: <20170930081846.GC6251@yliu-home> References: <1503654052-84730-1-git-send-email-jianfeng.tan@intel.com> <1503654052-84730-11-git-send-email-jianfeng.tan@intel.com> <20170921033323.GA2251@yliu-home> <59f2bfc0-91ee-b276-68e3-563e5b5af89b@intel.com> <20170921091759.GE2251@yliu-home> <20170927093607.GJ2251@yliu-home> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: "dev@dpdk.org" , "maxime.coquelin@redhat.com" , "mtetsuyah@gmail.com" To: "Tan, Jianfeng" Return-path: Received: from mail-pg0-f50.google.com (mail-pg0-f50.google.com [74.125.83.50]) by dpdk.org (Postfix) with ESMTP id 20ACD199AF for ; Sat, 30 Sep 2017 10:18:50 +0200 (CEST) Received: by mail-pg0-f50.google.com with SMTP id d8so890909pgt.4 for ; Sat, 30 Sep 2017 01:18:50 -0700 (PDT) Content-Disposition: inline In-Reply-To: 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 Thu, Sep 28, 2017 at 08:09:38AM +0000, Tan, Jianfeng wrote: > > Actually, the key (and typical) issue of multi-process here is the fds are > > process specific, while they are stored in the shared memory. That means > > only one will take effect eventually. Worse, the old ones are lost. > > > > So, I think to make it right in this case, you should move the fds from > > the shared memory and store them in the memory of the corresponding > > process. > > If that's done, all processes could have its own valid fds, then every > > process could do the kick (if that's really necessary). > > > > You could check following commit for more info. > > 553f45932fb7 ("net/virtio: store PCI operators pointer locally") > > Have referred to the above solution, but seems not feasible for this case since there are too many queues. For example, if we define an array like this: > int vhost_callfds[index_by_vid][index_by_queue_id]; > The size would be MAX_VHOST_DEVICE * VHOST_MAX_VRING * 8Byte = 2Mbyte. I think you can do it in a dynamic way, like what we did for vhost_dev allocation? --yliu > > Instead, can we propose something like process_id to index array located at shared memory? > > Thanks, > Jianfeng