From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yuanhan Liu Subject: Re: [PATCH] vhost: Fix retrieval of numa information in PMD Date: Wed, 6 Apr 2016 14:17:58 +0800 Message-ID: <20160406061758.GW3080@yliu-dev.sh.intel.com> References: <1459872587-11655-1-git-send-email-ciara.loftus@intel.com> <57049F5C.5080604@intel.com> <20160406054406.GV3080@yliu-dev.sh.intel.com> <5704A73F.1040302@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Ciara Loftus , dev@dpdk.org, mukawa@igel.co.jp To: "Tan, Jianfeng" Return-path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 8A1A32C1A for ; Wed, 6 Apr 2016 08:16:21 +0200 (CEST) Content-Disposition: inline In-Reply-To: <5704A73F.1040302@intel.com> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Wed, Apr 06, 2016 at 02:05:51PM +0800, Tan, Jianfeng wrote: > > > On 4/6/2016 1:44 PM, Yuanhan Liu wrote: > >On Wed, Apr 06, 2016 at 01:32:12PM +0800, Tan, Jianfeng wrote: > >>Hi, > >> > >>Just out of interest, seems that the message handling thread which runs > >>new_device() is pthread_create() from the thread which calls the > >>dev_start(), usually master thread, right? But it's not necessary to be the > >>master thread to poll pkts from this vhost port, right? So what's the > >>significance to record the numa_node information of message handling thread > >>here? Shall we make the decision of numa_realloc based on the final PMD > >>thread who is responsible for polling this vhost port? > >It doesn't matter on which core we made the decision: the result > >would be same since we are querying the numa node info of the > >virtio_net dev struct. > > OK, according to your hint, read numa_realloc() again, it's to keep *dev > (struct virtio_net), *dev->virtqueue[], on the same numa socket of shared > memory with virtio? Sort of, and I'm guessing that the comment have already made it clear? /* * Reallocate virtio_dev and vhost_virtqueue data structure to make them on the * same numa node as the memory of vring descriptor. */ > > And numa_realloc() is called in vhost_set_vring_addr(), which is after > new_device()? It's actually before new_device(). --yliu