From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 67FAAC2B9F8 for ; Tue, 25 May 2021 07:26:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 480DF6141B for ; Tue, 25 May 2021 07:26:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231596AbhEYH1r (ORCPT ); Tue, 25 May 2021 03:27:47 -0400 Received: from mx2.suse.de ([195.135.220.15]:48268 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229963AbhEYH1p (ORCPT ); Tue, 25 May 2021 03:27:45 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1621927575; h=from:from:reply-to: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=m7T7PKaicDoiKTzfegVuX9iV+jmrHLUsZmHeGnROKAQ=; b=FlGmu7tvUW2Y/LaXdhZDqTI0vBL7JbiTuofGU/30AUa1j4hXXie6mQMz9Eh7iYlWkSyvXm L+dEmY4TcUDZt8uU/FyLsMEeQumwbRbQJnv+v/yYIVS5cSR2TonzduVvg8/HRt5y/7Rxi3 r82lGaUCtkAL+dIgqXItMICbdheJrUQ= Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 551E5AEE5; Tue, 25 May 2021 07:26:15 +0000 (UTC) Date: Tue, 25 May 2021 09:26:14 +0200 From: Michal Hocko To: =?utf-8?B?6ZmI5Yag5pyJ?= Cc: Andrew Morton , linux-kernel@vger.kernel.org, Kees Cook , lukas.bulwahn@gmail.com, vbabka@suse.cz, gpiccoli@canonical.com, chenguanyou Subject: Re: [PATCH] hungtask: add filter kthread/check comm Message-ID: References: <20210521132544.19816-1-chenguanyou@xiaomi.com> <20210522145127.5f56751f164df8af2d3f39fa@linux-foundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue 25-05-21 11:27:16, 陈冠有 wrote: [...] > These are MTK's LPM designs. No idea what those are but it seems like an out of tree code. > If we have linux-api, hungtask can choose to skip kthread, helpful for us > to debug user space threads in "state=D" when enable hungtask panic. No, this approach is wrong. You are trying to workaround an incorrect out of tree code by creating a user visible API. I have already brought that up in earlier version of this patch. Nacked-by: Michal Hocko Andrew has already given you a lead on how to fix the said code. Use TASK_IDLE when waiting for an event. This will both hide that waiting task from load average accounting and also from the hung task detector. -- Michal Hocko SUSE Labs