Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751891AbdIUOlb (ORCPT ); Thu, 21 Sep 2017 10:41:31 -0400 Received: from ud10.udmedia.de ([194.117.254.50]:60640 "EHLO mail.ud10.udmedia.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751387AbdIUOl3 (ORCPT ); Thu, 21 Sep 2017 10:41:29 -0400 Date: Thu, 21 Sep 2017 16:41:27 +0200 From: Markus Trippelsdorf To: Peter Zijlstra Cc: Tejun Heo , linux-kernel@vger.kernel.org, "Luis R. Rodriguez" , "Eric W. Biederman" , "Paul E. McKenney" , Linus Torvalds Subject: Re: Worker threads in D state since c5a94a618e7ac86 (workqueue: Use TASK_IDLE) Message-ID: <20170921144127.GA236@x4> References: <20170910073653.GA284@x4> <20170911131128.GD1774378@devbig577.frc2.facebook.com> <20170911142133.GA2265@x4> <20170921110842.GA4020@x4> <20170921123000.bip2whks53bwn7de@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170921123000.bip2whks53bwn7de@hirez.programming.kicks-ass.net> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1988 Lines: 52 On 2017.09.21 at 14:30 +0200, Peter Zijlstra wrote: > On Thu, Sep 21, 2017 at 01:08:42PM +0200, Markus Trippelsdorf wrote: > > On 2017.09.11 at 16:21 +0200, Markus Trippelsdorf wrote: > > > On 2017.09.11 at 06:11 -0700, Tejun Heo wrote: > > > > Hello, > > > > > > > > On Sun, Sep 10, 2017 at 09:36:53AM +0200, Markus Trippelsdorf wrote: > > > > > Since: > > > > > > > > > > commit c5a94a618e7ac86b20f53d947f68d7cee6a4c6bc > > > > > Author: Peter Zijlstra > > > > > Date: Wed Aug 23 13:58:44 2017 +0200 > > > > > > > > > > workqueue: Use TASK_IDLE > > > > > > > > > > > > > > > all worker threads are in D state. They all show up when using "magic > > > > > SysRq w". In htop they all have big fat red 'D' in the state column. > > > > > Is this really desirable? > > > > > > > > > > I have attached the output of "ps aux" after boot and the SysRq-w > > > > > output. > > > > > > > > Hmm.... looks like we better revert until we figure out how this > > > > should get presented in debugging facilities / to userspace. Peter? > > > > > > BTW rcu recently introduced the same issue: > > > > > > commit d5374226c3e444239e063f005dfb59cae4390db4 > > > Author: Luis R. Rodriguez > > > Date: Tue Jun 20 14:45:47 2017 -0700 > > > > > > rcu: Use idle versions of swait to make idle-hack clear > > > > Ping? > > You may call it a cosmetic issue, but still it makes debugging much > > harder. Finding "real" blocked tasks is now like finding a needle in a > > haystack. > > Sorry, was out traveling. We can easily fix sysrq-w, not sure we can do > much about htop (I've never seen it). > > I suppose we can try and make the state character not be D, is that > really worth the trouble, or would it simply break htop if we were to > return a new character? It seems to work. Simply returning "I (idle)" from get_task_state() in fs/proc/array.c when the state is TASK_IDLE does the trick. I've tested top, htop and ps. -- Markus