From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 11AAC2C0C for ; Wed, 6 Apr 2016 08:32:54 +0200 (CEST) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga103.fm.intel.com with ESMTP; 05 Apr 2016 23:32:54 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,447,1455004800"; d="scan'208";a="681571405" Received: from shwdeisgchi083.ccr.corp.intel.com (HELO [10.239.67.193]) ([10.239.67.193]) by FMSMGA003.fm.intel.com with ESMTP; 05 Apr 2016 23:32:53 -0700 To: Yuanhan Liu 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> <20160406061758.GW3080@yliu-dev.sh.intel.com> Cc: Ciara Loftus , dev@dpdk.org, mukawa@igel.co.jp From: "Tan, Jianfeng" Message-ID: <5704AD94.1050803@intel.com> Date: Wed, 6 Apr 2016 14:32:52 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.7.1 MIME-Version: 1.0 In-Reply-To: <20160406061758.GW3080@yliu-dev.sh.intel.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit 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:32:55 -0000 On 4/6/2016 2:17 PM, Yuanhan Liu wrote: > 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 Yes, exactly as you said. Thanks for explanation! Jianfeng