Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp133202pxb; Mon, 11 Apr 2022 21:01:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy0E6RFEUafULKk2rEo9M3vsd1UhEG0vUffoblrDmlyy7KpymJHTcKwrTA08osiavkfgsZt X-Received: by 2002:a05:6a00:1510:b0:4fa:f5fe:ffd5 with SMTP id q16-20020a056a00151000b004faf5feffd5mr35915178pfu.2.1649736105869; Mon, 11 Apr 2022 21:01:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649736105; cv=none; d=google.com; s=arc-20160816; b=lgmlX9EGIvwrMhugHcYaxFodNkqm8nUJUxnlXp/9qTWc4zxnx2wQYGWLxlqA5kaDri dl/xgYKEDWd7OgEOV9XTV6PKW2wSyD/gcbKEhSIbHUZPkkI7VFjGzcipXZ1k+1wtw7at Iyfaux93suI4Qfz384a+C3XHijinypLXqzeSzXZfvr3xk1l0hD4xDZ442CRiiXuKudIu lyPzpMTRlJjd0ecWODFFwZb4Q231Il0rYp8hvdM5p8wVZD2vOycQxFo6d/fhvY/MQGE+ wAVgpEI9h/6u2uWcbJPP1V6ovcVPdAVG/00G5D5VJZ7QMkrs4BwXqiZqc48ZH4y8J3lF e1dA== 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=2nAOPSbIudDhvj7//XGrGEenih4IeuxjFvXXSraqV74=; b=aAUiA+oabntek0RuJ5GvANoBr4jmYpR2ZiXDHrE9RCXWZwmos/ZhOTVy4/GkTlfVrZ dwFCR3uxC1ry3EOV5W0jvNI+cXuPmMMRfT8FAxjXBX6WUDumOaLFXxL/PuQeNixyP1zH kflw2BvG1eRCytZY4Q0za4FrEXqqWmq2ingK3lcOVvEosuMsxgwck+/HGL4eG3U6LCs3 Yxdga1MiJ2v/TPwgEsfpb5Vfim/HyMphkCueiU2Ppml7AeD/KrSC/+ioM35IvNyUE63P 8grCB74ZRYwsl//BfMqS8ngfARIVPAXRLCSBHtixdHPUdlLYKAlymBIuR/kpajcJl5Ef M7KA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=BYTUUPuu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g63-20020a625242000000b004fdf66ab38asi10263745pfb.119.2022.04.11.21.01.30; Mon, 11 Apr 2022 21:01:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=BYTUUPuu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346423AbiDKNW4 (ORCPT + 99 others); Mon, 11 Apr 2022 09:22:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50256 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346430AbiDKNWx (ORCPT ); Mon, 11 Apr 2022 09:22:53 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 56CCC3B55D; Mon, 11 Apr 2022 06:20:37 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id D50C160C97; Mon, 11 Apr 2022 13:20:36 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id AFE07C385A4; Mon, 11 Apr 2022 13:20:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1649683236; bh=WdFDWYiySeQmCiU3XtGDypeqW1qu4cDgLgqYMUNK8jI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=BYTUUPuuYGWA146wrzCr84CGE4K/0JmVi7iZq2fNqmcimbKQjrcPHWqSs685tCmQM W3b7Bkh2BcHbvWPIUVXFqYsa6ackLhUaslAh0Xa1elFs2nxO56m/ADKtf/ctx5+phl ckINQVVas7ySbzUIMchAKARgpYiSkbL8gJyIypBc= Date: Mon, 11 Apr 2022 15:20:33 +0200 From: Greg KH To: Qais Yousef Cc: stable@vger.kernel.org, linux-kernel@vger.kernel.org, Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= , Abhijeet Dharmapurikar , Dietmar Eggemann , Steven Rostedt , Peter Zijlstra , Ingo Molnar , Vincent Guittot , Thomas Gleixner , Sebastian Andrzej Siewior , Juri Lelli , Daniel Bristot de Oliveira , Kees Cook , Andrew Morton , "Eric W. Biederman" , Alexey Gladkov , "Kenta.Tada@sony.com" , Randy Dunlap , Ed Tsai , Valentin Schneider Subject: Re: [PATCH v3 2/2] sched/tracing: Report TASK_RTLOCK_WAIT tasks as TASK_UNINTERRUPTIBLE Message-ID: References: <20220120162520.570782-1-valentin.schneider@arm.com> <20220120162520.570782-3-valentin.schneider@arm.com> <20220409234224.q57dr43bpcll3ryv@airbuntu> <20220410221325.fimxzpzg26zmmsiz@airbuntu> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20220410221325.fimxzpzg26zmmsiz@airbuntu> X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Apr 10, 2022 at 11:13:25PM +0100, Qais Yousef wrote: > On 04/10/22 08:14, Greg KH wrote: > > On Sun, Apr 10, 2022 at 12:42:24AM +0100, Qais Yousef wrote: > > > +CC stable > > > > > > On 01/20/22 16:25, Valentin Schneider wrote: > > > > TASK_RTLOCK_WAIT currently isn't part of TASK_REPORT, thus a task blocking > > > > on an rtlock will appear as having a task state == 0, IOW TASK_RUNNING. > > > > > > > > The actual state is saved in p->saved_state, but reading it after reading > > > > p->__state has a few issues: > > > > o that could still be TASK_RUNNING in the case of e.g. rt_spin_lock > > > > o ttwu_state_match() might have changed that to TASK_RUNNING > > > > > > > > As pointed out by Eric, adding TASK_RTLOCK_WAIT to TASK_REPORT implies > > > > exposing a new state to userspace tools which way not know what to do with > > > > them. The only information that needs to be conveyed here is that a task is > > > > waiting on an rt_mutex, which matches TASK_UNINTERRUPTIBLE - there's no > > > > need for a new state. > > > > > > > > Reported-by: Uwe Kleine-K�nig > > > > Signed-off-by: Valentin Schneider > > > > > > Any objection for this to be picked up by stable? We care about Patch 1 only in > > > this series for stable, but it seems sensible to pick this one too, no strong > > > feeling if it is omitted though. > > > > > > AFAICT it seems the problem dates back since commit: > > > > > > 1593baab910d ("sched/debug: Implement consistent task-state printing") > > > > > > or even before. I think v4.14+ is good enough. > > > > > > > > > > This is not the correct way to submit patches for inclusion in the > > stable kernel tree. Please read: > > https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html > > for how to do this properly. > > > > > > Apologies. > > commit: 25795ef6299f07ce3838f3253a9cb34f64efcfae > Subject: sched/tracing: Report TASK_RTLOCK_WAIT tasks as TASK_UNINTERRUPTIBLE > > I am interested in Patch 1 in this series as I know it impacts some Android > 5.10 users. But this patch seems a good candidate for stable too since it was > observed by a user (Uwe) and AFAICT the problem dates back to v4.14+ kernels. > > Suggested kernels: v4.14+. This has already been picked up by AUTOSEL for > v5.15+ stable trees. I do not think you have tested this in any of those kernels, as it breaks the build :( Please send a set of patches, properly backported and tested, that you wish to see applied to stable kernels and we will be glad to review them and apply them. But to suggest patches to be merged that you have not even tested is not good. thanks, greg k-h