Message ID | 1630065724-69146-9-git-send-email-john.garry@huawei.com |
---|---|
State | Superseded |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:a02:6f15:0:0:0:0:0 with SMTP id x21csp1197940jab; Fri, 27 Aug 2021 05:07:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwpX6T82uh3Hvb7iWoYm9NqNgaybruDHBaK1GaU4ag39zlN2MgSGJMTB+SJ8fbOqYnYs3Oe X-Received: by 2002:aa7:dc57:: with SMTP id g23mr382289edu.71.1630066032793; Fri, 27 Aug 2021 05:07:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630066032; cv=none; d=google.com; s=arc-20160816; b=RWuYbdZMQ/urSWeNHJccnbpL2A6npZhd16WUKKnYtjOT4ihs8Ypk7CzuEYNOwyo60P CT9bspiy5nImAvhB4dg69AdN+APmUDg5Jj0HcYz/ZN13u4oL6oATpAU84wBxcu6GosQ3 8pqjMLlr/zNOQ/AWXyXHN51OIGHxSXLIbG1sbA6W7Vkk27891PtacyhJ1og5ZDlUA3Fv VZHCk+GfjgmDIeGD5OmYFPziKONsdt204JyY3ykKpYzSCa/YO+qMArqHLGs/LOeeVhBh yJDuZlLyI1NPt07F6jmq1y6+OReUMqfYQwAutXVUDUz9ZHZaB7TNMNsugYx0U57q7DJL WegQ== 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=z14+AzHwEI+Tvp4MnHyb0BpHtPLiSMmCtOo1OJZGLjo=; b=JVJyls9fnsFuTvY/v5S4BkwBOBkoZVzf0bZ2yevWV527cOVn/rOXaHp6eD0ei8YEWJ yJUDsUYcbCRihQRoNTm1CTQExyG+ytzFn2usi4S7AfX+RthJxvAqg6UfO07w+eGgsiPy 5k+VUVr4VbRjMl2vHtnK6p9mRpAkKTTnFS8xwd3EbtgJYSlJ8aVeL/WcKlOlzKTMRZdT EKNqzzKaMHRZcfopsgyEMmF/JMykBAE4vo0CeZHs5y3OzLFIFIgLUsLQwdWgnSI4XXog /v2WaUejDBAsRG00uPR3CyziWCjTLbSQk5Iqh5LhJ4YWNGmFnvUfjrHQTbqsP2IzcOrq CKMg== 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: <linux-scsi-owner@vger.kernel.org> Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e29si2098515ejl.212.2021.08.27.05.07.12 for <patch@linaro.org>; Fri, 27 Aug 2021 05:07:12 -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 S245196AbhH0MIA (ORCPT <rfc822;patch@linaro.org>); Fri, 27 Aug 2021 08:08:00 -0400 Received: from frasgout.his.huawei.com ([185.176.79.56]:3703 "EHLO frasgout.his.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245171AbhH0MHz (ORCPT <rfc822; linux-scsi@vger.kernel.org>); Fri, 27 Aug 2021 08:07:55 -0400 Received: from fraeml740-chm.china.huawei.com (unknown [172.18.147.201]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4Gwz1w2XDmz67wgc; Fri, 27 Aug 2021 20:05:40 +0800 (CST) Received: from lhreml724-chm.china.huawei.com (10.201.108.75) by fraeml740-chm.china.huawei.com (10.206.15.221) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.8; Fri, 27 Aug 2021 14:07:05 +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; Fri, 27 Aug 2021 13:07:02 +0100 From: John Garry <john.garry@huawei.com> To: <axboe@kernel.dk> CC: <linux-block@vger.kernel.org>, <linux-kernel@vger.kernel.org>, <ming.lei@redhat.com>, <linux-scsi@vger.kernel.org>, John Garry <john.garry@huawei.com> Subject: [PATCH v3 08/13] blk-mq: Don't clear driver tags own mapping Date: Fri, 27 Aug 2021 20:01:59 +0800 Message-ID: <1630065724-69146-9-git-send-email-john.garry@huawei.com> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1630065724-69146-1-git-send-email-john.garry@huawei.com> References: <1630065724-69146-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: dggems702-chm.china.huawei.com (10.3.19.179) To lhreml724-chm.china.huawei.com (10.201.108.75) X-CFilter-Loop: Reflected Precedence: bulk List-ID: <linux-scsi.vger.kernel.org> X-Mailing-List: linux-scsi@vger.kernel.org |
Series |
blk-mq: Reduce static requests memory footprint for shared sbitmap
|
expand
|
diff --git a/block/blk-mq.c b/block/blk-mq.c index 556c203e6b7c..09380274d2d6 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c @@ -2316,6 +2316,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);
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 <john.garry@huawei.com> --- block/blk-mq.c | 4 ++++ 1 file changed, 4 insertions(+) -- 2.26.2