Received: by 2002:a05:6a10:87d6:0:0:0:0 with SMTP id g22csp808202pxr; Mon, 11 Apr 2022 07:44:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwIlKZZTS+Uq+EzivPpxk9649etu8W1ufX80R6XGqzyWvJBNlk81+3vfTaefGG1qXw3Ktps X-Received: by 2002:a17:906:478b:b0:6db:8b6e:d5de with SMTP id cw11-20020a170906478b00b006db8b6ed5demr31137678ejc.161.1649688247341; Mon, 11 Apr 2022 07:44:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649688247; cv=none; d=google.com; s=arc-20160816; b=v8SGvqfIAewRU+nUi2eaJwOPZc4dw5s36kNTNUEKYFJjPdTny0LdRv7fMnNl8+ZTcp 5ltETvlMchYkQDGsVmFXm9HdI0MkS6n8bG5RaDf0JBlb20jfhhBOXuZWIU21RX0bZD2N v+mJ6ZFn3DB/u52Ge6lYoVjF9glbMAmBIq6bwvH7pm9GNoLMpyCc7KA725VeTy8qwx/x I+BCjBA8NOqLCfMqXPgksa3wPAVXYnXiqIwIIMyqDc7pQqv23Mr3rkZnRKaEPuxZ4zye z12vCajeAjRoNHXxAsk5tE+Pj3HzPSzMc+SULgg5TPjAACUExZg+K/mCFKVoMfK4JENK Lvzw== 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; bh=MfiJJ6c0jajzf4Wajr72MZ8TLLCsEVOBV+P+ntcGwes=; b=tAuDF8EdotLaHl8N6H+skSx8jYBTneW5i33yo+mXdYEGZisGVCCLz3ljnghKjYiQNg bbrg8IXTRv8FHDhiYspq6EdfW2OPBByDcn3Wdms7DzoDwS71mGzFG40o5O6Oi2ckRJ4Q 35EbA1n8sjvspjCyq63mLlMz2jlywOywShYc5dzUp8PNhcGFL7K8ctdJrbVY0XNwxGMq PMyt/umA8ytDnz/ovzB2CXsx+LQour/dgV0pcO792e/26f3Hj7j6ZPDOW21uoDwQPV38 b7PZR7IQanV9I/7N0eBTVEhl0+iBqpkE1W8gTitJBte6tL9hJ9z5PezM7Plou3IjTZxl LklQ== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id fj19-20020a1709069c9300b006e89f4b0cd2si727887ejc.403.2022.04.11.07.43.41; Mon, 11 Apr 2022 07:44:07 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232373AbiDIXoj (ORCPT + 99 others); Sat, 9 Apr 2022 19:44:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39028 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229734AbiDIXoh (ORCPT ); Sat, 9 Apr 2022 19:44:37 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id ED52358834; Sat, 9 Apr 2022 16:42:28 -0700 (PDT) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id A59A4ED1; Sat, 9 Apr 2022 16:42:28 -0700 (PDT) Received: from airbuntu (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 178323F5A1; Sat, 9 Apr 2022 16:42:25 -0700 (PDT) Date: Sun, 10 Apr 2022 00:42:24 +0100 From: Qais Yousef To: stable@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Uwe =?utf-8?Q?Kleine-K=C3=B6nig?= , 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: <20220409234224.q57dr43bpcll3ryv@airbuntu> References: <20220120162520.570782-1-valentin.schneider@arm.com> <20220120162520.570782-3-valentin.schneider@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20220120162520.570782-3-valentin.schneider@arm.com> X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,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 +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. Thoughts? Thanks! -- Qais Yousef