From patchwork Mon Sep 13 15:12:25 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Garry X-Patchwork-Id: 509786 Delivered-To: patch@linaro.org Received: by 2002:a02:c816:0:0:0:0:0 with SMTP id p22csp655905jao; Mon, 13 Sep 2021 08:18:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyRQgJ4vPloGjAe0J+gLN9cgw7pL6v6J1V3wA6hRp0TkpXCQCQByqT5JEAYiIGFKjJZrs/6 X-Received: by 2002:a17:907:9908:: with SMTP id ka8mr13701843ejc.164.1631546337929; Mon, 13 Sep 2021 08:18:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631546337; cv=none; d=google.com; s=arc-20160816; b=mZU9foeSic9Y8wsTH8t+W6dXL+cVYbUl7VbxDqkOtSRKQ4pDC9yEsDBM8Uzt9RsWUp l2BXUYy6yGARHcHra/X1WUA3vCs4icfTcBY4qSqZcDlQrMLs4ioX7I6aFBvECDkqnK6a XC06qL5zjDtpqzxTKaVBq1N2Uqb8hbM6JM229vB8ietOHTtAAroS38jwwkL8cYIs2tpi DPL9/Q9YWDWG5F0ZHkAMIGI0IXMxTy9XItLwKhIp/Xh1MpWTX76sdIfh/R/M1UVSzlNk OoL3BL0A008xep/w1pHLhJVoISTuozxp3tEEZFKhTp3HeLHk/29278YIcd+fn+yMbePs lsXg== 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=hg8/LoFcE4NmTW8Ry5zMdIveRTvhTNLguVxjl4EVXLs/94TaqORYkHRfnkDdDN381d ldgCYYfqB6nDSw3oYG5nCHBbrYrtGi3j7ZDzBAG3Y0ab75VAF30BtC/mp0zgP5QvtDJG IYwFRiJ9h/cLgW2mNH37jE6FLxRQaCCwL5fCZSsQxvXCu3TfKoKvfDROTchGR5IxeAXy 74E+KhL9jNAzDKm8/87joYMRq3TKh5RXbWvci4YCwNXCeUrpgj052ZMEsIlyviE2jdxs MQRTuT9aLUto2Lb4rM6h7Jyzw8tP7TCoOqo3y5FFTZ5NiazAwNsYMnZT55qQ0RBvwG20 2luw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-scsi-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-scsi-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 c30si7358358ejj.786.2021.09.13.08.18.57 for ; Mon, 13 Sep 2021 08:18:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-scsi-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-scsi-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-scsi-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 S1346780AbhIMPUL (ORCPT ); Mon, 13 Sep 2021 11:20:11 -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 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-scsi@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(+) -- 2.26.2 Reviewed-by: Hannes Reinecke 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);