From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-189.mta1.migadu.com (out-189.mta1.migadu.com [95.215.58.189]) (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 E5E3536D51A for ; Mon, 1 Dec 2025 03:09:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.189 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764558548; cv=none; b=V0MUUElHTtDnZIznADuySQ2DydJqVNj9K2NispMkBUcABEjdhsqdF3vr3t8CumjvE5SYFuswBUqK2cxGvvnBoM5k/7h4OW6maEXdkM04eEEYPiWUcNjCqQ3v0OwuIiTSRZ7kTmUBrQmLLkQPI620TwMMl73XFXdMaz9x94dVY3U= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764558548; c=relaxed/simple; bh=lIKxgSUZbj7cy95SuTIbDLnJgRxCowQ7e9M9U5Vx8ZA=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=sbpZ+xz5Hct4Yuv1XZx7L2ChEDWlbXc0NeJwZF/8N/gIxvbqHsp4cr0zbDyTSJTnzfnsKurLhUwwkxB0rArz2GGLd/ToFfe2CXnlgRbeFq3NF+FCj6iqR4nP39wgdLolnOSZSxcBBGVUaoY7y8dHuiPuedpM/n921aMB4t4HBgA= 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=PTYouEUf; arc=none smtp.client-ip=95.215.58.189 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="PTYouEUf" Message-ID: <03ea687c-2533-4aa4-bdb4-81128c907723@linux.dev> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1764558541; 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=2/h7v/1qLxYbEatXfX4blW9ZyT+tANDm+bSc+nK187E=; b=PTYouEUfiHRnXUXRzh2RfYuGP03xcZ1LsSHaQi13OTkB9wmnM8hS0DC1ljFbh63miFoL+1 1QRr4STYMXeJ/taSeW3l8jOV3v46MGHSYQYfT+KigkOJX8iFMDPuB8VxfEAiSQDAJhVphk 6z0lPOKH8EEYkDDQswVqeyHrEdUEL/Q= Date: Mon, 1 Dec 2025 11:08:54 +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: Migrate hung_task_detect_count to sysfs Content-Language: en-US To: Aaron Tomlin Cc: linux-kernel@vger.kernel.org, mhiramat@kernel.org, akpm@linux-foundation.org, gregkh@linuxfoundation.org, Petr Mladek References: <20251129235159.1227977-1-atomlin@atomlin.com> <3e672e64-c03d-4129-ac13-13a45135b0f1@linux.dev> X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Lance Yang In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_OUT On 2025/12/1 01:11, Aaron Tomlin wrote: > On Sun, Nov 30, 2025 at 01:43:51PM +0800, Lance Yang wrote: >> Hi Aaron, > > Hi Lance, > > >> Thanks for the patch. > > No problem. > >> Emm, I don't think we should do this :) >> >> Removing the sysctl file is going to break userspace tools that >> currently read it ... > > Thank you for your feedback. I appreciate the concern regarding user-space > compatibility and the potential maintenance overhead of dual interfaces. > > I agree that removing the sysctl entry entirely right now is too > disruptive, as it would immediately break existing user-space tools relying > on /proc/sys/kernel/hung_task_detect_count. Your point about avoiding > unnecessary churn and maintaining two interfaces is well-taken. > > However, I believe that moving the counter to sysfs is still a worthwhile > long-term goal for the following reasons: > > 1. Consistency and standardisation: Moving read-only counters to > /sys/kernel/ aligns with current kernel conventions and provides a > more consistent location for performance and diagnostic metrics. > This follows the pattern of existing counters like > /sys/kernel/softlockup_count. > > 2. Graceful Migration Path: By adding the > /sys/kernel/hung_task_detect_count entry first (as a read-only > counter) and keeping the legacy > /proc/sys/kernel/hung_task_detect_count file in place, we provide > the necessary backwards compatibility and offer a grace period for > user-space tools to migrate. The old sysctl file can then be flagged > for deprecation in a future release. > Deprecating established sysctl ABIs is often a very long process(sometimes indefinite) ... and I would prefer to avoid introducing redundancy unless strictly necessary or the current interface is functionally deficient :) So, it's a NACK from my side regarding the interface migration. > I am currently working on some additional updates for kernel/hung_task.c. Please let's keep it simple and leave the interface as is. I look forward to your other updates for hung_task.c! [...] Thanks, Lance