From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from stravinsky.debian.org (stravinsky.debian.org [82.195.75.108]) (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 A4E0133D4E5 for ; Mon, 23 Mar 2026 09:37:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=82.195.75.108 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774258678; cv=none; b=j+2L2mwP65e8VjrhTo7SM1VOIMoK+QrZwqn7aryqxR39Mv0IIkOMHwTYXnx/T23i764SqLgDhFy5NAtwV5ikjMZ530AxccBqn2KtggSGh5/5dhbKd4lOgxnLGeoTBwkkFXeG4iFfQnU7c8iS/fRxi6Ai3Ydx1HESLGjsVA0dEIo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774258678; c=relaxed/simple; bh=Df6Npj/Th9YfhiDGCDvgC5DBD4UMcAKPY4V015WltpA=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=RhOExegI/Fg4LnKQB6d1MsrEgwr0C6cXy5hychRixzUvFVJkDO5f6kP488TQLaruKNWhyqCeI63V/SE5onBZAbJN9LUfpFgc6qKFAK5jFmMcbERBIkR+cV2aDuTJePCsHBqaG+CMKn9zBV/4ACoqBepG0VIOUbh3VFxdM8/K/40= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=debian.org; spf=none smtp.mailfrom=debian.org; dkim=pass (2048-bit key) header.d=debian.org header.i=@debian.org header.b=daK2LaQi; arc=none smtp.client-ip=82.195.75.108 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=debian.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=debian.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=debian.org header.i=@debian.org header.b="daK2LaQi" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debian.org; s=smtpauto.stravinsky; h=X-Debian-User:In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=Dl0zjL+5+/C9MUEO1sH877+L2zE4AlkYJQTtkqcz90w=; b=daK2LaQikHoo3hk6MMdfuRP661 RkW63tYS9cwzX8KdjXM7ByETJQawISTvhT8mfqLvFiLZk2Vjf6ZYoJ2X32cWPtUdsTsxC4f5nmJh/ 8ab9SWRNbN7nQ/rNhobzN6pAQ1jm+437gTAcvvAkqGI0lBn9e+KGjL4yYaJ4YHid9kr4AO0lz7ugp v01c/N0TbGJJdu7N0cg1XhRLgfiCtv45c3oXZ2uw8ykSj3GPtsXM7qkEeRJwxOAMmTyj75l9HDnHC f1yNcQY/DSvwPE7MNvnNq6X65Dwvn+UlLU5irm+p9IbrAtv3CHcrZsL+Hp30QifcLUeF/01HCpPwU C6c4Cfww==; Received: from authenticated user by stravinsky.debian.org with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.94.2) (envelope-from ) id 1w4bjO-007R7p-3E; Mon, 23 Mar 2026 09:37:52 +0000 Date: Mon, 23 Mar 2026 02:35:20 -0700 From: Breno Leitao To: Song Liu Cc: linux-kernel@vger.kernel.org, tj@kernel.org, jiangshanlai@gmail.com, pmladek@suse.com, kernel-team@meta.com, puranjay@kernel.org Subject: Re: [PATCH] workqueue: Fix false positive stall reports Message-ID: References: <20260320192332.1726079-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: <20260320192332.1726079-1-song@kernel.org> X-Debian-User: leitao On Fri, Mar 20, 2026 at 12:23:32PM -0700, Song Liu wrote: > On weakly ordered architectures (e.g., arm64), the lockless check in > wq_watchdog_timer_fn() can observe a reordering between the worklist > insertion and the last_progress_ts update. Specifically, the watchdog > can see a non-empty worklist (from a list_add) while reading a stale > last_progress_ts value, causing a false positive stall report. > > This was confirmed by reading pool->last_progress_ts again after holding > pool->lock in wq_watchdog_timer_fn(): > > workqueue watchdog: pool 7 false positive detected! > lockless_ts=4784580465 locked_ts=4785033728 > diff=453263ms worklist_empty=0 > > To avoid slowing down the hot path (queue_work, etc.), recheck > last_progress_ts with pool->lock held. This will eliminate the false > positive with minimal overhead. > > Remove two extra empty lines in wq_watchdog_timer_fn() as we are on it. > > Assisted-by: claude-code:claude-opus-4-6 > Signed-off-by: Song Liu Acked-by: Breno Leitao