Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp5115331rwl; Tue, 28 Mar 2023 16:46:12 -0700 (PDT) X-Google-Smtp-Source: AKy350bIKUouXBs04vrvVnCuDEFZMwe3AZ4rc1ZvmV7ceZRDOKfSqmm1pq6vHlMY/cvCMyX5WsAe X-Received: by 2002:a17:902:ce92:b0:1a2:1042:cadc with SMTP id f18-20020a170902ce9200b001a21042cadcmr19929121plg.18.1680047172497; Tue, 28 Mar 2023 16:46:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680047172; cv=none; d=google.com; s=arc-20160816; b=SvJWG+9qH0/ZXc06iGDm1OjuvyxObFcW9KVXuh3FCTo7nh9DqIG9D+yjBtGS6pjzjN a8wS/75PHP35COBosH9eri/ScvVFoKAks+Py/AnJnGaLRPs54b7K98uknfcrNzfkNSW9 voNj40h6PSwiCq9T0ywnfF/TZk+vhWGUNKCzJCd84X/4IwmFeO4G5sd+rukwAb8mrmAQ FHUkVSpn8d85Krh/c9zag828dZ0N8loED3z9E82rW5Mk346Psez3GrK7grg8Bt1/qPwu MMdqEVIN0cN6CRZ0PqoqwD0oUXzNyQaTdvwvgaip6rgP3fMG5gqegjiNQfwPu9gy73zz ldRg== 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:content-language:subject:reply-to:user-agent :mime-version:date:message-id; bh=hGHd+Pb8JmhJlFvR9J5I1Y1cqamE5oDZ+DTr6saFeDk=; b=nk19eX6XoVPMP6jX6H/AI1fRMqyOO1aLT5DLcvQGAZ1zJc58xzS04DEITbaJL0trSs bdZVTyZ2vFIAqjLzaH+8Zwb25fDiXNIUFp5YY0nIO66TC4LXBKoZGAy5o/xz5CUeBfyh HnyprniNPjYgMTRf2p9hX2pfI3Dhw4Mzbm44+H2Eks1rQjNPiw7NzcRjts35yiMo5JeX XzmnqXk6ZyUecF5fXzGNX7Z/pIW5u+zPQEuAsruNhK4HMzR8p7C7HdhOfxzSVp0Bi+0j +TeucWp91drhzXtDyVujXT9vk2LGrgv5SzgI+2+rOjR2RAY6gq0MA8oqrh4eZ798v9tX tulg== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m4-20020a6545c4000000b005134ad5e99bsi7332248pgr.625.2023.03.28.16.45.49; Tue, 28 Mar 2023 16:46:12 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229811AbjC1Xke (ORCPT + 99 others); Tue, 28 Mar 2023 19:40:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52558 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229750AbjC1Xkd (ORCPT ); Tue, 28 Mar 2023 19:40:33 -0400 Received: from mp-relay-01.fibernetics.ca (mp-relay-01.fibernetics.ca [208.85.217.136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EF63D1FDB; Tue, 28 Mar 2023 16:40:32 -0700 (PDT) Received: from mailpool-fe-02.fibernetics.ca (mailpool-fe-02.fibernetics.ca [208.85.217.145]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mp-relay-01.fibernetics.ca (Postfix) with ESMTPS id 38FA5E1AAC; Tue, 28 Mar 2023 23:40:32 +0000 (UTC) Received: from localhost (mailpool-mx-01.fibernetics.ca [208.85.217.140]) by mailpool-fe-02.fibernetics.ca (Postfix) with ESMTP id 23ADF60BEA; Tue, 28 Mar 2023 23:40:32 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at X-Spam-Score: -0.199 X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 Received: from mailpool-fe-02.fibernetics.ca ([208.85.217.145]) by localhost (mail-mx-01.fibernetics.ca [208.85.217.140]) (amavisd-new, port 10024) with ESMTP id 86VQL90VXSlg; Tue, 28 Mar 2023 23:40:31 +0000 (UTC) Received: from [192.168.48.17] (host-184-164-23-94.dyn.295.ca [184.164.23.94]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) (Authenticated sender: dgilbert@interlog.com) by mail.ca.inter.net (Postfix) with ESMTPSA id 7EBD060BE9; Tue, 28 Mar 2023 23:40:31 +0000 (UTC) Message-ID: <9caa24a8-1744-b044-ac7d-782aba05d776@interlog.com> Date: Tue, 28 Mar 2023 19:40:31 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.0 Reply-To: dgilbert@interlog.com Subject: Re: [PATCH v3 03/11] scsi: scsi_debug: Change shost list lock to a mutex Content-Language: en-CA To: John Garry , jejb@linux.ibm.com, martin.petersen@oracle.com Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, bvanassche@acm.org References: <20230327074310.1862889-1-john.g.garry@oracle.com> <20230327074310.1862889-4-john.g.garry@oracle.com> From: Douglas Gilbert In-Reply-To: <20230327074310.1862889-4-john.g.garry@oracle.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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 2023-03-27 03:43, John Garry wrote: > The shost list lock, sdebug_host_list_lock, is a spinlock. We would only > lock in non-atomic context in this driver, so use a mutex instead, which > is friendlier if we need to schedule when iterating. > > Signed-off-by: John Garry Acked-by: Douglas Gilbert