Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1603757pxk; Fri, 25 Sep 2020 21:33:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxBrM90k4UVM4BQTxDjEzvBujekL9seDnBASi5+hsDFn+DZTPr6beftCYeur1XCrDtZts8w X-Received: by 2002:a17:906:f950:: with SMTP id ld16mr5726126ejb.489.1601094827377; Fri, 25 Sep 2020 21:33:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601094827; cv=none; d=google.com; s=arc-20160816; b=GABhTqs+tP1ZSU16q3GuRyzwqtM4HQIjFOKNK8G+qeT7JUdqhe1GgGJxjup3R2nfvZ sxFZ8gsPm61PASetdf+d/VN7//Y7a3bx7o+gYQ75DyXJimxy4Qpw9gm3aKY7nuA5ChvP QM/9mEHo2t1ciWYi8s+NYgt5hGVGr94mCGD1JxvY9s0KaUMrKC/7cQ5iEjJfy1EE3dGp yGnY24tPd3urlQXzJRj7RT1GLFycxBp9gaNCTWoTtiUg3o3agQ476Lo1g5Jt6J9fEA6h DQi0lxbVdCBE4bcfu7tbJL0PkoTxSQ0jYAqiZXXwo1k8OcrToxPb+ILntU0lDzPM3t84 cofA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence: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=EO4OdMJrBWoAU3orU+UiJn8tbdfQQYYuEGGXKblu6gM=; b=DkFTofVXvOi+AacOUh1INAk57IPrG3PzPZ4Kk+myCpZPOVL9socUjWef1iahhSViHg AsgLFnwsNqTJ05bzH/kQMvdan/OZF8NxruGZrkZZdIq8SjtQIKuAaWK0ICIL4gR1TOts Y4ap5IHfa4vI8H2JnnPKgezQKNvOtPaybHYW9IgQL5qdAboESX//nD+lwY9xpV7vhqMy zS/iWaZ7aivOENbaR7AlKElFYGztaqHzJgxMiSbMR71mEANGQ3mJt8+BwKsoBRoDJA+f bfQPiO+I62eKsFEJoBGqF+coYIrJ5brRMIQnN4DGScdQczlEDvhNLxLrU7/fuESBwrtr oVig== 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 ap10si3317437ejc.106.2020.09.25.21.33.24; Fri, 25 Sep 2020 21:33:47 -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 S1730020AbgIZEcT (ORCPT + 99 others); Sat, 26 Sep 2020 00:32:19 -0400 Received: from smtp.h3c.com ([60.191.123.56]:16492 "EHLO h3cspam01-ex.h3c.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729926AbgIZEcS (ORCPT ); Sat, 26 Sep 2020 00:32:18 -0400 Received: from h3cspam01-ex.h3c.com (localhost [127.0.0.2] (may be forged)) by h3cspam01-ex.h3c.com with ESMTP id 08Q2qvAW066971; Sat, 26 Sep 2020 10:52:57 +0800 (GMT-8) (envelope-from tian.xianting@h3c.com) Received: from DAG2EX03-BASE.srv.huawei-3com.com ([10.8.0.66]) by h3cspam01-ex.h3c.com with ESMTPS id 08Q2qn2G066930 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Sat, 26 Sep 2020 10:52:49 +0800 (GMT-8) (envelope-from tian.xianting@h3c.com) Received: from DAG2EX03-BASE.srv.huawei-3com.com (10.8.0.66) by DAG2EX03-BASE.srv.huawei-3com.com (10.8.0.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Sat, 26 Sep 2020 10:52:50 +0800 Received: from DAG2EX03-BASE.srv.huawei-3com.com ([fe80::5d18:e01c:bbbd:c074]) by DAG2EX03-BASE.srv.huawei-3com.com ([fe80::5d18:e01c:bbbd:c074%7]) with mapi id 15.01.1713.004; Sat, 26 Sep 2020 10:52:50 +0800 From: Tianxianting To: Jens Axboe CC: "linux-block@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: RE: [PATCH] [v2] blk-mq: add cond_resched() in __blk_mq_alloc_rq_maps() Thread-Topic: [PATCH] [v2] blk-mq: add cond_resched() in __blk_mq_alloc_rq_maps() Thread-Index: AQHWjMtkn2n+ezztLkuMBSittKHg9Kl5Q7AAgAEBwjA= Date: Sat, 26 Sep 2020 02:52:50 +0000 Message-ID: References: <20200917081311.11428-1-tian.xianting@h3c.com> In-Reply-To: Accept-Language: en-US Content-Language: zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.99.141.128] x-sender-location: DAG2 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-DNSRBL: X-MAIL: h3cspam01-ex.h3c.com 08Q2qn2G066930 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org SGkgSmVucw0KVGhhbmtzIGEgbG90IGZvciB0aGUgY29tbWVudHMsDQpJIHRoaW5rIGl0IGlzIG5v dCBob3QgcGF0aCwgaXQgaXMgb25seSBjYWxsZWQgd2hlbiBzeXN0ZW0gc3RhcnR1cCBvciBkZXZp Y2UgaG90LXBsdWdnaW5nLg0KU28gSSBzdWJtaXR0ZWQgVjMgcGF0Y2ggZm9yIHlvdSByZXZpZXdp bmcgOikNCmh0dHBzOi8vbGttbC5vcmcvbGttbC8yMDIwLzkvMjUvMTU0MyANCg0KLS0tLS1Pcmln aW5hbCBNZXNzYWdlLS0tLS0NCkZyb206IEplbnMgQXhib2UgW21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Pm5yX2h3X3F1 ZXVlcyk7DQo+ICAgICAgICAgZG8gew0KPiAgICAgICAgICAgICAgICAgZXJyID0gX19ibGtfbXFf YWxsb2NfcnFfbWFwcyhzZXQpOw0KPiAgICAgICAgICAgICAgICAgaWYgKCFlcnIpDQo+ICAgICAg ICAgICAgICAgICAgICAgICAgIGJyZWFrOw0KPiANCj4gICAgICAgICAgICAgICAgIHNldC0+cXVl dWVfZGVwdGggPj49IDE7DQo+ICAgICAgICAgICAgICAgICBpZiAoc2V0LT5xdWV1ZV9kZXB0aCA8 IHNldC0+cmVzZXJ2ZWRfdGFncyArIEJMS19NUV9UQUdfTUlOKSB7DQo+ICAgICAgICAgICAgICAg ICAgICAgICAgIGVyciA9IC1FTk9NRU07DQo+ICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFr Ow0KPiAgICAgICAgICAgICAgICAgfQ0KPiAgICAgICAgIH0gd2hpbGUgKHNldC0+cXVldWVfZGVw dGgpOw0KPiAgICAgICAgIGVuZCA9IGt0aW1lX2dldF9ucygpOw0KPiAgICAgICAgIHByX2Vycigi WyVkOiVzIHN3aXRjaDolbGQsJWxkXSBhbGwgaHcgcXVldWVzIGluaXQgY29zdCB0aW1lICVsbGQg bnNcbiIsDQo+ICAgICAgICAgICAgICAgICAgICAgICAgIGN1cnJlbnQtPnBpZCwgY3VycmVudC0+ Y29tbSwNCj4gICAgICAgICAgICAgICAgICAgICAgICAgY3VycmVudC0+bnZjc3csIGN1cnJlbnQt Pm5pdmNzdywgZW5kIC0gc3RhcnQpOw0KPiANCj4gMiwgX19ibGtfbXFfYWxsb2NfcnFfbWFwcygp Og0KPiAgICAgICAgIHU2NCBzdGFydCwgZW5kOw0KPiAgICAgICAgIGZvciAoaSA9IDA7IGkgPCBz ZXQtPm5yX2h3X3F1ZXVlczsgaSsrKSB7DQo+ICAgICAgICAgICAgICAgICBzdGFydCA9IGt0aW1l X2dldF9ucygpOw0KPiAgICAgICAgICAgICAgICAgaWYgKCFfX2Jsa19t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