From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (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 9187B3CF68E for ; Wed, 25 Mar 2026 13:54:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=90.155.92.199 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774446887; cv=none; b=m+NsbZAA+COY1HItYLZjNugosUc/xW/TLdwbrVlqKgm5BiWWvcoSovQGLAnF/Z+RzFfzyQG1+nqKDTI7AsbRCAKOaXpJHH0PzKu6ufwSZ00mWe3CT/qvnDjGT5nNty/fS6MIOui2HiKjmPjNe6HjCRqxu8ZcLRLdL1xxyxMcRT0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774446887; c=relaxed/simple; bh=xWZm2gDz/0fET5Pcfwt/zmHdBmeJV8JglFAgZ65Xm7g=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=grGmg0bdrWXCt5ghmGKSs66bZAXF4jGgJbX1QdvU+FB0NGgH4SuI2qNOnlW5PjQlW/YmxH/omeWjBD1NW4ZngqZNu8ua4KOX8KX2sBzFPy0e3XH94BGIBOkMk/WthTMDrrnADuhovXF/GgBpdxE90JacLOLbDTrkWOm5q6JhEYE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=infradead.org; spf=none smtp.mailfrom=infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=ZuRQYmzT; arc=none smtp.client-ip=90.155.92.199 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=infradead.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="ZuRQYmzT" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=At8D6t8yuaFnfRWs27P1HqTbJ1UkmyaaaoFtD7Fze7Q=; b=ZuRQYmzTxU3qqN7KW/tJ3a0YIq 5jz9qSvxevYd9Fm/Ve56OoZKHRBbZA8BqBzZhAgpCGEmUnqF1fhtbbpgTemGPRZqP5GSC9fkrQdPM Ycnlh1WVoZPvFcgGaPKmdIXfVipRvyvCL11kK/BjB8ApUPSW4pd0uDtvsEXhMR0CBjd2UCrlvWI+A B8In2rc2thyDtYDkgfPlyQTI8u4MhhJKF4TtHDvyIotw1wNTf0stnc3vMmFYO2U2dNT5SFtkiof87 4JnyJdLBplb6GqyCHw2su9aSoB7H9rNwHGI4FPeD+iTkFnl4DDulqIxNxynGlebmuiGKKuLDoe11K LsQYsdCA==; Received: from 2001-1c00-8d85-5700-266e-96ff-fe07-7dcc.cable.dynamic.v6.ziggo.nl ([2001:1c00:8d85:5700:266e:96ff:fe07:7dcc] helo=noisy.programming.kicks-ass.net) by desiato.infradead.org with esmtpsa (Exim 4.98.2 #2 (Red Hat Linux)) id 1w5OgY-00000006HPw-3uxa; Wed, 25 Mar 2026 13:54:15 +0000 Received: by noisy.programming.kicks-ass.net (Postfix, from userid 1000) id 6B826300578; Wed, 25 Mar 2026 14:54:13 +0100 (CET) Date: Wed, 25 Mar 2026 14:54:13 +0100 From: Peter Zijlstra To: ruipengqi Cc: jaegeuk@kernel.org, chao@kernel.org, linux-f2fs-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org, Lance Yang , Mingzhe Yang , Masami Hiramatsu , Andrew Morton , Anna Schumaker , Boqun Feng , Ingo Molnar , Joel Granados , John Stultz , Kent Overstreet , Sergey Senozhatsky , Steven Rostedt , Tomasz Figa , Waiman Long , Will Deacon , Yongliang Gao , Zi Li Subject: Re: [PATCH 1/2] hung_task: replace blocker_mutex with encoded blocker Message-ID: <20260325135413.GY3738786@noisy.programming.kicks-ass.net> References: <20260325133322.1050573-1-ruipengqi3@gmail.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=us-ascii Content-Disposition: inline In-Reply-To: <20260325133322.1050573-1-ruipengqi3@gmail.com> I still fully and totally detest all of this :/ On Wed, Mar 25, 2026 at 09:33:22PM +0800, ruipengqi wrote: > diff --git a/kernel/locking/mutex.c b/kernel/locking/mutex.c > index 555e2b3a665a..61fa97da7989 100644 > --- a/kernel/locking/mutex.c > +++ b/kernel/locking/mutex.c > @@ -29,6 +29,7 @@ > #include > #include > #include > +#include > > #define CREATE_TRACE_POINTS > #include > @@ -191,7 +192,7 @@ __mutex_add_waiter(struct mutex *lock, struct mutex_waiter *waiter, > struct list_head *list) > { > #ifdef CONFIG_DETECT_HUNG_TASK_BLOCKER > - WRITE_ONCE(current->blocker_mutex, lock); > + hung_task_set_blocker(lock, BLOCKER_TYPE_MUTEX); > #endif > debug_mutex_add_waiter(lock, waiter, current); > > @@ -209,7 +210,7 @@ __mutex_remove_waiter(struct mutex *lock, struct mutex_waiter *waiter) > > debug_mutex_remove_waiter(lock, waiter, current); > #ifdef CONFIG_DETECT_HUNG_TASK_BLOCKER > - WRITE_ONCE(current->blocker_mutex, NULL); > + hung_task_clear_blocker(); > #endif Your functions have stubs, you can get rid of those ugly #ifdefs