From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-178.mta0.migadu.com (out-178.mta0.migadu.com [91.218.175.178]) (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 EA9FE823DD for ; Sat, 7 Feb 2026 06:10:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.178 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770444644; cv=none; b=XxrHlup1xmNB3nRcYEw3NytcazacPpY5WG3zgggvwtDC+OudlFWXWVtH8qh8ZoMOdHwwWvd7hwUNrleewzxxUqc/2IX0zyYu/2iF0cjPl1gGysgLSTdiixyc+tgAyEx6w4jKUyEitcKcrNtZwy5kzmnsYhXRnZd3IT8NCElnDlk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770444644; c=relaxed/simple; bh=lfJEGum6wK50Tsatan64Q3EVaQe+9MKvMEw06AqnaWs=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=aW5PMoOe83i+8MbF9qryU4c+YgmxCJnfYEnRevyPUcUr9TrST1JkRHKl56GO1Dx8tZublcgurpUZVBpRPdjIXwiFx3ZSbkOcsne8i0hKGarZMZ/tOVkOJOyU/8J62rHYfFZ6xXy/KTsrHO+1qE8XMeOPZLSHtrqh/q/dfJ5UWYU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=I6nJxNHc; arc=none smtp.client-ip=91.218.175.178 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="I6nJxNHc" Message-ID: <74f33626-85c5-4bed-866d-1be20ecb09a5@linux.dev> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1770444641; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Rq4gDiYMyDI2dD17h+mYkfZYqTZGdmDBopPgDo5zCng=; b=I6nJxNHcTjUkscvhW9K41/bBMTVk7uYfTFiIfUQFKCDoc+foYW0LTCFjjxOnLTjl8EcXjc RNFKngukehWo5aVCpr7Nwp5uZ3HvSqNI3EBJ1Wie3jnWXASQmRDH6jgJiePKDgNdHrA2OL 0UFFAXmgiI9/8UjD2TTjQBhzLO9nuZg= Date: Sat, 7 Feb 2026 14:10:35 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Subject: Re: [PATCH] hung_task: Increment the global counter immediately Content-Language: en-US To: Aaron Tomlin Cc: Petr Mladek , neelx@suse.com, sean@ashe.io, mproche@gmail.com, chjohnst@gmail.com, nick.lange@gmail.com, linux-kernel@vger.kernel.org, mhiramat@kernel.org, joel.granados@kernel.org, gregkh@linuxfoundation.org, Andrew Morton References: <20260125135848.3356585-1-atomlin@atomlin.com> <20260125135848.3356585-2-atomlin@atomlin.com> <45c17b93-a6f1-45e0-8b25-20665a281949@linux.dev> <20260204100549.48436218179994b0303c8f49@linux-foundation.org> <6dgy332i25cmevxyq2rbhts4nygrr4w4ijbai7vppyrqwlhmag@rdleiex3o3ig> X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Lance Yang In-Reply-To: <6dgy332i25cmevxyq2rbhts4nygrr4w4ijbai7vppyrqwlhmag@rdleiex3o3ig> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_OUT On 2026/2/7 04:54, Aaron Tomlin wrote: > On Wed, Feb 04, 2026 at 10:05:49AM -0800, Andrew Morton wrote: >> On Wed, 4 Feb 2026 12:04:54 +0100 Petr Mladek wrote: >> >>> A recent change allowed to reset the global counter of hung tasks using >>> the sysctl interface. A potential race with the regular check has been >>> solved by updating the global counter only once at the end of the check. >>> >>> However, the hung task check can take a significant amount of time, >>> particularly when task information is being dumped to slow serial >>> consoles. Some users monitor this global counter to trigger immediate >>> migration of critical containers. Delaying the increment until the >>> full check completes postpones these high-priority rescue operations. >>> >>> Update the global counter as soon as a hung task is detected. Since >>> the value is read asynchronously, a relaxed atomic operation is >>> sufficient. >>> >>> Reported-by: Lance Yang >>> Closes: https://lore.kernel.org/r/f239e00f-4282-408d-b172-0f9885f4b01b@linux.dev >>> Signed-off-by: Petr Mladek >>> --- >>> This is a followup patch for >>> https://lore.kernel.org/r/20260125135848.3356585-1-atomlin@atomlin.com >>> >>> Note that I could not use commit IDs because the original >>> patchset is not in a stable tree yet. In fact, it seems >>> that it is not even in linux-next at the moment. >> >> Yes, I've gone into "fixes and trivial stuff only" mode, as we're at -rc8. >> >> Aaron, please incorporate Petr's fix into v8 and resend towards the end >> of the merge window? >> >> Thanks. > > Hi Andrew, > > Absolutely. Don't forget to credit Petr - just saying :)