Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2466943pxj; Mon, 31 May 2021 02:59:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz7QosqYxsZq+JuLTxYa4Nz4GSpP49Utz91ZwCPq+LX2qK8gnpwvYyO1ib5OCKBqdetBUGd X-Received: by 2002:aa7:c1da:: with SMTP id d26mr15818879edp.92.1622455166676; Mon, 31 May 2021 02:59:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622455166; cv=none; d=google.com; s=arc-20160816; b=zUBNHB3gzHcefvnYQIg4oPJnojfvOBSdCurbs3iZmeiCWiVIa7kZezsbSoJmc9lYiq g+i3i/fgRP0djnEYWPMq8bqJK0ragW4DaWce9a0OM9Ve/JPabpQGjT7nht3z3lDrBIj3 d/0j4jGPK8CV4s+PWN3QPnnl9btiqYlTEQs+V8ANaHiehMe4rVEVvOCASNBsQtXrpalV YhHJyqkU6kzQm0d+2n1ldAnMvtdvirPxGresd/tn0nQy4BkAjRnJAnEmUbE7vBD/30UJ jvSh8CAv118AzCTMtShODJXQ9clPR0dJa/SJzAtueZvyxNui1f4kr6sM4Gb2n/Y9NWzz mpBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature :dkim-signature:dkim-signature:dkim-signature; bh=PsaOqiqoXWrjn0nPj1JATIKpBDJ2qCcY94qyg0GadOw=; b=PbeY6l7rXWNJMgETaPsu9SduyDe6vqdcDk8nMwxaEXOOx5kjWfM8tSc4qYl/i9UPtu PFL+9frDIbu1jGWgUVtWnRtxmQCEr+1oJaJqFud2/pwepb7wfzVya3yDcQtj1TGiacz7 T7Lr99If2xxhBAb5Fh71lu8QhUiBdJTKHUU+t20kcKemNew4s/MxyftgRDHuWBF7O/Ib PGNVNpv+oR5HVM0e9qdHqeQdHoRkI0oAS5OsnwvQZAN1UCY10/6F4PTygYnbJMuPGmo4 BfgTcgcsUgywVHr8bjnha9U2qN9vFPYWa5N9daeqbohBJAyT9J1WMkquPCjSSg/Kh6Tq l3Vw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=NezQa7NJ; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b=okgtpgit; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=NezQa7NJ; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id au2si13066699ejc.88.2021.05.31.02.59.04; Mon, 31 May 2021 02:59:26 -0700 (PDT) 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=@suse.de header.s=susede2_rsa header.b=NezQa7NJ; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b=okgtpgit; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=NezQa7NJ; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231192AbhEaJ51 (ORCPT + 99 others); Mon, 31 May 2021 05:57:27 -0400 Received: from smtp-out2.suse.de ([195.135.220.29]:48676 "EHLO smtp-out2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230518AbhEaJ5Y (ORCPT ); Mon, 31 May 2021 05:57:24 -0400 Received: from imap.suse.de (imap-alt.suse-dmz.suse.de [192.168.254.47]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id DEFED1FD2F; Mon, 31 May 2021 09:55:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1622454943; 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=PsaOqiqoXWrjn0nPj1JATIKpBDJ2qCcY94qyg0GadOw=; b=NezQa7NJybwjplXcWX9vrOS2UW9g00TyrtNiCZImeZaK8lAZohe3QRiobS62x0Tny3gwiP sSqyKJAWHqE8z+WAeam+AX1O+cFltVNEB7lhrdBICZ9cILT09eq77ouyy39rI+azmE1UDS ouLcV67Sn43Xn/aDCj6FTwJFR2/SsUw= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1622454943; 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=PsaOqiqoXWrjn0nPj1JATIKpBDJ2qCcY94qyg0GadOw=; b=okgtpgith/oJaA98g3skKG1aSJDOVEW9UhEwlSjcEmm1vX7hr+rbFGgiDk+ZAzw05ALHwl bx/JgRNCORmf0oBw== Received: from imap3-int (imap-alt.suse-dmz.suse.de [192.168.254.47]) by imap.suse.de (Postfix) with ESMTP id BBD13118DD; Mon, 31 May 2021 09:55:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1622454943; 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=PsaOqiqoXWrjn0nPj1JATIKpBDJ2qCcY94qyg0GadOw=; b=NezQa7NJybwjplXcWX9vrOS2UW9g00TyrtNiCZImeZaK8lAZohe3QRiobS62x0Tny3gwiP sSqyKJAWHqE8z+WAeam+AX1O+cFltVNEB7lhrdBICZ9cILT09eq77ouyy39rI+azmE1UDS ouLcV67Sn43Xn/aDCj6FTwJFR2/SsUw= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1622454943; 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=PsaOqiqoXWrjn0nPj1JATIKpBDJ2qCcY94qyg0GadOw=; b=okgtpgith/oJaA98g3skKG1aSJDOVEW9UhEwlSjcEmm1vX7hr+rbFGgiDk+ZAzw05ALHwl bx/JgRNCORmf0oBw== Received: from director2.suse.de ([192.168.254.72]) by imap3-int with ESMTPSA id qm3iLJ+ytGAIaAAALh3uQQ (envelope-from ); Mon, 31 May 2021 09:55:43 +0000 Date: Mon, 31 May 2021 11:55:43 +0200 From: Daniel Wagner To: Arun Easi Cc: linux-scsi@vger.kernel.org, GR-QLogic-Storage-Upstream@marvell.com, linux-kernel@vger.kernel.org, Nilesh Javali Subject: Re: [EXT] [RFC 0/2] Serialize timeout handling and done callback. Message-ID: <20210531095543.gszkwzrmx4nhpfqn@beryllium.lan> References: <20210507123103.10265-1-dwagner@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Authentication-Results: imap.suse.de; none X-Spam-Level: X-Spam-Score: 0.00 X-Spamd-Result: default: False [0.00 / 100.00]; ARC_NA(0.00)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_NO_TLS_LAST(0.10)[]; RCVD_COUNT_TWO(0.00)[2]; RCPT_COUNT_FIVE(0.00)[5] X-Spam-Flag: NO Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Arun, On Mon, May 31, 2021 at 02:06:24AM -0700, Arun Easi wrote: > Thanks Daniel for the report and your effort here. Agree, this needs to be > fixed. Good to hear! > If you do not mind, can I take this from here? This touches quite a > number of paths, and I would like to have this go through a full > regression cycle before this is merged. Sure, that is what I hoped for. It is an invasive change and this needs to be properly tested with a few different setups. Something I can't really do. So I would be glad if you could pick up the patches and fix them up. > That said, I had some general comments: > > 1. I see sp->lock was introduced, but could not locate where it was > used. I thought I needed it for serializing the kref operations. The lock itself is not used in the driver. After re-reading the documentation, the lock is not necessary as kref_put() is able to serialize the ref counter inc/dec operation correctly. The lock would only be useful to serialize the kref_put() with something which runs in the driver concurrently. > 2. I did not see a release of lock after a successful kref_put_lock, maybe > that piece was missed out. I think you got it right. The lock is not necessary. > 3. The sp->done should be invoked only once, and I do not see if this is > taken care of. qla2x00_sp_release() will only be called when the ref counter gets 0. This makes sure we only call sp->done() once. > 4. sp->cmd_sp could be a SCSI IO too, where sp is not allocated > separately, so qla2x00_sp_release shall not be called for it. Okay, didn't realize this. Thanks, Daniel