From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-182.mta1.migadu.com (out-182.mta1.migadu.com [95.215.58.182]) (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 66B9418D658 for ; Fri, 16 Jan 2026 02:22:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.182 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768530166; cv=none; b=WvysqZKGD6QDDjBpgz7fGcNK9hZAhnPft4yZ6+McxI4nBXD2alZs6kuKxOdfsmcAbkbe4IsCRQjWOyQFZPM5Dlf4AszEQAg4PQFsvCyRlXKqwTgaBWutbwrfj4sW8kQGFNMxJ/Hf0lzeYH072R7inSlCDE15V6r/Q1HcEqB3APw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768530166; c=relaxed/simple; bh=E/vsPeT0elRIRcZV3QvA4Q7bFWKZ4mj5oAR5J+MosoE=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=SXuFPEQK9j4XsCbHeIs7gdtdbXMd/ZcJfl/3VyQK5YKNTkzbCuFMZ9k1K9nr0hB01MTw+UBbIAqbVQyzLiJNn6Lm6lwK5Z1y1kn1JsCBT8aJEZ/KKJxmgtBOaK6n4oPBszy6cxczlkBDnZpHygG1pUKptSE45t07BWgiAwZHrWg= 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=Zyw3WJse; arc=none smtp.client-ip=95.215.58.182 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="Zyw3WJse" Message-ID: <0b4a76d3-9dcc-450c-9902-dc37b84eb2cb@linux.dev> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1768530162; 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=SW+NKPR9w/hVVjTskRgTlWsYDfq5uOPbMMYs2yC7xGA=; b=Zyw3WJseF1qBZv2KTg3TdeWw28dtY6xp4PCu2ZrcKXGlkks2cJaPXKsjsv6Km6uwocdL8k fYUxLi1HgoD2M2HHb/9/AW4q0kDLMeuQ8kEpB9tjOaQpJ6Y21Rhjn3WTmNaQWr8lMLsL9T jPQD6hv5HJKutAKqSM7p+P/P5srL1ts= Date: Fri, 16 Jan 2026 10:22:34 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Subject: Re: [v6 PATCH 0/2] hung_task: Provide runtime reset interface for hung task detector Content-Language: en-US To: Aaron Tomlin Cc: sean@ashe.io, linux-kernel@vger.kernel.org, pmladek@suse.com, gregkh@linuxfoundation.org, akpm@linux-foundation.org, joel.granados@kernel.org, mhiramat@kernel.org References: <20260115023229.3028462-1-atomlin@atomlin.com> <3783efcc-f5f3-433d-a812-dc95030c87f1@linux.dev> <446y53ztmkyw5pqp6klxwd74cvwbjoptzezurr6qxg46frieg3@mbwmglq2qth5> X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Lance Yang In-Reply-To: <446y53ztmkyw5pqp6klxwd74cvwbjoptzezurr6qxg46frieg3@mbwmglq2qth5> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_OUT On 2026/1/16 02:18, Aaron Tomlin wrote: > On Thu, Jan 15, 2026 at 11:24:13AM +0800, Lance Yang wrote: >> IIUC, we should just do: >> - Patch 1: Full cmpxchg-based counting (Petr's POC), sysctl read-only >> - Patch 2: Add write handler for userspace reset >> >> That way Patch 1 is the real logic change, and Patch 2 is just adding >> the userspace interface. > > Hi Lance, > > Thank you for your feedback. > If I am not mistaken, Joel suggested the following structure [1]: > > 1. Create a preparatory patch to change the data type to atomic_long_t > 2. Introduce the required functionality to support a reset to "0" > > [1]: https://lore.kernel.org/lkml/d4vx6k7d4tlagesq55yrbma26i2nyt4tpijkme6ckioeyfqfec@txrs27niaj2m/ > Yeah, either way works :) But that way (changing to atomic with the old logic first, then rewriting to the new logic) seems like it creates more churn and makes review harder. Or just all in one? I'd hope Petr and Joel can comment.