Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp134243imu; Thu, 6 Dec 2018 17:20:04 -0800 (PST) X-Google-Smtp-Source: AFSGD/VGwMajiT83KKkKD3bBiVTU2ANxMVlYe1Ai/bRq0Fa6TuEkGEHW6KRF7yBGAa+xC1Wxqs6H X-Received: by 2002:a65:6645:: with SMTP id z5mr184843pgv.351.1544145603969; Thu, 06 Dec 2018 17:20:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544145603; cv=none; d=google.com; s=arc-20160816; b=mxJAGdOiV50CXMCkDwZoZROAD75r2rifNyPg5ffB644uSzLQf7MhtVh1lF8ZmU+WlI doSDhFpXaqVsKuU+trFjlxJxHznpngGpq1tLyxPtUNY5NIpbSYY8zpybfQEDbgXXHBVW inBSqLXBRCs4ctddwCGhssdn+M9afD44n5d0bLbJwZcLQS70QQ6ckp9mNaZfhd5Afwe5 FlFJ7q5yTGMGa1hpPUDtSrsPXw8a0G9xL6wD2KvT7O2qG/EWirVWzZi2b0cmHlhRTm8g lA2r77cg2lAVx/zU1Yeudl4pIbbcvVkwlmP4lm/1phJPVKjmExTMf95MP+dDDVracDP8 8Vpg== 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=9YXCB5urI/dW9wENhRy9IS0IgUsBt68fh08QEVt3RKw=; b=YfAvfVTGsiuA5iDEBewxqM0edulRkJdgXIFjQ3kQP9kjs+O/xZk8K9E0Q7aEMuQv/W qWBA4VKKoELl8BPVK+f1F5+8X52CWxVW3MTWGsxOmGwuMWK4U5UgLECnDvoMKzHfNOTm bZu0h+0qTc0S0no1UF+4pOBDCr85aUDrA+IXorzh1eYUTUpRA6oPXwqhBr/aKo3rVmwT RekYYMgN6wV36/mi4ieuFqy8HaFfW3n8T+vjr/fufWs1jW/V7DWGEVzEp/1zzeuv9whf 1JfaVndTlx0/Y+YVGxF+ssYB46Al9iJ7w7orGQLdouX5E/3H1kANjDE38mJf/rFau5IR yUFw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel-dk.20150623.gappssmtp.com header.s=20150623 header.b="2J+rL/tk"; 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 m3si1549306pld.331.2018.12.06.17.19.41; Thu, 06 Dec 2018 17:20:03 -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="2J+rL/tk"; 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 S1725998AbeLGBS7 (ORCPT + 99 others); Thu, 6 Dec 2018 20:18:59 -0500 Received: from mail-pf1-f196.google.com ([209.85.210.196]:45958 "EHLO mail-pf1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725972AbeLGBS6 (ORCPT ); Thu, 6 Dec 2018 20:18:58 -0500 Received: by mail-pf1-f196.google.com with SMTP id g62so1049509pfd.12 for ; Thu, 06 Dec 2018 17:18:57 -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=9YXCB5urI/dW9wENhRy9IS0IgUsBt68fh08QEVt3RKw=; b=2J+rL/tkld49d+T3xPLh/31UxdRG4FGzey3pVTu0Yv0EM1d6/naRsKub5uHFpjRHE0 g5uNgYciUDxnBI20dEnneS1elsFlaseoxIDLv+BVvyKu0XwGKad0Y7rgkr+Gt9zI9mam IMcjujnLpMhQIMsETEi6zHI4NTAEB3QAYLVDfKtaYA+1ESk5mVBn8F4o/s3iMTVV92uf nw7WIdkq40hk3MyBKDGsS/N+KDPDWFilRlbXbQzE5+CcY56O96qAaWLRm13fAjZfwLBW 3caOTJZu1pcZRtiVop9YlqhOAmtcPaLH82CtMu2kc+f7LBQALvnzydZ6VH5fsDNuf2xt Lb7w== 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=9YXCB5urI/dW9wENhRy9IS0IgUsBt68fh08QEVt3RKw=; b=WS92OPRion2gCKa4/D2M4M62yFAJdi88TBq4MHaPONZl3R7+zbh4b4S7CZAfBY5AV8 w1MYEUu/Zmbxe5To5xl0QGlDqqnAMCNRCIU1KSL07ElR2prBs0W6tx3B14+W+RV0l94N qeaDLJwizsxKInKUyds+b8g2/61/jrzjKIdnIbiB/SLQdK0NwTviwDPTP/zqxVmpcccy z18rU/6PaNeZ6012GoYiBnGEmFU0Wj7nrYYmYQOBzITzlFUxeENlzw5l+JliNfe2mROt IjHBi6ZgXtSBQonWqjtajQty9aefXsovizbQjtR23uC6bfNiyJspnrAtG231UiZT/v7R x7Jw== X-Gm-Message-State: AA+aEWZ2nZ/EDjKkgwrWVvIFdhMuo4YEe/G8HniFLCtZFry/qV6ZXDsw JLpHFbP83XO1zTfSDRShaLCt27jhVqI= X-Received: by 2002:a63:ff16:: with SMTP id k22mr218803pgi.244.1544145536712; Thu, 06 Dec 2018 17:18:56 -0800 (PST) Received: from [192.168.1.121] (66.29.188.166.static.utbb.net. [66.29.188.166]) by smtp.gmail.com with ESMTPSA id 84sm3456173pfk.134.2018.12.06.17.18.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 06 Dec 2018 17:18:55 -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> <840accff-5050-744d-9c95-febce5433ab2@kernel.dk> From: Jens Axboe Message-ID: <4c4d6425-6ffe-f306-a7d3-6da2fe791838@kernel.dk> Date: Thu, 6 Dec 2018 18:18:53 -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: 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/6/18 6:16 PM, jianchao.wang wrote: > > > 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. Great, let's do that then, I think that makes more sense. The usual case of not being able to dispatch is resource limited, and for that case we'd just be wasting our time continuing to attempt direct dispatch. -- Jens Axboe