From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-176.mta1.migadu.com (out-176.mta1.migadu.com [95.215.58.176]) (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 551584477FD for ; Tue, 4 Aug 2026 16:40:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.176 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785861670; cv=none; b=K4/R2cQUX0goAb7UvlQzfDjQcJOHTXU/qOsLzVcOjtWwMXhQp2A+hOpYma4eFrDvmE4bSs2YMimYbZH2BCOErLUCvgyHWxvMUcwNpoECGHwMsovuk0sbuWKnwVNb+4pz1LftT/xD1A2jkYQtxFjM6/ocxjKnKvIyHus4cMoUuzc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785861670; c=relaxed/simple; bh=1rEyqclldzTlRMN/AldUDcn7kFoSeZ7hYvNB9+V83yA=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version:Content-Type; b=HGyasCDvf0phNjZrSRnhWFcvsN1YtF7Wbj/IqkRIWdUeCWrFpshYJQEKJrbs6eBPkLsc34HTJpiykebd+6uxDjHW9uJJweL7QRPDvnHcqN23Xkmk7PkgJLcrGyd1c8ltHPiqGQmE/kF+DDhTfFGJse+lE2yF4tdkSYrKEYyoKBc= 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=eRqloOZO; arc=none smtp.client-ip=95.215.58.176 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="eRqloOZO" X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1785861641; 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=1rEyqclldzTlRMN/AldUDcn7kFoSeZ7hYvNB9+V83yA=; b=eRqloOZOc+iUWi2m+4Ga57Qxw0D7koCv5Zp5lecOUfxrUH7pOL7M3GfsnTPi2Jkpkac0Cf AbR9dIDbXbng+tRENAeiK4UG5KPqM9YTJy3dxZLjlxjgWx4KXNryL4ZJq+oy4w428H2/WA 2FqT/O1Q3rON9/PRlN5h2phF4NUXhss= From: Lance Yang To: atomlin@atomlin.com Cc: akpm@linux-foundation.org, mhiramat@kernel.org, pmladek@suse.com, linux-kernel@vger.kernel.org, david.laight.linux@gmail.com, neelx@suse.com, sean@ashe.io, chjohnst@gmail.com, steve@abita.co, mproche@gmail.com, nick.lange@gmail.com, Lance Yang Subject: Re: [PATCH v7 1/2] hung_task: Reset warning budget when problem gets resolved Date: Wed, 5 Aug 2026 00:40:10 +0800 Message-Id: <20260804164010.79596-1-lance.yang@linux.dev> In-Reply-To: <20260804155406.254810-2-atomlin@atomlin.com> References: <20260804155406.254810-2-atomlin@atomlin.com> 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=UTF-8 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT On Tue, Aug 04, 2026 at 11:54:05AM -0400, Aaron Tomlin wrote: >From: Petr Mladek > >sysctl_hung_task_warnings counts how many hung tasks are reported. >The watchdog does not report anything once the limit is reached. >Currently, this budget is decremented permanently, meaning the kernel is >left blind to subsequent hung tasks even after the original issue resolves. > >Keep the global sysctl_hung_task_warnings intact, and instead decrement >a copy (hung_task_warnings_printed) when warnings are printed. Reset >the copy back to the configured sysctl_hung_task_warnings limit once the >problem on the system gets resolved and check_hung_uninterruptible_tasks() >detects no hung tasks in a check interval. > >Also keep the copy updated when the global sysctl_hung_task_warnings >value is updated via sysctl, and update documentation to reflect >the new behavior. I'd go with something like: " hung_task: separate warning limit from runtime budget sysctl_hung_task_warnings currently holds both the configured warning limit and the remaining budget. Each detailed report decrements the sysctl, so once it reaches zero, the configured limit is lost and cannot be restored automatically. Keep sysctl_hung_task_warnings unchanged and track the remaining budget in hung_task_warnings_printed. Reset the runtime budget when a watchdog check sees no hung tasks or when userspace writes a new sysctl value. " [...] Cheers, Lance