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=-19.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_GIT 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 61A97C11F67 for ; Mon, 12 Jul 2021 07:41:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id F133A61374 for ; Mon, 12 Jul 2021 07:41:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245557AbhGLHnt (ORCPT ); Mon, 12 Jul 2021 03:43:49 -0400 Received: from mail.kernel.org ([198.145.29.99]:46194 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242267AbhGLHLw (ORCPT ); Mon, 12 Jul 2021 03:11:52 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id DF17E610D1; Mon, 12 Jul 2021 07:09:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1626073742; bh=eeSRVt3FkCjt3WDQdxZ1x+xwWrJEEYE+1JUohQRvcN8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=q/Iv5oETgr9ibaKN1C6h7UbXv7hhFP2gdo1hooEFCvCABss81AeloLzotffFMSkEG VFYxxy07VihdyeRdr+PujHQOlk66tAaiga93TWC/NgHpORTB4iihcZCib+vwpqqXuA F1jbUW1+fqQgCYEeX82g29LRtQsURjZ04j4B0aPU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jan Kara , Ming Lei , Jens Axboe , Sasha Levin Subject: [PATCH 5.12 342/700] blk-mq: update hctx->dispatch_busy in case of real scheduler Date: Mon, 12 Jul 2021 08:07:05 +0200 Message-Id: <20210712061012.671834133@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210712060924.797321836@linuxfoundation.org> References: <20210712060924.797321836@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Ming Lei [ Upstream commit cb9516be7708a2a18ec0a19fe3a225b5b3bc92c7 ] Commit 6e6fcbc27e77 ("blk-mq: support batching dispatch in case of io") starts to support io batching submission by using hctx->dispatch_busy. However, blk_mq_update_dispatch_busy() isn't changed to update hctx->dispatch_busy in that commit, so fix the issue by updating hctx->dispatch_busy in case of real scheduler. Reported-by: Jan Kara Reviewed-by: Jan Kara Fixes: 6e6fcbc27e77 ("blk-mq: support batching dispatch in case of io") Signed-off-by: Ming Lei Link: https://lore.kernel.org/r/20210625020248.1630497-1-ming.lei@redhat.com Signed-off-by: Jens Axboe Signed-off-by: Sasha Levin --- block/blk-mq.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/block/blk-mq.c b/block/blk-mq.c index d06ff908f3d9..6a982a277176 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c @@ -1223,9 +1223,6 @@ static void blk_mq_update_dispatch_busy(struct blk_mq_hw_ctx *hctx, bool busy) { unsigned int ewma; - if (hctx->queue->elevator) - return; - ewma = hctx->dispatch_busy; if (!ewma && !busy) -- 2.30.2