Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp10827971imu; Thu, 6 Dec 2018 07:24:09 -0800 (PST) X-Google-Smtp-Source: AFSGD/V9WnLlum9gyxQNh41kwsn4QsFuWkEdX3HZgWKkZPI/gJlEqqvFMQD2+EJ5P6IQ6OUjKFzy X-Received: by 2002:a63:4926:: with SMTP id w38mr23487034pga.353.1544109849426; Thu, 06 Dec 2018 07:24:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544109849; cv=none; d=google.com; s=arc-20160816; b=xeQaw3+UqZlRcDXeRFHDDqsPGnPQsndY55Sf5CJd0dgM3S2kUwfzmGn5OHcFMkLn0Z mbhAhrWATEXHCFUdgs1/pdcjNXUtnuo+Mg5IEfx02ue0FOXdwkR8G9r3mlMFXKjFIjjI 6nfKYv0c5Y2WsgnTK0K2vcpbHBnjw7r0NoMV0u2qJ7MPeQaGAyCogxErYU5zHlf9fg9p rl80P4COlNBIPIzFsj6a0/V73nSxYqGbP7zQKyISoCFBojFF9UfujxoAr/lyPtXxLzZ0 hRX58j+8eXouV1BttnAcW5VpOdzG9qq0XyMk8GA+V0ntTCuAGDunGzTDr2JJBhijnjv1 SXog== 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=NMb8x1M1yA6S+t3bU8+fBaScmnvLKxY2xxKbeilHybg=; b=MQw47WAtHgnlgD05733t3FtU1TM9ouFa4GU0SQX52mRGqicBcNa37tyU7OwunK09mc PyNhC8I9H+C0wvH36kcSn9RR5URVwEawsCEujEoLK8k/8Yo5Zd4EfMO1qtIUdci6xuef 1Sb7oWO+XTVmTzKmd9pTQwC5zTqD4beAJSbecOMib5udkEyWaHlIO6ziln32ViqeTAP+ SwCnQc2U4HM091RfNVey5HZ/RkrJPT+AsriwtfxGYZ6Pmqf6WdgjUkWi6aCeAZe5al51 YXmxDMu/3c7Z+3sp/WxASIL1ewVHV/LvxNwf3K74lNtIfOcSaJShEjvoqXD2Q4tG65Lq 5mcA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel-dk.20150623.gappssmtp.com header.s=20150623 header.b=oqwmfpK6; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 204si491360pfu.273.2018.12.06.07.23.37; Thu, 06 Dec 2018 07:24:09 -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=@kernel-dk.20150623.gappssmtp.com header.s=20150623 header.b=oqwmfpK6; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726150AbeLFPTb (ORCPT + 99 others); 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-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