From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id BCB4DA0C40; Fri, 25 Jun 2021 09:26:33 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 16C1540E5A; Fri, 25 Jun 2021 09:26:31 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mails.dpdk.org (Postfix) with ESMTP id 555C740E46 for ; Fri, 25 Jun 2021 09:26:29 +0200 (CEST) IronPort-SDR: RoP8sMNYQEhDfKhAqY4V1RzMtpAO6p0dsGxrsexOetOTmpYWnfUs2w14Umoq+OiX68tlv7WWpZ JzHBeFsgTTIg== X-IronPort-AV: E=McAfee;i="6200,9189,10025"; a="194768232" X-IronPort-AV: E=Sophos;i="5.83,298,1616482800"; d="scan'208";a="194768232" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Jun 2021 00:26:28 -0700 IronPort-SDR: ROmG9NklJ70k+pwTm2Sr0kNSRkzw3g4oHlkespAZIKAi88SeMYECLt6VI9omoiX7vbo7+1BACP pNcpygEvI83A== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.83,298,1616482800"; d="scan'208";a="488083630" Received: from fmsmsx606.amr.corp.intel.com ([10.18.126.86]) by orsmga001.jf.intel.com with ESMTP; 25 Jun 2021 00:26:28 -0700 Received: from fmsmsx611.amr.corp.intel.com (10.18.126.91) by fmsmsx606.amr.corp.intel.com (10.18.126.86) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.4; Fri, 25 Jun 2021 00:26:27 -0700 Received: from fmsmsx606.amr.corp.intel.com (10.18.126.86) by fmsmsx611.amr.corp.intel.com (10.18.126.91) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.4; Fri, 25 Jun 2021 00:26:26 -0700 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx606.amr.corp.intel.com (10.18.126.86) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.4 via Frontend Transport; Fri, 25 Jun 2021 00:26:26 -0700 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (104.47.59.168) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2242.4; Fri, 25 Jun 2021 00:26:25 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kucJnoJC9TK3kKX3lMpFFtvfvill5QkEDnqEQ6lIXefK3VAmv1zBhzvtG2+6quQXcqr+9tkW4eAZj4+o1v5vidhtgX/on9e7b51lcF+O/OScdP6K5LoIuYp/FaSFeQAddPSdaSzzU+w/9wy7fwLvkN7NhuJ39S4ZOBdUMBuKm36UtZ5C/8aqqklD5YAwTO/tYQMrl0X4NVHU6sermzNUByJkOrAtyQ7AThKtAKg6L98YD/mDe3BFc273Gr8JL1awkFBYy42ie8xlSm4uiVUpIEuWmovg1YQNJDJ14I6cCrqCu9MNFS64/wPOLx+zvCvSlrEhZXFGxl3qk3TfGU4NhQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=LCCndTIMrCqbSNUd5e3f5qTbH4Nr6aykC67kJamTguw=; b=De939cv+7HYHut5AyauV78rGHc1kD5iFN01poXsqVwfU9/IICyiyrnULSzt+SqLt0Dfo0nmOirvRVGRn8PsVqwRM9aIFSlfsqFBd9Q0My+Vdchfp/bgP2QUXXXI07SCUQevJdqkuUeEWu8AiNrw7N9f5mQkf0wXXuA4jlXlUH9UubRtLpV7Qetfhakd2AiczpF4ik5Put3NI2vxmSIBrt2jCYolmNG1CyOez17tIpjGMtCP14eM36OfggLBvTUdz8F5c6GHIis52vj+jwCqTq/varD5FJ/lFnSZkEEhvd4I62BDluLy8JWon6u/xUrpMQo47CVCx8Z0nM8OwHOQc8A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=LCCndTIMrCqbSNUd5e3f5qTbH4Nr6aykC67kJamTguw=; b=IU99z3hUIv1QZO4rgAMGbQQdrMNw5DsFnyJur8th9tuL3XS/0/bQYcyCQwLHd2FTwr8L9fz7bm8IE38rkqiAV+4TCaCVk6Eq0YzXEx1kAjWWt70o0MepFctTcEhBM0wBlnhtejLvmlaSTUePGTkX5X2Zy8xkhIsaR7kQdOYxpDo= Received: from MN2PR11MB4063.namprd11.prod.outlook.com (2603:10b6:208:13f::22) by MN2PR11MB4728.namprd11.prod.outlook.com (2603:10b6:208:261::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4264.19; Fri, 25 Jun 2021 07:26:25 +0000 Received: from MN2PR11MB4063.namprd11.prod.outlook.com ([fe80::d447:3a7a:aad7:4d32]) by MN2PR11MB4063.namprd11.prod.outlook.com ([fe80::d447:3a7a:aad7:4d32%7]) with mapi id 15.20.4264.023; Fri, 25 Jun 2021 07:26:25 +0000 From: "Xia, Chenbo" To: Maxime Coquelin , "dev@dpdk.org" , "david.marchand@redhat.com" Thread-Topic: [PATCH v6 5/7] vhost: improve NUMA reallocation Thread-Index: AQHXZErbyf9QE1yqzkCSSWz4W9lRV6skPDZw Date: Fri, 25 Jun 2021 07:26:24 +0000 Message-ID: References: <20210618140357.255995-1-maxime.coquelin@redhat.com> <20210618140357.255995-6-maxime.coquelin@redhat.com> In-Reply-To: <20210618140357.255995-6-maxime.coquelin@redhat.com> Accept-Language: en-US, zh-CN Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: redhat.com; dkim=none (message not signed) header.d=none;redhat.com; dmarc=none action=none header.from=intel.com; x-originating-ip: [192.102.204.51] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 391c36b4-654d-40e9-b78b-08d937aa8a1f x-ms-traffictypediagnostic: MN2PR11MB4728: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:7219; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 8/BUZcjwJddvr4b9GQ+RpLndDph6hJU4HOLwZIdVQOVTB4xfUbdha0xG16O7t21jfCZI+jouXolfSq/Op/4zyWkJExV1knz+0nsGykwteVsT2CgszzewpzqfEs/KAYRQiS8pqP/n+vzdY8xVzGfeaeN5CQnnDFFYcxvBNPCN7HfuEoc3up+OczG4a7ZQ2KKAeBS8DVS6Au83AXBT4tYgXySi0mMVr10lDF7FR+XiR84Vd1MJYF62nI6EdD5gqFlPMN3kWjJ5kRgpDybvmgxXkHSLPK2TNn/GDXDli+lCGHBVBUUSLcf0f1mt2QX6UWMg9dKYHQ2bsyXfWdqlbn+Df3lIPTVrj59enJJtw0H4zlVEbzmfVXApngmyui9UfQnwu4TqXNRxm+fKKszk9NWe8KULSyJoFZuknfGVkzVX1wMciC46bX2n+8HJIdEXIU4Q2QJuryYrretiRZyYREKYz5J2YkqEp6IwwJmxoZ5+Txafh/oWxPNZdHm5dd6zcS1Bq+kQpABm4/7wKMb+64ZrWntWF1uHdKm+apqOJxZwLYvXKvfOSOYxIm/guKlQCj3qJYWIX0kDtZko78dOQ/cvo04A/E8Ry8TSjjYFzO7YWTtS1SnwsQxoynXZ9bGXBEx9/hBMPb3gByjh3f04rRoSnQ== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MN2PR11MB4063.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(39860400002)(396003)(136003)(346002)(376002)(366004)(6506007)(7696005)(5660300002)(55016002)(53546011)(86362001)(9686003)(122000001)(38100700002)(71200400001)(66476007)(66556008)(186003)(66446008)(64756008)(316002)(26005)(52536014)(8936002)(33656002)(8676002)(2906002)(83380400001)(110136005)(478600001)(66946007)(76116006); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?utf-8?B?T044N3V5Q3lOZlhjeUNkN0hFVmFvT21SaWdJUzdWR1FnTlFUV21vaVhVL3h2?= =?utf-8?B?NThVeENRVWtHZ3lTQU56R1pQdnV1TkpMSGdXL2JUakFtSzR1Yi9IUW4xeldL?= =?utf-8?B?SDN6ODdoSy85V3RsdUc3WnFZcEh3ZWZ5ZXNyeHY0N0NpelppUDFuTlYrbWsx?= =?utf-8?B?SVBJSjBkN2RqSW1LTXNHRHFBcEd3VmpEaFRpWVV6eFV3b0NVUlN1b2k2OExv?= =?utf-8?B?cUM5Z1UyZDdRVGU2UUlzNnFFUjNVMGpUNFk0Ykx4YWtrUWk4MkE2YmNQM0Y4?= =?utf-8?B?SlBEaHYwRFVHbEdQejNXVEdlSkU0UTR2V1c1a2ZVKzZla3oyc0VQSDVDZzZj?= =?utf-8?B?VFhkSzdTWmkyckY2UXlobHRaZDhxMGZSVjFXaUR0MUtFS20xajhEa2VuUG1W?= =?utf-8?B?ZGVGWkkrYjREUzNmVzF6QUp0WHNDK2xmYTNEbVNvNmNocXYxbkNvQThlQ3hC?= =?utf-8?B?dk1rVGF2cG0yWE5oY0JYTWYyRk1XUjJvWmxDTm4vQ0o2TlZVeEhLSVd3Z0da?= =?ut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VWFTMG1QQmgwWCtnTnUr?= =?utf-8?B?eHR2WDg3c0E4MDZrN25CM3JuS2psWGxQYnNvQTEvckFBUm9naEtvNy9VY0lE?= =?utf-8?B?T1hSWmpWSkRlek52MmxkYVlVclpLejV4RFVzUGdETTUrZXRCQ0w0TW4xZ1FC?= =?utf-8?B?ZkJqL3kwNmZLWWYxeFZ1cDdHOGpWdjhnYS85dFJkdEpLNlFQWm50a1pSeS9h?= =?utf-8?B?RnU5TzNBcElPS3NxSmsyRlRyQXZDVjhLclhzNHZOZFB4U3gzcnZhY2pzRnY2?= =?utf-8?B?bzNmZThNNitpaTV1WVNBZDcrQ0k5ZHlsT0tTV25LSkJEcndzK3dtamlUZUor?= =?utf-8?Q?ev4tDgzOoR1+R84BN77y8vMBE26v6sjBsS/uF9E?= x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MN2PR11MB4063.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 391c36b4-654d-40e9-b78b-08d937aa8a1f X-MS-Exchange-CrossTenant-originalarrivaltime: 25 Jun 2021 07:26:24.9369 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: +OTAxgtW91HIHNWrU2varPtQhHSz/0t9ohkOcgxoWSngf7bQGAv9Mi/55PMnub1pJz3KQ9Yj/lNbuhOIK2cgcA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR11MB4728 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH v6 5/7] vhost: improve NUMA reallocation X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List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