Received: by 2002:a05:6a10:6006:0:0:0:0 with SMTP id w6csp1059084pxa; Fri, 28 Aug 2020 02:26:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwJBY/N3BgZS+sgr1c1gBKc04tiynYe3eTZiCI4IMAuCRHhvImwgrZYIg6KxTS4EWgyeK6K X-Received: by 2002:a17:906:3bc1:: with SMTP id v1mr819918ejf.233.1598606796763; Fri, 28 Aug 2020 02:26:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598606796; cv=none; d=google.com; s=arc-20160816; b=CwZ+WfbYWkYrpqkmhWOiTpnqWgUIG1/jw3/6AAON3T7o8df0D6aWupEI0RhOPHPGtB 8ZSgy35giQlTgTRNA/pUuz/04n8xZ3K2gW0p8gWZaVVQbhxLnIAVDb3Utq+8I6+WuWiU 53TVLTA61gto8dR5mPB4o/02x30UjF9fBb1QlaKkNF7mXS6hzmDSPB0RakN2lTwL1OLr 0p8lChDceH3lOXpOxr3N3r7TlJU0mHmb/2h2D3/xeSHuqs93X9vzLKVOWZgMU5KUqgpe 7fftVtt22F1qOPgN2FKAwPT8v8aoTs7UHrPzfaurTUsQOngWYJ+x9nGoyddfDvfnYk/U Ne6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from; bh=7SGwv1BHDbUk3iYtiJtPqpXok2bNOXX/lUqJkx5ew0o=; b=pl6IkAkAV+070gh5tOVdvy9dXLQT1e7B6tVLMjajE6cPpqAghGUP2rnCu+50/oYyaE oK2aWmWdd+Bt1c2hlc0xaIO7EjfSMwoI5tNvQdZjJ1IXMQAur+L8fKlZ8+s9KGcuMXmz tdnfrsp3+giLDfkCtUwkMnXIHop4isy38cpy2EyD4ojx2JL2vtezYMonpyW0Vcx3lA/I qFPffReMqxUMy1FmWmiCsu7hUCRCLM1MqukeW5vUzdJJnSLgWFOv8lNMSlge+uzzhiJe uPGnrpL/CsRdVCUfYHE2Z7aSsb2ZWnRwb22ZI9R9p8PNcY1BKT9ZHnK7fBy6xG6ET0QL yK/A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h21si197884edw.233.2020.08.28.02.26.14; Fri, 28 Aug 2020 02:26:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728898AbgH1JXV (ORCPT + 99 others); Fri, 28 Aug 2020 05:23:21 -0400 Received: from szxga08-in.huawei.com ([45.249.212.255]:42210 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728016AbgH1JXU (ORCPT ); Fri, 28 Aug 2020 05:23:20 -0400 Received: from DGGEML403-HUB.china.huawei.com (unknown [172.30.72.56]) by Forcepoint Email with ESMTP id 09FA52622758182B89DD; Fri, 28 Aug 2020 17:23:17 +0800 (CST) Received: from DGGEML524-MBX.china.huawei.com ([169.254.1.71]) by DGGEML403-HUB.china.huawei.com ([fe80::74d9:c659:fbec:21fa%31]) with mapi id 14.03.0487.000; Fri, 28 Aug 2020 17:23:09 +0800 From: "Maoming (maoming, Cloud Infrastructure Service Product Dept.)" To: Peter Xu CC: "linux-kernel@vger.kernel.org" , "kvm@vger.kernel.org" , "alex.williamson@redhat.com" , "cohuck@redhat.com" , "Zhoujian (jay)" , "Huangweidong (C)" , "aarcange@redhat.com" , wangyunjian Subject: =?utf-8?B?562U5aSNOiDnrZTlpI06IFtQQVRDSCBWMl0gdmZpbyBkbWFfbWFwL3VubWFw?= =?utf-8?Q?:_optimized_for_hugetlbfs_pages?= Thread-Topic: =?utf-8?B?562U5aSNOiBbUEFUQ0ggVjJdIHZmaW8gZG1hX21hcC91bm1hcDogb3B0aW1p?= =?utf-8?Q?zed_for_hugetlbfs_pages?= Thread-Index: AQHWcePn246e6Z2xQkKwoyKqsTP1MqlI20CAgAGejeD//5OugIADObaQ Date: Fri, 28 Aug 2020 09:23:08 +0000 Message-ID: <8B561EC9A4D13649A62CF60D3A8E8CB28C2DBE7A@dggeml524-mbx.china.huawei.com> References: <20200814023729.2270-1-maoming.maoming@huawei.com> <20200825205907.GB8235@xz-x1> <8B561EC9A4D13649A62CF60D3A8E8CB28C2D9ABB@dggeml524-mbx.china.huawei.com> <20200826151509.GD8235@xz-x1> In-Reply-To: <20200826151509.GD8235@xz-x1> Accept-Language: en-US Content-Language: zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.174.151.129] Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org DQpPbiBXZWQsIEF1ZyAyNiwgMjAyMCBhdCAwMTo1Njo0M1BNICswMDAwLCBNYW9taW5nIChtYW9t aW5nLCBDbG91ZCBJbmZyYXN0cnVjdHVyZSBTZXJ2aWNlIFByb2R1Y3QgRGVwdC4pIHdyb3RlOg0K PiA+ICsJLyoNCj4gPiArCSAqIFVubGlrZSBUSFAsIHRoZSBzcGxpdHRpbmcgc2hvdWxkIG5vdCBo YXBwZW4gZm9yIGh1Z2V0bGIgcGFnZXMuDQo+ID4gKwkgKiBTaW5jZSBQR19yZXNlcnZlZCBpcyBu b3QgcmVsZXZhbnQgZm9yIGNvbXBvdW5kIHBhZ2VzLCBhbmQgdGhlIHB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