Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp132090imu; Thu, 6 Dec 2018 17:17:34 -0800 (PST) X-Google-Smtp-Source: AFSGD/VzaJ3jAxnQvGWGrYf8cFkTp6Q+XWY50F0dx67aXf/0YuGWgVZLJDK05eLVP4XtAWgkEF10 X-Received: by 2002:a17:902:365:: with SMTP id 92mr189917pld.327.1544145454400; Thu, 06 Dec 2018 17:17:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544145454; cv=none; d=google.com; s=arc-20160816; b=w4nCnojflNXPD06782g6q23cF0StE2gOxwTNXI8r43Hp/pI7PfZl4REtYWEqVrY/IQ NIkVXtuk2bx5Gq2SfLxKs3H4zvTx3yVNOW2rsTU2jrENqDvhgNK1CqEJY9b88SU9Fzw/ S3oIyUWbVeBvRKMFVYFlOxFJxnybnTExv7aRswcJV8qCRMeP8JTjv/vzpT4KqWD1bMiH A6xmG7DI7HfZD8nmAAPtBMlaACgRYkwBJZwaIWVpvcKMimbSusBn3AwRTVLuMhkSLO4X 7I/UZQ3uPk8k3DzY4JnSanrhjpKmHoXTkbe5h7v055cEjO5NTa4eggF2RkqYiZMLTM1L XlTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=BtBqsYp/AGAgnDu5zGBDraLt1/GUknDEf1Lc3/P0G1c=; b=TEt2rTIIHimTFOrsdveQFcaaan1iVNs5ESOt9aTOiwSQTPtGPxG7dtz+o5Hq4V3VRB zWRDA59DI3H0WH565lvhfFTJhQDPYXKp0xnesNpx5lv9a6Hhq/iBVOfMVpnA2G7G5/N/ /g7hiEfF3G+fLY49XtSYHMcNydBrvIXQ3RoUWJXcXPXRfVFbYxEhf6OHrB/hthM+aS2g EzlTErO0MxolS9MVYb9uHADfCWMIEqq1dScpA+1g/zLb8ic+wGtQYhUJilSdTUAMR1M3 PWc3kSt16QmD85RZXhUhij1N7SeAH0q9o/LrX5OqbEaUuK54hLQNw0XlOTSuHd6D69CC 0cTg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2018-07-02 header.b=mhCXdSLe; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j22si1632897pfi.252.2018.12.06.17.17.19; Thu, 06 Dec 2018 17:17:34 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2018-07-02 header.b=mhCXdSLe; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726190AbeLGBPq (ORCPT + 99 others); Thu, 6 Dec 2018 20:15:46 -0500 Received: from aserp2130.oracle.com ([141.146.126.79]:53970 "EHLO aserp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726081AbeLGBPp (ORCPT ); Thu, 6 Dec 2018 20:15:45 -0500 Received: from pps.filterd (aserp2130.oracle.com [127.0.0.1]) by aserp2130.oracle.com (8.16.0.22/8.16.0.22) with SMTP id wB719C4A111393; Fri, 7 Dec 2018 01:15:42 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=subject : to : cc : references : from : message-id : date : mime-version : in-reply-to : content-type : content-transfer-encoding; s=corp-2018-07-02; bh=BtBqsYp/AGAgnDu5zGBDraLt1/GUknDEf1Lc3/P0G1c=; b=mhCXdSLex+QMFOxiHVq1zFPXJtkXiOcargRsvPYIfYsli1KnW20d/YS4hptdOrIclzoq KpnW1yoLD2XZpuf+TfR/MZroMGN6B1Ej+Wpm6RqrkhYtAefOh/ItUlHlsIyY9NQdDzUA Uhozx7/X8Lhq8YxOQURpPlenR4vR6I/Otp/olHQNUs0cMFw7t2PewnHBDvf4kvZ6kpjo ulJ0Nke+0WnqS8LfFCyz+Bf7bOurQX4uJY3FQ2uiKX2tou1NeNdW9XjAYoq8qaB1a6TA +/F41u6K8z4yjmiKNDMMnYVZ6WvLvQBoNVEgRbUw5S+FQGvNhNb4vLEQnMniIebkwjEq ww== Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by aserp2130.oracle.com with ESMTP id 2p3ftff8jj-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 07 Dec 2018 01:15:42 +0000 Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by userv0022.oracle.com (8.14.4/8.14.4) with ESMTP id wB71Ff0A016862 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 7 Dec 2018 01:15:41 GMT Received: from abhmp0014.oracle.com (abhmp0014.oracle.com [141.146.116.20]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id wB71FfZU027443; Fri, 7 Dec 2018 01:15:41 GMT Received: from [10.182.69.118] (/10.182.69.118) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 06 Dec 2018 17:15:41 -0800 Subject: Re: [PATCH V10 3/4] blk-mq: issue directly with bypass 'false' in blk_mq_sched_insert_requests To: Jens Axboe Cc: ming.lei@redhat.com, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org References: <1544067160-20564-1-git-send-email-jianchao.w.wang@oracle.com> <1544067160-20564-4-git-send-email-jianchao.w.wang@oracle.com> <840accff-5050-744d-9c95-febce5433ab2@kernel.dk> From: "jianchao.wang" Message-ID: Date: Fri, 7 Dec 2018 09:16:23 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: <840accff-5050-744d-9c95-febce5433ab2@kernel.dk> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9099 signatures=668679 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1812070008 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12/6/18 11:19 PM, Jens Axboe wrote: > On 12/5/18 8:32 PM, Jianchao Wang wrote: >> It is not necessary to issue request directly with bypass 'true' >> in blk_mq_sched_insert_requests and handle the non-issued requests >> itself. Just set bypass to 'false' and let blk_mq_try_issue_directly >> handle them totally. Remove the blk_rq_can_direct_dispatch check, >> because blk_mq_try_issue_directly can handle it well. >> >> With respect to commit_rqs hook, we only need to care about the last >> request's result. If it is inserted, invoke commit_rqs. > > I don't think there's anything wrong, functionally, with this patch, > but I question the logic of continuing to attempt direct dispatch > if we fail one. If we get busy on one, for instance, we should just > insert that one to the dispatch list, and insert the rest of the list > normally. > > It is OK for me to stop to attempt direct dispatch and insert all of the rest when meet the non-ok case. Thanks Jianchao