Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C1846C433F5 for ; Wed, 8 Dec 2021 20:34:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240384AbhLHUhj (ORCPT ); Wed, 8 Dec 2021 15:37:39 -0500 Received: from ams.source.kernel.org ([145.40.68.75]:54564 "EHLO ams.source.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240369AbhLHUhh (ORCPT ); Wed, 8 Dec 2021 15:37:37 -0500 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 ams.source.kernel.org (Postfix) with ESMTPS id 396DAB82284 for ; Wed, 8 Dec 2021 20:34:04 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 87A61C00446; Wed, 8 Dec 2021 20:34:01 +0000 (UTC) Date: Wed, 8 Dec 2021 15:34:00 -0500 From: Steven Rostedt To: Valentin Schneider Cc: linux-kernel@vger.kernel.org, Abhijeet Dharmapurikar , Uwe =?UTF-8?B?S2xlaW5lLUvDtm5pZw==?= , Dietmar Eggemann , Peter Zijlstra , Ingo Molnar , Vincent Guittot , Thomas Gleixner , Sebastian Andrzej Siewior , Juri Lelli , Daniel Bristot de Oliveira , Kees Cook , Andrew Morton Subject: Re: [RFC PATCH 2/2] sched/tracing: Add TASK_RTLOCK_WAIT to TASK_REPORT Message-ID: <20211208153400.1c97ad3c@gandalf.local.home> In-Reply-To: <20211129123601.2101873-3-valentin.schneider@arm.com> References: <20211129123601.2101873-1-valentin.schneider@arm.com> <20211129123601.2101873-3-valentin.schneider@arm.com> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 29 Nov 2021 12:36:01 +0000 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 > > Add TASK_RTLOCK_WAIT to TASK_REPORT. > The patch looks good, but I may play with it more. But in the mean time... Reviewed-by: Steven Rostedt (VMware) -- Steve