From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 12446C352A4 for ; Thu, 13 Feb 2020 00:33:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8EB84206B6 for ; Thu, 13 Feb 2020 00:33:41 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=eoitek.partner.onmschina.cn header.i=@eoitek.partner.onmschina.cn header.b="RUgAG1HA" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729190AbgBMAdl (ORCPT ); Wed, 12 Feb 2020 19:33:41 -0500 Received: from mail-bjbon0135.outbound.protection.partner.outlook.cn ([42.159.36.135]:15220 "EHLO CN01-BJB-obe.outbound.protection.partner.outlook.cn" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729152AbgBMAdl (ORCPT ); Wed, 12 Feb 2020 19:33:41 -0500 X-Greylist: delayed 28033 seconds by postgrey-1.27 at vger.kernel.org; Wed, 12 Feb 2020 19:33:34 EST ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CXKun2L3iZNFea/ti0kWFxcVK6soNW+obW6b9rGCauJfbTZrJfu3TJCjRDS1eaHqj6C3V/+SjlzeQe4Ht2Sw1prhraK3rP2AHGpefoUPD8iPUAlRlwoEm2C9DcVe4Q+f+JmvO0sOblPthGzfgfUaxbXtlosfvFtlXGstnZMuwD47xQcq+HL40Zps0cHbIJGuwhH8cJ+4CFcIdzQKRKw8LRCKmrF52CC1rwlLAZhYCMl/0H2jF/0k2bStbWFDJbXP6E7WbC9v80jBEPBT89/nJZZ3gseoFB1OSs2wwmvKjO9MUAD2Rk/6JifsP8KiB1jC3DnpzvLyG4G5V3fum0GQtg== 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=HHuL9EC4+kvYj95L40swOThSWcIsmLX2JvDC/1Yh0Bs=; b=GqNW7OA9UibYZ5XjjD/RSv35JmoBDd5BtRbf1dboyyaOUAgIEyRB53GOsrO+Na1iPzjCPoga6zp/3TUBIh+G3n5DkYzGWyb+S1BgX8h4lI0paIZf2L7IlOkPIWFx1RRZuy6ELvXOYCv4vdRWuykdUqGOW0TsktEK0EtETqDK8Gpqyq/spYbnIGVAwDaa1hLwUVlobyUmanDlyrnsHmPWDr4LCJo7cCuOR0ChvYg0QsfkS6t9vqoaDDMKaBu218BlWv2qxqQm+Si20kOLLMuj6awtJNu6MGXljxcY721cOsu/gwUMMANVRxE6F8sgZDPPP0qlPCJpRs7Szy1UQrdDCQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=eoitek.com; dmarc=pass action=none header.from=eoitek.com; dkim=pass header.d=eoitek.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eoitek.partner.onmschina.cn; s=selector1-eoitek-partner-onmschina-cn; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=HHuL9EC4+kvYj95L40swOThSWcIsmLX2JvDC/1Yh0Bs=; b=RUgAG1HApGIlHwcZnhwUuLkAbk1s8ys9z8KUknppnrGySPJOI3fHTsgEfL9/p3qLYCzkLhVyPfYY5KQepY+CBwEFqarRUyv/B6cjWfLx7/vtv9hQINPTUY/kROth5qk66+R5hoGK5behZpGY8Pz18+FzVXV+3j/iQJX46zEAMGw= Received: from SH0PR01MB0491.CHNPR01.prod.partner.outlook.cn (10.43.108.138) by SH0PR01MB0539.CHNPR01.prod.partner.outlook.cn (10.43.108.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2729.23; Thu, 13 Feb 2020 00:33:30 +0000 Received: from SH0PR01MB0491.CHNPR01.prod.partner.outlook.cn ([10.43.108.138]) by SH0PR01MB0491.CHNPR01.prod.partner.outlook.cn ([10.43.108.138]) with mapi id 15.20.2729.021; Thu, 13 Feb 2020 00:33:29 +0000 From: =?utf-8?B?Q2FydGVyIExpIOadjumAmua0sg==?= To: Jens Axboe CC: io-uring Subject: Re: [ISSUE] The time cost of IOSQE_IO_LINK Thread-Topic: [ISSUE] The time cost of IOSQE_IO_LINK Thread-Index: AQHV4cHhpj4vlwaolEOmZJk1sNu8q6gXy2CAgAB7iIA= Date: Thu, 13 Feb 2020 00:33:29 +0000 Message-ID: References: <9FEF0D34-A012-4505-AA4E-FF97CC302A33@eoitek.com> <8a3ee653-77ed-105d-c1c3-87087451914e@kernel.dk> In-Reply-To: <8a3ee653-77ed-105d-c1c3-87087451914e@kernel.dk> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=carter.li@eoitek.com; x-originating-ip: [183.202.132.40] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: fd9c5b37-22e7-4960-96b4-08d7b01c594a x-ms-traffictypediagnostic: SH0PR01MB0539: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:125; x-forefront-prvs: 031257FE13 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(346002)(376002)(366004)(189003)(199004)(328002)(329002)(76116006)(2616005)(63696004)(71200400001)(86362001)(95416001)(2906002)(8676002)(66476007)(66556008)(81166006)(81156014)(53546011)(186003)(66946007)(5660300002)(59450400001)(64756008)(966005)(26005)(66446008)(508600001)(36756003)(8936002)(4326008)(6916009)(85182001)(33656002);DIR:OUT;SFP:1102;SCL:1;SRVR:SH0PR01MB0539;H:SH0PR01MB0491.CHNPR01.prod.partner.outlook.cn;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; received-spf: None (protection.outlook.com: eoitek.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 7eTLk1apMLqlpzp5PElTOZdswiXcbQCxplCJobrub6Qawhc1ZzRxV+0SvbACU+SLdX3fJ7quPZyx8PSnV+voAjxKuptc7+R3ZxL7cVnLc1TLz8ET2BrkoUNa4nmYDwaGoiMyTsHIviWzc/ISbSBbFpYzn4rQ1vLcGUuFjNzjLL3lCeWqaX5iZgtcPL72cHxMM9Ey78f0VfNgso2p0mL4q8MKoLxU8oBTLBdQlLIoEDCWtzE0EmuwSEtzddYXPyVC9RVimj7AKnouCxrAPc8jETTRgmSciGviCqBiU/Q6QSV9qs0x9IfkvY2Bcyfhz78L9aYufXPctldgL66jJ+vzYRhHUhAKhpH3Hpl2uQVlhQzqKSqk0kJ848HPMi4tIv2jItuna5ihLb4vhQ1mhE4DJH8z46XPdhUg8Je9oPWkc9GQTXTp/cdHJ8ckktmp3bAhJKv2GOx3xhka4NQJsVcOFsNjJvVCtGkRYmwsiReWHnDDwRSeVtt1gt9MIddrhFOS1KipBMUv7TRwRS4fUNQLjw== x-ms-exchange-antispam-messagedata: MenGgxuIzWWWPqF2KGP6uTZjQidlTwtMr2gNfNzzGYKbbbyU3ZLjfetpQDpw/cVuqYLsTTmJpFPOuPjHz5UmbmY9m1FOctucyo9dFA7k2fejUNVrwdoxYmHCruCygKyW2746HJGXBHQK8M2CZ8vdeg== x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="utf-8" Content-ID: Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-OriginatorOrg: eoitek.com X-MS-Exchange-CrossTenant-Network-Message-Id: fd9c5b37-22e7-4960-96b4-08d7b01c594a X-MS-Exchange-CrossTenant-originalarrivaltime: 13 Feb 2020 00:33:29.9268 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: e3e4d1ca-338b-4a22-bdef-50f88bbc88d8 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: zZjQg7keN38DvuizakzEfseYZqdrxGCAz8W3rURpZTm8P1CNyN0xxpXwPXGTf/dMM90Y/01+C5vdP7iU1kJYlA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SH0PR01MB0539 Sender: io-uring-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: io-uring@vger.kernel.org VGhhbmtzIGZvciB5b3VyIHJlcGx5Lg0KDQpZb3UgYXJlIHJpZ2h0IHRoZSBub3AgaXNuJ3QgcmVh bGx5IGEgZ29vZCB0ZXN0IGNhc2UuIEJ1dCBJIGFjdHVhbGx5DQpmb3VuZCB0aGlzIGlzc3VlIHdo ZW4gYmVuY2htYXJraW5nIG15IGVjaG8gc2VydmVyLCB3aGljaCBkaWRuJ3QgdXNlDQpOT1Agb2Yg Y291cnNlLg0KDQpUZXN0IGNhc2UgYXR0YWNoZWQgYmVsb3cuIFVzZSBydXN0X2VjaG9fYmVuY2gg Zm9yIGJlbmNobWFya2luZy4NCmh0dHBzOi8vZ2l0aHViLmNvbS9oYXJhbGRoL3J1c3RfZWNob19i ZW5jaA0KDQoNCiQgZ2NjIGxpbmtfcmVjdi5jIC1vIGxpbmtfcmVjdiAtbHVyaW5nIC1PMyAtRFVT RV9MSU5LPTANCiQgLi9saW5rX3JlY3YgMTIzNDUNCiQgY2FyZ28gcnVuIC0tcmVsZWFzZSAjIE9u IGFub3RoZXIgY29uc29sZQ0KQmVuY2htYXJraW5nOiAxMjcuMC4wLjE6MTIzNDUNCjUwIGNsaWVu d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ICAgIHN0cnVjdCBjb25uX2luZm8gY29ubl9pOw0KICAg ICAgICAgICAgbWVtY3B5KCZjb25uX2ksICZjcWUtPnVzZXJfZGF0YSwgc2l6ZW9mKGNvbm5faSkp Ow0KICAgICAgICAgICAgaW50IHJlc3VsdCA9IGNxZS0+cmVzOw0KDQogICAgICAgICAgICBzd2l0 Y2ggKGNvbm5faS50eXBlKSB7DQogICAgICAgICAgICBjYXNlIEFDQ0VQVDoNCiNpZiBVU0VfTElO Sw0KICAgICAgICAgICAgICAgIGFkZF9wb2xsKHJlc3VsdCwgUE9MTElOLCBJT1NRRV9JT19MSU5L KTsNCiAgICAgICAgICAgICAgICBhZGRfc29ja2V0X3JlYWQocmVzdWx0LCBNQVhfTUVTU0FHRV9M RU4sIGJ1ZnMpOw0KI2Vsc2UNCiAgICAgICAgICAgICAgICBhZGRfcG9sbChyZXN1bHQsIFBPTExJ TiwgMCk7DQojZW5kaWYNCiAgICAgICAgICAgICAgICBhZGRfYWNjZXB0KHNvY2tfbGlzdGVuX2Zk LCAoc3RydWN0IHNvY2thZGRyICopJmNsaWVudF9hZGRyLCAmY2xpZW50X2xlbik7DQogICAgICAg ICAgICAgICAgYnJlYWs7DQoNCiNpZiAhVVNFX0xJTksNCiAgICAgICAgICAgIGNhc2UgUE9MTDoN CiAgICAgICAgICAgICAgICBhZGRfc29ja2V0X3JlYWQoY29ubl9pLmZkLCBNQVhfTUVTU0FHRV9M RU4sIGJ1ZnMpOw0KICAgICAgICAgICAgICAgIGJyZWFrOw0KI2VuZGlmDQoNCiAgICAgICAgICAg IGNhc2UgUkVBRDoNCiAgICAgICAgICAgICAgICBpZiAoX19idWlsdGluX2V4cGVjdChyZXN1bHQg PD0gMCwgMCkpIHsNCiAgICAgICAgICAgICAgICAgICAgc2h1dGRvd24oY29ubl9pLmZkLCBTSFVU X1JEV1IpOw0KICAgICAgICAgICAgICAgIH0gZWxzZSB7DQogICAgICAgICAgICAgICAgICAgIGFk ZF9zb2NrZXRfd3Jpd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