From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Tan, Jianfeng" Subject: Re: [PATCH 10/12] vhost: support to kick in secondary process Date: Sat, 30 Sep 2017 18:50:41 +0800 Message-ID: <41f24385-b540-529e-2d96-8a274a4f9ad8@intel.com> 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> <20170930081846.GC6251@yliu-home> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Cc: "dev@dpdk.org" , "maxime.coquelin@redhat.com" , "mtetsuyah@gmail.com" To: Yuanhan Liu Return-path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id DB066101B for ; Sat, 30 Sep 2017 12:50:44 +0200 (CEST) In-Reply-To: <20170930081846.GC6251@yliu-home> 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 9/30/2017 4:18 PM, Yuanhan Liu wrote: > 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? I'll give it a try, thanks! Thanks, Jianfeng > > --yliu >> Instead, can we propose something like process_id to index array located at shared memory? >> >> Thanks, >> Jianfeng