Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp2942311pxb; Tue, 12 Jan 2021 02:24:12 -0800 (PST) X-Google-Smtp-Source: ABdhPJy+6z47LfWpQVvy8MGWSHtyvVFRLta/K5FAIeaqkshpkcyI+0c0MXhBCPBUrYyi8zscUpSG X-Received: by 2002:a17:906:ae14:: with SMTP id le20mr2770281ejb.451.1610447052174; Tue, 12 Jan 2021 02:24:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610447052; cv=none; d=google.com; s=arc-20160816; b=0+xYJsNXBXYqopYY1OlaXj/faSYkNPp2o+bu86liSA2Y/MOttVOJdaaUeGk+HpdkiH 2eoeJq83J8HNNRJ90HzZOoHnDCXHcNpHKFbudUXXPPQcDme+U35qVDIiv5hk6wZsyoOp 2/cW0V2mU37o5jtdP8WhsAGHlFBTe6NePKxyZl3E9wHxCi25yAMR3OQuWJpieyQOFjaQ B5c9yoIyiDmUGuQaNbq/aVvfZrzjg5cJoE6Jhuj3ProCQ75FDkf4eLVVAMuZbZZV/Kxr OmXnJ6sY6TeNNuKFYbCY9lLwm9l6EqOyNlUldHlpb3c55R65EEPemQIIfSIi/D7iYkxy g/cQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=wDRHP7+cUBhF8uJYWQXgFywCD6TO5IU9paSTreRiAns=; b=id2a8qkDQtCLAGq4dpYP7RzeorMFHnZR4guf1PR3VzsdewymGD97pzJoTHervQE/mw edgbq3HZ+bvc7aMxa/5uUSFr3/uCBDbKJsHW6RXJNZIQmIGf/BuFqQH49mDteacpdxuX AX8FAMYH7Hx8IFcih4dV6dAuWedVK9AAr/0wbWeM5hH5qspDpTHT/Cte1BcLO4pikjz1 hXX3YFbEMhTHvUhetnU/kvhNrXvbmzBrCSx4xAN4aAZ9mOqk4EygBrYj0SIkg3FCekD8 1XnSeTSJY6PTFOwlKRcIZRgNhjDh08/EoE1/cKpE1p8Q6jQLc0krxV1osY14mbk70mro 5HFg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@broadcom.com header.s=google header.b=TTY4D9vV; 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=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r6si949369ejb.640.2021.01.12.02.23.47; Tue, 12 Jan 2021 02:24:11 -0800 (PST) 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; dkim=pass header.i=@broadcom.com header.s=google header.b=TTY4D9vV; 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=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2405058AbhALAZK (ORCPT + 99 others); Mon, 11 Jan 2021 19:25:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44822 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2404196AbhAKXrE (ORCPT ); Mon, 11 Jan 2021 18:47:04 -0500 Received: from mail-pg1-x52e.google.com (mail-pg1-x52e.google.com [IPv6:2607:f8b0:4864:20::52e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DEFC7C061786 for ; Mon, 11 Jan 2021 15:46:23 -0800 (PST) Received: by mail-pg1-x52e.google.com with SMTP id q7so208132pgm.5 for ; Mon, 11 Jan 2021 15:46:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to; bh=wDRHP7+cUBhF8uJYWQXgFywCD6TO5IU9paSTreRiAns=; b=TTY4D9vVPxuEb/6dDCa+Blvk7SNjemhzvvcxLlOwRPao5CgKXf1MX2ozjotIYD1kXP sHQM9ku1DH6mcQinqGPj9hzL1N/KSpiOpBdPMtgmXeq6TCOf6octfMnjyF0VxH1DsKwp zc4NQmqHyFt7jQGTI7RmucrFDfNTBR6THX7EQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to; bh=wDRHP7+cUBhF8uJYWQXgFywCD6TO5IU9paSTreRiAns=; b=qDy5aeT8Vk5kDt6aNRdioT7YYiGcMs2V06di9Z58lPnJNK9ogkxR4iGoDxIAPyD27l 0IUz7Tyjh5Pmq/zvjFondUIYcqlRCfbSfiB6Aquz60MX7P5AJYWU1dFLXQlkTwCjchor nsli7Ked7Zit7qPyGf4mgkGfJ3K6aQ8OmjNBvggDRUv50YlSis+1n3fFHD4ANZKAUYw0 ojwL/n+mnGky67gPOlB7OJmx7nvHYIlYg/h4m1RlqsVSi5CQkDIb6lqM9AWLN2VjF/HD ORs2HjjJbZQchzpvEwhoGC52QoQoC/IcaY9mKPbOJZAkYfvhiZIqiS9g5MF/3loF5TLs Fqeg== X-Gm-Message-State: AOAM5331hDpYEL4NP3Obm/3jWrVWs5H9UQLq4vhvRiLkhxl2ybnOnDZV WiTUaierq1lF0BZXESbOwaCF31WDI6Yw7CZhpbz/r0v9p+85qW3IlV5EooS48RyD5Cp3vaX3iJQ xVyWg7RHEbvSITQmkpmHpUG20w/3xt3rSTJqD0fUbBZgzWRJF9Ul5KkzCx4P5f1YtPyXrqGli3Z EpniEFow== X-Received: by 2002:a63:1110:: with SMTP id g16mr1802955pgl.357.1610408782639; Mon, 11 Jan 2021 15:46:22 -0800 (PST) Received: from [10.69.69.102] ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id x15sm754799pfa.80.2021.01.11.15.46.21 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 11 Jan 2021 15:46:21 -0800 (PST) Subject: Re: [PATCH v2] nvmet-fc: associations list protected by rcu, instead of spinlock_irq where possible. To: leonid.ravich@dell.com Cc: lravich@gmail.com, Christoph Hellwig , Sagi Grimberg , Chaitanya Kulkarni , linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org References: <20201224110542.22219-1-leonid.ravich@dell.com> <1609697575-103348-1-git-send-email-leonid.ravich@dell.com> <1609697575-103348-2-git-send-email-leonid.ravich@dell.com> From: James Smart Message-ID: <2d7f5b89-f8a2-f80f-cf8e-d7dc0470acca@broadcom.com> Date: Mon, 11 Jan 2021 15:46:20 -0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-Version: 1.0 In-Reply-To: <1609697575-103348-2-git-send-email-leonid.ravich@dell.com> Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg=sha-256; boundary="000000000000781c7905b8a883b4" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --000000000000781c7905b8a883b4 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US On 1/3/2021 10:12 AM, leonid.ravich@dell.com wrote: > From: Leonid Ravich > > searching assoc_list protected by rcu_read_lock if list not changed inline. > and according to the rcu list rules. > > queue array embedded into nvmet_fc_tgt_assoc protected by rcu_read_lock > according to rcu dereference/assign rules. > > queue and assoc object freed after grace period by call_rcu. > > tgtport lock taken for changing assoc_list. > > Reviewed-by: Eldad Zinger > Reviewed-by: Elad Grupi > Signed-off-by: Leonid Ravich > --- > 1) fixed sytle issus > 2) queues array protects by rcu as well > > drivers/nvme/target/fc.c | 81 +++++++++++++++++++++++------------------------- > 1 file changed, 38 insertions(+), 43 deletions(-) > > Reviewed-by: James Smart -- james --000000000000781c7905b8a883b4 Content-Type: application/pkcs7-signature; name="smime.p7s" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="smime.p7s" Content-Description: S/MIME Cryptographic Signature MIIQPwYJKoZIhvcNAQcCoIIQMDCCECwCAQExDzANBglghkgBZQMEAgEFADALBgkqhkiG9w0BBwGg gg2UMIIE6DCCA9CgAwIBAgIOSBtqCRO9gCTKXSLwFPMwDQYJKoZIhvcNAQELBQAwTDEgMB4GA1UE CxMXR2xvYmFsU2lnbiBSb290IENBIC0gUjMxEzARBgNVBAoTCkdsb2JhbFNpZ24xEzARBgNVBAMT Ckdsb2JhbFNpZ24wHhcNMTYwNjE1MDAwMDAwWhcNMjQwNjE1MDAwMDAwWjBdMQswCQYDVQQGEwJC RTEZMBcGA1UEChMQR2xvYmFsU2lnbiBudi1zYTEzMDEGA1UEAxMqR2xvYmFsU2lnbiBQZXJzb25h bFNpZ24gMiBDQSAtIFNIQTI1NiAtIEczMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA tpZok2X9LAHsYqMNVL+Ly6RDkaKar7GD8rVtb9nw6tzPFnvXGeOEA4X5xh9wjx9sScVpGR5wkTg1 fgJIXTlrGESmaqXIdPRd9YQ+Yx9xRIIIPu3Jp/bpbiZBKYDJSbr/2Xago7sb9nnfSyjTSnucUcIP ZVChn6hKneVGBI2DT9yyyD3PmCEJmEzA8Y96qT83JmVH2GaPSSbCw0C+Zj1s/zqtKUbwE5zh8uuZ p4vC019QbaIOb8cGlzgvTqGORwK0gwDYpOO6QQdg5d03WvIHwTunnJdoLrfvqUg2vOlpqJmqR+nH 9lHS+bEstsVJtZieU1Pa+3LzfA/4cT7XA/pnwwIDAQABo4IBtTCCAbEwDgYDVR0PAQH/BAQDAgEG MGoGA1UdJQRjMGEGCCsGAQUFBwMCBggrBgEFBQcDBAYIKwYBBQUHAwkGCisGAQQBgjcUAgIGCisG AQQBgjcKAwQGC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