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=-1.0 required=3.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS autolearn=unavailable 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 F08DCC64EB1 for ; Thu, 6 Dec 2018 15:19:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B55D720700 for ; Thu, 6 Dec 2018 15:19:32 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=kernel-dk.20150623.gappssmtp.com header.i=@kernel-dk.20150623.gappssmtp.com header.b="oqwmfpK6" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B55D720700 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.dk Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726157AbeLFPTb (ORCPT ); Thu, 6 Dec 2018 10:19:31 -0500 Received: from mail-it1-f193.google.com ([209.85.166.193]:35075 "EHLO mail-it1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725945AbeLFPTb (ORCPT ); Thu, 6 Dec 2018 10:19:31 -0500 Received: by mail-it1-f193.google.com with SMTP id p197so1995822itp.0 for ; Thu, 06 Dec 2018 07:19:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=NMb8x1M1yA6S+t3bU8+fBaScmnvLKxY2xxKbeilHybg=; b=oqwmfpK6JK+lCqLoOUOAFcAXi7fiJamImbWbktdrqcrs1iuV8hl9TyK/OjCiNNPV/K dU82sxg49w63uVMuLrJEF5pYnUy5r0y+Yn2s83U9xommKd3sPXDmmL31lgC6pHSDi6la vrGOAJHEdQ41dNJ+VKsxcqD51np84O7ElRYzPSW57LyCSIUjn4gVy544UAklyvlUY6Jq Adsjogis+WFvRZqDRlIqh9z6Tc7u2pkhrw0JtKZHMOe5VUZ6PZ6Pv6C3iRW5ysxjcPgS UP/bVKUhI9SdIpTymbNd17rjkd5x2vUQZxUWqvhxx9ijgLhPQ7F2QL47I/T0i9DPlLLa 2QRQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=NMb8x1M1yA6S+t3bU8+fBaScmnvLKxY2xxKbeilHybg=; b=ht98vqVoMt7t3DFfcLobfPMfvLW0QJUSwdzjYX/k6sX775mygtN7LtqQJOJy4ocEcZ PTTSO94xahxE8GxaSe3ahUfd6v5O0CjKZRuC8NeaMNU8PZcQH9KLCE8l3Qm9LMFMB843 jC+COdqiIe1mIyBs5A98XhKAW9A+iGBuHsNnCs4wXezmViK+mwzx01shpOhtGIDYxWR4 OwJHO4MDyRMDUmfG5gImRFZbfG71ThVYovLq2YRUPC6qsW3bgNN0M2UGYwHjJfBTOph0 oFnvJLHckFBlHUr1UCj+SwGNe4JpKrziUKYDW8O1gc3C9C+IEhhhAv6RpRX8mS6Ty+3T aVEg== X-Gm-Message-State: AA+aEWawoUmHaK8QTL2BkpbuFQfhcuHQDF5PZAePmtof5NWYNx3H9mEc DgnNc1l95q33PL5XUHt4e9GaJ0snGLI= X-Google-Smtp-Source: AFSGD/XHkbjLGRg+iYEe9blfvmuXAu/w9tNrBJ9x90n528cCgj65lG5jQZHXC+ZUCFCdhszzp3ojRA== X-Received: by 2002:a24:2f82:: with SMTP id j124mr17888969itj.166.1544109569480; Thu, 06 Dec 2018 07:19:29 -0800 (PST) Received: from [192.168.1.56] ([216.160.245.98]) by smtp.gmail.com with ESMTPSA id f13sm245100iol.82.2018.12.06.07.19.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 06 Dec 2018 07:19:27 -0800 (PST) Subject: Re: [PATCH V10 3/4] blk-mq: issue directly with bypass 'false' in blk_mq_sched_insert_requests To: Jianchao Wang 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> From: Jens Axboe Message-ID: <840accff-5050-744d-9c95-febce5433ab2@kernel.dk> Date: Thu, 6 Dec 2018 08:19:26 -0700 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: <1544067160-20564-4-git-send-email-jianchao.w.wang@oracle.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. -- Jens Axboe