From mboxrd@z Thu Jan 1 00:00:00 1970 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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fridaylinux-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=3gVBpLeQ1Tl3SYFPqnGjA48AWENg5QrgPAsakUk6Z5w=; b=n4adcN3TKcnfYMUOGsVSsHVECG7wumGyajGRlKI7QeTY3vZ/sUHhFrIcU57AM2M9Q6 xMXoWPstl7sJfS83suzW+VQ6gJLYMYglpRD2Vto6hADl/iGAw3aQWZIVw7F55k3i0F5u yEa9Sj99d0FQ6zU7GSRsUCacXK0lnoG1419H7PB+rx59gihaya+iai8L6OkOHrhITA/W hNngKPKB3SAenMKQkQsF4oRymAfhP4+LgsToyJsOI0MUjQkRvKRwdrTGjR9AgS9QxOub KFnZiVp6UEUW0KFkaFViIVvU8yqGSPB0E7bZ2LofLxX6gHIhOGq6WWBDrqTJ3eNY9uJY qGrA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=3gVBpLeQ1Tl3SYFPqnGjA48AWENg5QrgPAsakUk6Z5w=; b=SMYd0YVezhp+bQ0bYJQLh8hmu2xjo0TBhqA1+1hXHlMlX2lPsF7aATwZT/yAPh0uRO 4KzS+LzmytZgmLJZEWV0e0Eh7v706ugxzxXrctvFJqDkpilXj8SMppXOd3ShA7YXGGWO WGYqIdfMjv0+v4sT/OpcM4zplpLGH9KHPg5qYDVF9AEIRlHdoY7nLAU7ZhJL2qWW+uBw ovAKHYH9cOtHoy5u/94SpMbihYbsLtGYjcnq19hHSH2FWrHVvkPPEjy4wes5IfloFIYp c00Jx+vpmxk2wNH7ZdFuj1Ta1JcPRmXYmiTBZKCDRValGLC8+m5nT167V8lqoPV9pnfz Q+Fg== X-Gm-Message-State: AHPjjUiKIHJI0sJ2CAqiKkI3P9BIJ8UbmEodfGiBY2FfiCyupoCac1ef utN4R8js+5RpdRnhMz+G4VpX8g== X-Google-Smtp-Source: AOwi7QClf3UMLdGBo6qUR5ytD9/H9oDCDY4KrlvzYcSlzLvQaG83nolq1zaG0hKiBGWayJ5Q1Q43rQ== X-Received: by 10.98.18.18 with SMTP id a18mr9739349pfj.224.1506759530263; Sat, 30 Sep 2017 01:18:50 -0700 (PDT) Received: from yliu-home ([222.64.175.152]) by smtp.gmail.com with ESMTPSA id t17sm10237823pfi.31.2017.09.30.01.18.48 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 30 Sep 2017 01:18:48 -0700 (PDT) Date: Sat, 30 Sep 2017 16:18:46 +0800 From: Yuanhan Liu To: "Tan, Jianfeng" Cc: "dev@dpdk.org" , "maxime.coquelin@redhat.com" , "mtetsuyah@gmail.com" 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 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) Subject: Re: [dpdk-dev] [PATCH 10/12] vhost: support to kick in secondary process X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Sep 2017 08:18:51 -0000 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