Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp23651rdb; Thu, 21 Dec 2023 01:26:36 -0800 (PST) X-Google-Smtp-Source: AGHT+IFoVL5ND7KgMeFJ8Xc8yvGsS3zydrsf4Jm8T3+GMnxyTyc+rjHktw6upMIFRxGQQF/BS7dF X-Received: by 2002:a05:620a:2a10:b0:77f:4cd0:c0c with SMTP id o16-20020a05620a2a1000b0077f4cd00c0cmr24620184qkp.36.1703150796453; Thu, 21 Dec 2023 01:26:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703150796; cv=none; d=google.com; s=arc-20160816; b=FAzvI3raQH9vv5EvIu2kbN6cXqFLr3USLyIlsLSSN4dwPZkTO0uF+bQrtrpW7QjXR8 FehfzYeUzSPiP4lNu7qw+lhQ12VY8JQ0Ygz/U2N6QziTnTRGe3LZvKZTiB5EJ/sh9LGp 9WXdkp88GlgkSkGxD9czCYEYHmLcL003W5TdghNr7hNRsH0s2g7+8Ar6ZDrEYc/wVUC5 7qNrJ/F7Hr1p7Mlc5REqhgddl1z53uaI6944KG2nygwClZ1f98hkt/Bbl6o/IjKlYRwQ ZU5zEwaepfJ8jf8Bz3CFEA5x/EkrxzJJJOZABTx0J8PjiQ7qgIG6TZtHaPmrsD9FPTzU Qz+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature:dkim-signature:dkim-signature :dkim-signature; bh=afsZBjEJLNrRami7LX1LeXszkJWNZ3H/aGbmJJOwZlM=; fh=fk59I/m5YEOvKHbgpC0xkPDLtw80O/njCgW8zbySndI=; b=fiWsY2kyT1QjdetWeV5HnZZtBf40j6jbj/b59xCx+diOVhbKcK6He1hJUDdlW6SEpG 6Q5eniAmad2k8hrvlTIfx0JR89ZuXePjDVMyc+u+DWPnDCvkBoIBVuedqPcWdzIZlzJm gwXBN91w78LRd4Qno6YSG0EztRZNxs7rYBHNlV0kRubzZXuJO1uq3r7l5K4Swic0pwcD 7SSapBtMW/IrZKFQs5iTvD2idO71zmmIWapSJeqj2fFlk3X8OlfeG2ItlohBd8WcKYR1 wqeLq2laIKA2TNER/vhq+lDbX4/qb7pbxCsYGBWzTSxo7wLwIiQpjbKEDk9HFvj7h9Km abCA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=ZgGBLaUT; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=ZgGBLaUT; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; spf=pass (google.com: domain of linux-kernel+bounces-8104-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-8104-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id v23-20020a05620a0a9700b0077f38ed0e4bsi1584243qkg.722.2023.12.21.01.26.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Dec 2023 01:26:36 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-8104-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=ZgGBLaUT; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=ZgGBLaUT; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; spf=pass (google.com: domain of linux-kernel+bounces-8104-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-8104-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id E549C1C23784 for ; Thu, 21 Dec 2023 09:26:35 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7AC494F605; Thu, 21 Dec 2023 09:17:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="ZgGBLaUT"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="Rly12+U8"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="ZgGBLaUT"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="Rly12+U8" X-Original-To: linux-kernel@vger.kernel.org Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 156C84F5E9 for ; Thu, 21 Dec 2023 09:17:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id F3BAF1FB5E; Thu, 21 Dec 2023 09:17:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1703150250; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=afsZBjEJLNrRami7LX1LeXszkJWNZ3H/aGbmJJOwZlM=; b=ZgGBLaUTZ35sdBmN9jxBqi+ypLe/Y7Lj8/0MAODO3Ue3wxzDDLga38e2V857u71DgEbbC+ V0HKyRC976bzKBJ3Ko00HyeHGvpXuw/7eNmYo2LkFwAIbc8UanIrpeLzUMIxjKnhqOv6Q1 suWc+Z2QybrJtPjj2K32HWBhCC93X5w= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1703150250; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=afsZBjEJLNrRami7LX1LeXszkJWNZ3H/aGbmJJOwZlM=; b=Rly12+U8wxzKyL98Ki48+s5PiiXsqV0wtep7Xwf7FBFlJmQs6S0pxFhMvJCn/7JSAm6uNN fXaed7EDXbtES/CA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1703150250; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=afsZBjEJLNrRami7LX1LeXszkJWNZ3H/aGbmJJOwZlM=; b=ZgGBLaUTZ35sdBmN9jxBqi+ypLe/Y7Lj8/0MAODO3Ue3wxzDDLga38e2V857u71DgEbbC+ V0HKyRC976bzKBJ3Ko00HyeHGvpXuw/7eNmYo2LkFwAIbc8UanIrpeLzUMIxjKnhqOv6Q1 suWc+Z2QybrJtPjj2K32HWBhCC93X5w= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1703150250; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=afsZBjEJLNrRami7LX1LeXszkJWNZ3H/aGbmJJOwZlM=; b=Rly12+U8wxzKyL98Ki48+s5PiiXsqV0wtep7Xwf7FBFlJmQs6S0pxFhMvJCn/7JSAm6uNN fXaed7EDXbtES/CA== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id DEEA713725; Thu, 21 Dec 2023 09:17:29 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id Hmn+NKkChGX0LgAAD6G6ig (envelope-from ); Thu, 21 Dec 2023 09:17:29 +0000 Date: Thu, 21 Dec 2023 10:15:15 +0100 From: Daniel Wagner To: Christoph Hellwig Cc: linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org, Sagi Grimberg , Keith Busch , James Smart , Hannes Reinecke Subject: Re: [PATCH v3 08/16] nvmet-fc: untangle cross refcounting objects Message-ID: References: <20231218153105.12717-1-dwagner@suse.de> <20231218153105.12717-9-dwagner@suse.de> <20231219051648.GA32634@lst.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231219051648.GA32634@lst.de> X-Spam-Level: Authentication-Results: smtp-out2.suse.de; none X-Spam-Level: X-Spam-Score: -0.89 X-Spamd-Result: default: False [-0.89 / 50.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; RCVD_COUNT_THREE(0.00)[3]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-1.000]; RCPT_COUNT_SEVEN(0.00)[7]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; MID_RHS_NOT_FQDN(0.50)[]; RCVD_TLS_ALL(0.00)[]; BAYES_HAM(-0.09)[64.28%] X-Spam-Flag: NO On Tue, Dec 19, 2023 at 06:16:48AM +0100, Christoph Hellwig wrote: > On Mon, Dec 18, 2023 at 04:30:56PM +0100, Daniel Wagner wrote: > > The live time of the queues are strictly bound to the lifetime of an > > > + struct nvmet_fc_tgt_queue *_queues[NVMET_NR_QUEUES + 1]; > > struct nvmet_fc_tgt_queue __rcu *queues[NVMET_NR_QUEUES + 1]; > > For magic prefixes we use __, not _ in Linux. But having two arrays > of queues right next to each other, once with rcu annotation and one > not rings a bit far warning bell to me. Why do we have both? When > are we supposed to use either? Why is FC different from rest? This is my attempt to solve the problem that after NULLing the rcu pointer and wait for an RCU graceperiod I still need to cleanup the queues. Thus I need to keep hold on the queue pointers a bit longer. Indeed not so elegant. I'm sure there is a better way to do it, I just didn't figure it out when I wrote this part. Any tips are highly welcomed how to solve this puzzle. > I really don't have any good answers as I don't know the code in the > FC transport very well, but I think this needs more work. Indeed, blktests still is able to run into a hanger. So not all problems are sovled but getting closer.