From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-178.mta1.migadu.com (out-178.mta1.migadu.com [95.215.58.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 56E7B3126A1 for ; Fri, 16 Jan 2026 02:11:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.178 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768529474; cv=none; b=Y5J7u1ggk/PTgUD3MNTfSzsbcVInoTJi5iJ3prYGpDcVf7vZbXpE8rxHUzDYzz+OONYEJvBwq03ruUNYDYnc6n07C/dgCncTnAgHOVRrAtO146wmw6j5hcqs9gEymSPYTOAgnlvQOlI+XNUXTerHA9CwLz5rDPaXA3j0sEzgKwc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768529474; c=relaxed/simple; bh=7ofZQhb0Pq0KPElW+Bwt3GHhqrMoGISrTKb8g3spFpk=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=ecvLi+fCy3zZQK/KKqCHPG/sVOeD7h9vuCjeiliGT5ZkT7Mn4pfxYWCXzs80UcOTrlI9Yd6z046alAOF26Uy3LPg0QF50CI+CiAhVhIPi6NdNEaJ5HaAFYE5uo1lTSdvsFKpSiqz7TfdVq5Xc95Me5sI0zAY1ltg5ZWPH3tGnko= 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=EqpLx3po; arc=none smtp.client-ip=95.215.58.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="EqpLx3po" Message-ID: <9e8c49cb-cbf9-4cdf-8dea-9abbb03e05a4@linux.dev> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1768529469; 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=ZkHdEl2cbYB/5B1/5dW1pe2J0Kiqf0WW83GqEbWUtYo=; b=EqpLx3poGY7jUHFaeHrt3nuFmkDi3wW3S+g2YfY2kyqBK5o9D88TzvW/uqjAzC5KNJS7lN Qeu/LirHs6a423sS6RbZ8XAW9FpmO7gTuK14wazFfFjvuL/QZy3n/GC//JXFo4KdOwNf3E gpLTplFHqMxyNmlr1e0kgHVw1XxbcvQ= Date: Fri, 16 Jan 2026 10:10:57 +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 2/2] hung_task: Enable runtime reset of hung_task_detect_count Content-Language: en-US To: Aaron Tomlin Cc: sean@ashe.io, linux-kernel@vger.kernel.org, pmladek@suse.com, gregkh@linuxfoundation.org, mhiramat@kernel.org, akpm@linux-foundation.org, joel.granados@kernel.org References: <20260115023229.3028462-1-atomlin@atomlin.com> <20260115023229.3028462-3-atomlin@atomlin.com> <8c753996-a649-4e43-8b26-cac4780bbcd0@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 2026/1/16 02:24, Aaron Tomlin wrote: > On Thu, Jan 15, 2026 at 11:06:16AM +0800, Lance Yang wrote: >> I see hung_task_diagnostics() is still in this patch. I thought >> we'd concluded that[1] the refactoring wasn't really necessary for a >> single-use block? >> >> [1] https://lore.kernel.org/all/noze3vhqjbsuulvvoaw4h5yeinggpwfslrit5vsd2dllfo4ath@qgmp22hoibgn/ > > Hi Lance, > > Please accept my apologies for the oversight; I certainly did not intend to > disregard our previous conclusion regarding the refactoring. > > However, in light of the additional modifications suggested by Petr, it > appeared to me that re-introducing hung_task_diagnostics() resulted in a > significantly cleaner implementation. By encapsulating the diagnostic > output logic, we separate the formatting concerns from the control flow, > which seemed to improve the overall readability of the function. > > That being said, if you still consider this abstraction to be redundant, I > am entirely amenable to dropping it and reverting to the inline approach. > > Please let me know your preference. Thanks for explaining! Personally, I still do not think the helper is necessary here. Especially for a single-use block, the abstraction doesn't add much value. The inline version is actually more straightforward - you can see the diagnostic output right where it's used without jumping to another function. Please drop the helper and keep that code inline :)