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=-5.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=no 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 BD617C433B4 for ; Sat, 17 Apr 2021 14:46:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 897FB610C7 for ; Sat, 17 Apr 2021 14:46:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236487AbhDQOqb (ORCPT ); Sat, 17 Apr 2021 10:46:31 -0400 Received: from www262.sakura.ne.jp ([202.181.97.72]:53884 "EHLO www262.sakura.ne.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236187AbhDQOq3 (ORCPT ); Sat, 17 Apr 2021 10:46:29 -0400 Received: from fsav304.sakura.ne.jp (fsav304.sakura.ne.jp [153.120.85.135]) by www262.sakura.ne.jp (8.15.2/8.15.2) with ESMTP id 13HEijbk042837; Sat, 17 Apr 2021 23:44:45 +0900 (JST) (envelope-from penguin-kernel@i-love.sakura.ne.jp) Received: from www262.sakura.ne.jp (202.181.97.72) by fsav304.sakura.ne.jp (F-Secure/fsigk_smtp/550/fsav304.sakura.ne.jp); Sat, 17 Apr 2021 23:44:45 +0900 (JST) X-Virus-Status: clean(F-Secure/fsigk_smtp/550/fsav304.sakura.ne.jp) Received: from [192.168.1.9] (M106072142033.v4.enabler.ne.jp [106.72.142.33]) (authenticated bits=0) by www262.sakura.ne.jp (8.15.2/8.15.2) with ESMTPSA id 13HEiiAf042828 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NO); Sat, 17 Apr 2021 23:44:44 +0900 (JST) (envelope-from penguin-kernel@i-love.sakura.ne.jp) Subject: Re: [PATCH] kernel/hung_task: Add a whitelist and blacklist mechanism. To: zhouchuangao References: <1618668783-39601-1-git-send-email-zhouchuangao@vivo.com> Cc: Ingo Molnar , Peter Zijlstra , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Daniel Bristot de Oliveira , Andrew Morton , Kees Cook , Michal Hocko , "Guilherme G. Piccoli" , Vlastimil Babka , Lukas Bulwahn , linux-kernel@vger.kernel.org From: Tetsuo Handa Message-ID: <2d990915-0e1e-1c10-1736-7061d753f912@i-love.sakura.ne.jp> Date: Sat, 17 Apr 2021 23:44:40 +0900 User-Agent: Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.9.1 MIME-Version: 1.0 In-Reply-To: <1618668783-39601-1-git-send-email-zhouchuangao@vivo.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2021/04/17 23:13, zhouchuangao wrote: > The main purpose of this patch is to add a whitelist and blacklist > mechanism to the hung task thread. We stopped using the term 'whitelist'/'blacklist' for new code in Linux kernel, and what you are proposing is something like 'ignorelist'/'fatallist'. I think that matching based on comm name is poor, for comm name is subjected to impersonation by malicious user processes. Moreover, speak of syzkaller testing, most of hang task reports are reaction to somebody else consuming too much CPU resources (e.g. printk() flooding, too many pending workqueue requests). Even if some process is in 'ignorelist', it is possible that some problem that should be reported is already happening. Even if some process is in 'fatallist', it is possible that the cause of hang is simply somebody else is consuming too much CPU. By the way, I wish that khungtaskd can report recent top CPU consumers, for it is rare that the cause of hung is locking dependency problems / hardware problems.