From mboxrd@z Thu Jan 1 00:00:00 1970 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) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga104.fm.intel.com with ESMTP; 05 Apr 2016 23:16:20 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,447,1455004800"; d="scan'208";a="79937182" Received: from yliu-dev.sh.intel.com (HELO yliu-dev) ([10.239.67.191]) by fmsmga004.fm.intel.com with ESMTP; 05 Apr 2016 23:16:19 -0700 Date: Wed, 6 Apr 2016 14:17:58 +0800 From: Yuanhan Liu To: "Tan, Jianfeng" Cc: Ciara Loftus , dev@dpdk.org, mukawa@igel.co.jp 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 Content-Disposition: inline In-Reply-To: <5704A73F.1040302@intel.com> User-Agent: Mutt/1.5.23 (2014-03-12) Subject: Re: [dpdk-dev] [PATCH] vhost: Fix retrieval of numa information in PMD X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Apr 2016 06:16:22 -0000 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