Received: by 2002:a05:6a10:6d25:0:0:0:0 with SMTP id gq37csp1928243pxb; Mon, 13 Sep 2021 08:21:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxfyQ/0cJhNIs4NwRw0SVa1vPEvKI0siLV+Dipl92ATHgRbFKEcFT2GmlDSsxm/t+Yhob5f X-Received: by 2002:a05:6e02:1a6b:: with SMTP id w11mr8878558ilv.21.1631546462852; Mon, 13 Sep 2021 08:21:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631546462; cv=none; d=google.com; s=arc-20160816; b=xHh1m99PoAaR4tgxSFbfmbknemZ5KZRUZ4vLo3xe2jUuVix64ML+43posknjOm2JNZ fqTWGr9giatSOsJ2DV/TbhWf72LdeITCLghLYJP1l3+nFZWVRoOwkPHNahwM1Ko/xocA aot67eIT4lCUvBfcmie1MzrBqix9L8SBMum5yS1sjLOM6arkz+VENg2wFKMrfZES7jPs 9vSJqqS7sdez9S5HeiAWdlKZeY0PLDz7B2XjyA+hSvPnl7VBcC6wHJohjf/WoRsR6/Id hywHs6+Ul4VaWNhCV/wd53AIphJ3pX5orE0fMlVVwu+tPoh8K0QNsDE54aH7UmV+o0gs 6S4Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from; bh=tsDAQuiKCQfx2UhEjpGdFtaDweHF5uClg29Vmu2j1BA=; b=DvZDmuhC9KQNN5fLPuVhH4ClS1P1s2xvo0Bod8G36s5aHRAWS5X2x5arJ2FWbgD6o6 Boja5FQAeaIwkJkXMQZ4UXZ8jMp6cDck2b4Wx4ECojNXry6Ogsl8WaQM64Hv+OtaVQW1 jw4069NsvRPNmPECa0/HnwdyarczPmkmpZ7iY9EPxrpQiYGhmQj2OZsiXKfcuDdMwFjM 5nbyteqIigw4oMBWZFl2pLMM7MdmJnUD7/BjzN/P/sB8BvZqGzuriYNq+2cIK3cSi/MB oiiSuV5e5U36cuniCUAu3iltHfQnzE2tMThGCV+t9hAYBsKVLkecZiia28OzKEeJzcJ9 A1ZA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k3si7081782ilh.176.2021.09.13.08.20.50; Mon, 13 Sep 2021 08:21:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242151AbhIMPUP (ORCPT + 99 others); Mon, 13 Sep 2021 11:20:15 -0400 Received: from frasgout.his.huawei.com ([185.176.79.56]:3780 "EHLO frasgout.his.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346248AbhIMPSy (ORCPT ); Mon, 13 Sep 2021 11:18:54 -0400 Received: from fraeml736-chm.china.huawei.com (unknown [172.18.147.201]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4H7VR65gJGz67nJX; Mon, 13 Sep 2021 23:15:30 +0800 (CST) Received: from lhreml724-chm.china.huawei.com (10.201.108.75) by fraeml736-chm.china.huawei.com (10.206.15.217) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.8; Mon, 13 Sep 2021 17:17:36 +0200 Received: from localhost.localdomain (10.69.192.58) by lhreml724-chm.china.huawei.com (10.201.108.75) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.8; Mon, 13 Sep 2021 16:17:34 +0100 From: John Garry To: CC: , , , , John Garry Subject: [PATCH RESEND v3 08/13] blk-mq: Don't clear driver tags own mapping Date: Mon, 13 Sep 2021 23:12:25 +0800 Message-ID: <1631545950-56586-9-git-send-email-john.garry@huawei.com> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1631545950-56586-1-git-send-email-john.garry@huawei.com> References: <1631545950-56586-1-git-send-email-john.garry@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.69.192.58] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To lhreml724-chm.china.huawei.com (10.201.108.75) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Function blk_mq_clear_rq_mapping() is required to clear the sched tags mappings in driver tags rqs[]. But there is no need for a driver tags to clear its own mapping, so skip clearing the mapping in this scenario. Signed-off-by: John Garry --- block/blk-mq.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/block/blk-mq.c b/block/blk-mq.c index 4bae8afdfbe1..5229c5420b85 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c @@ -2308,6 +2308,10 @@ static void blk_mq_clear_rq_mapping(struct blk_mq_tags *drv_tags, struct page *page; unsigned long flags; + /* There is no need to clear a driver tags own mapping */ + if (drv_tags == tags) + return; + list_for_each_entry(page, &tags->page_list, lru) { unsigned long start = (unsigned long)page_address(page); unsigned long end = start + order_to_size(page->private); -- 2.26.2