Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4118348pxj; Tue, 25 May 2021 00:27:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzjxtjWjuO6jVoQHf6GI2Hm1eVUKgSxt7TSoVKOpKharXoV41ZLNGCBrzhqjGEUEOsqYh4T X-Received: by 2002:a5e:c311:: with SMTP id a17mr10736683iok.34.1621927627905; Tue, 25 May 2021 00:27:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621927627; cv=none; d=google.com; s=arc-20160816; b=zXCm1LeR4CTPAGPoBJc7AQcUeQze15dfSvx2J9Eq+jJvadOg+tIZxNQdCsNhGDk9Df B/xwYmyRuO4lfb3B2OUPbmH69cj0PnKxKbR3LW59ceDKk1oOlqTJklUMgo9oKFNPPkd5 CevsjTQdaSt0nXZqHfxtIOBvWWolBZ50Gr5i+T5xyIlPhhKpGAs4ExozPZ0DnH9yk4df 5KhsMTA4fXCP2gB7R9NYxNVHwQq+Duo37STXyLnbcVDcB6aRYk5i/8Sia2AKHKnHoS46 uxbvOYjorcX+cAkvfRPqTdmCEwlRl+1otqLZXY3rt/IUXv9tq5sskjEHhu5R0TTk4SU7 FzUA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=m7T7PKaicDoiKTzfegVuX9iV+jmrHLUsZmHeGnROKAQ=; b=VWaWx8FsBT9+kdSIJ3Sen5Ey1LcVdUcs3WLkJ2PURZCRkzvf2Z+W3tRD/UqQIF2dbI 5dowYdqgGBIn2qqUujaFkILc8pEPgDszmJc20xOKlS30hlDv5iu8hjwmnQR0adP+ouFV iWzjcScXAg3NWUovEeKsgAtzdQfmdPloZTcJP3weNUO4xqpzMqTZFr6dpHGzg8pnJs0A PV+1B2G20KHcSgXMrFwG6uNkaahD3gxe0Z4CUYGN92oRZ+SIzjqBatvxWFjZO1cIvj0A zaABmyg+BC1XWlPnEdPpGIuZFhlwYcKPgqQSGE7mU3DY44DndaUOz/TUXNpL6FcME3je 6A1w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=FlGmu7tv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=suse.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c15si15582737ilo.151.2021.05.25.00.26.54; Tue, 25 May 2021 00:27:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=FlGmu7tv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=suse.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231589AbhEYH1r (ORCPT + 99 others); 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