Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp212968pxb; Wed, 23 Mar 2022 16:35:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwvTpMBCKrUFGFNugqM/QkJ+0A1vcyhtdb2XlF5P+YdrvG/tWhXKmdM+ORNZeoyQh7qTSTe X-Received: by 2002:aa7:c30f:0:b0:419:2af:4845 with SMTP id l15-20020aa7c30f000000b0041902af4845mr3348244edq.296.1648078526905; Wed, 23 Mar 2022 16:35:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648078526; cv=none; d=google.com; s=arc-20160816; b=TbiPVkIFG38RoTrlpdSVG5mmwDhRq7mFK7xtmUU5YxmAT3zJiBSyPv2oekfQo6qA4U vKmkgMUFHgYZ+CB1fjqasTbhR5iL34cwQZ0KRwkiTP8u0qCbBNM6t8CuTLNgthySQTml L74fezQi9myMZi28BX+a4X3Rs95SyJev3PQTeVlMHeXCvCUUkk4DepvZuTyTlGLBPs+3 Sw+5YAOdmQBXBh/oBrWDuqKolbaG2hizEERz03EQ9f8bUHuWxGj8wq8i+I/0ERfKIGAy KWbn6bhSrNARTW++/lgczFE+joPFUDECQsEah6oqTdVKI7/fmt9lWhndw+HmFmD7PCTQ LqHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:subject:user-agent:mime-version:date:message-id; bh=Y8rIinbo1ktegyuDwyfn3hcad/7lH4X2oC5XHpyxiY4=; b=TDMnGb1vIwv3YQSM/juqNh3FuatWMZqz/NJYJAo6wxIoNK7+BaeZp/erxjrHQSAsYf 2ngzMsQBhIi2i3xN/88L98+Kl4TKRN3SvwrbVSAIfkUrKOQ3VEiSJYCc4be/DF8LziRy Hd6xBPRnE0aRY+0EdSLd3wp3o3Lc6pXcoh5IJAhAKeh+okBp6QtPiborzOm2tsQ8Rnvr HhGTFJp90YbZ05YChShUNcV7ENGtzz2tQxqkGRjlYkauMF8otYlpgjGuUrS47ofjzPX5 Dz6WgNtqZkKteBlhkusfuaVcwhoYntteAqo1bEQ6LyLQJrW0CHopjqNUUbi9uIGt5D6H v/Zw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s4-20020a170906778400b006dfb9006429si14998143ejm.936.2022.03.23.16.35.02; Wed, 23 Mar 2022 16:35:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235977AbiCVPzX (ORCPT + 99 others); Tue, 22 Mar 2022 11:55:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54668 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233742AbiCVPzV (ORCPT ); Tue, 22 Mar 2022 11:55:21 -0400 Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0CAB02DA; Tue, 22 Mar 2022 08:53:51 -0700 (PDT) Received: from fraeml703-chm.china.huawei.com (unknown [172.18.147.201]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4KNGF64BJTz67bJf; Tue, 22 Mar 2022 23:51:38 +0800 (CST) Received: from lhreml724-chm.china.huawei.com (10.201.108.75) by fraeml703-chm.china.huawei.com (10.206.15.52) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2375.24; Tue, 22 Mar 2022 16:53:49 +0100 Received: from [10.47.85.68] (10.47.85.68) 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.21; Tue, 22 Mar 2022 15:53:48 +0000 Message-ID: Date: Tue, 22 Mar 2022 15:53:47 +0000 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.6.1 Subject: Re: [PATCH] scsi: core: Refine how we set tag_set NUMA node To: , CC: , , , , References: <1647939438-187933-1-git-send-email-john.garry@huawei.com> From: John Garry In-Reply-To: <1647939438-187933-1-git-send-email-john.garry@huawei.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.47.85.68] X-ClientProxiedBy: lhreml730-chm.china.huawei.com (10.201.108.81) To lhreml724-chm.china.huawei.com (10.201.108.75) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 22/03/2022 08:57, John Garry wrote: > /* > * Increase usage count temporarily here so that calling > * scsi_autopm_put_host() will trigger runtime idle if there is > diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c > index 0a70aa763a96..7faa83b89fa4 100644 > --- a/drivers/scsi/scsi_lib.c > +++ b/drivers/scsi/scsi_lib.c > @@ -1982,7 +1982,11 @@ int scsi_mq_setup_tags(struct Scsi_Host *shost) > tag_set->nr_maps = shost->nr_maps ? : 1; > tag_set->queue_depth = shost->can_queue; > tag_set->cmd_size = cmd_size; > + #ifdef CONFIG_NUMA > + tag_set->numa_node = shost->dma_dev->numa_node; > + #else > tag_set->numa_node = NUMA_NO_NODE; > + #endif note to self: use dev_to_node() > tag_set->flags = BLK_MQ_F_SHOULD_MERGE; > tag_set->flags |=