From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6B9213FE663 for ; Tue, 24 Mar 2026 14:15:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774361748; cv=none; b=qxbZlubYjh9Hah5hEzVWMR7IfP81KLtu2l6GpqEtjpYX39yCSRVx6i2d/zW5pPE3kDxAOrhE2pAkMW5830Exa7l5ryMtzjzyljoUFd2yCzoNnyWYNQUSNiYPJsrpix+KdVJrK54bEK1LIPD912OZK6QbCftg+wChveFAY/GUdiI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774361748; c=relaxed/simple; bh=TmuBaPH8UkKVv9/B3y+EkuR7tyFkYBmvr/HOHPdY8XI=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=sPEXGPAoOF+qH5bfF0WVTXzX1p1WhIXFxygUjWzU8CLY8K5D3g3Irsjt+j8o2Q0YG109cOR+7S1roR/wxipoDwWXvjR65GjA6SW/CnVEH/+TJHiDKTWqfRVx53e9Mmo2gLeCXIRbEg8vgETOjY35NgEhCbhMEov4I1I9Vc2tEwI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=DUNJwQWc; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="DUNJwQWc" Received: by smtp.kernel.org (Postfix) with ESMTPSA id B5A5EC19424; Tue, 24 Mar 2026 14:15:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1774361747; bh=TmuBaPH8UkKVv9/B3y+EkuR7tyFkYBmvr/HOHPdY8XI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=DUNJwQWcDpFE2OGIrwLsxNnuda6FkvfymgngEUwrbd+SjNA+HRV9CVdMiEeN4LHnw MQMksOZpk1Dcp++ZOjlIRLwDiwO0eYKUGakLwaZFkrE5v6Kk7C1luQufAOjNn/bivt Hu0NM/j2o0GKXYeUTK7SuEMwgIF2GjoyGGsSersUVP+M2fQuV4JZKmpzO1h4u7xh1X gBf0W+Y8awlmEJDc6rJhLDAv2NsPIkxee+wyaSThF6GpC8NnYVyt/Z9jbeauuQ/KQW Ip7UHHQbK5nkIN5x+qev8EoAB/XDIlw0XaO+eo/FM1boAAK+afds0yvGSw2HVSX2dH 4sCMRXymBwTSA== Date: Tue, 24 Mar 2026 04:15:46 -1000 From: Tejun Heo To: Petr Mladek Cc: Song Liu , linux-kernel@vger.kernel.org, jiangshanlai@gmail.com, leitao@debian.org, kernel-team@meta.com, puranjay@kernel.org Subject: Re: [PATCH v2] workqueue: Fix false positive stall reports Message-ID: References: <20260322033045.3405807-1-song@kernel.org> 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: On Tue, Mar 24, 2026 at 11:01:30AM +0100, Petr Mladek wrote: > You know, the code makes my head spin because it violates the usual > locking rules. The lock should serialize 2 or more writes/reads. > It works only when all the reads/writes are done under the lock. > But it is not the case here. It's unusual but not unique. We would have used spin_unlock_wait() here (w/ rmb()) here but we don't have that anymore. Maybe a clearer way to indicate what's going on now is just doing lock/unlock() cycle without doing anything inside, but, as long as the comment explains what's going on, I think either way is fine. So, if anyone can improve the comment without writing a novel, plesae go ahead. Thanks. -- tejun