Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp272537pxb; Tue, 12 Apr 2022 01:25:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzBkKGql3K3e8PB1QHy+BTFvs8EKYa8zOT1uj8MeUaDj11DAk/Rrh4fbbCCw0O9DG5B/oIl X-Received: by 2002:a17:90b:1c0d:b0:1c7:3b02:aa68 with SMTP id oc13-20020a17090b1c0d00b001c73b02aa68mr3691586pjb.187.1649751939882; Tue, 12 Apr 2022 01:25:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649751939; cv=none; d=google.com; s=arc-20160816; b=xGawcpk59+sEIrXFYQD1D1ePUr9biF0AAGyWzZAjxCIB/cbDysxhqZUKW4yu/fKKBb EOyhzaGgvLMCAOWe83YwTRK4YbX0pAjjvBuFf9EIPXsGSBaE7TOCc+x2OEspm3uEvrlw tsNTRP3HnULoiJ4XO92MptMHQBAhRMKrjPdu/T9yXMp66V1IN9eeKZWcCUTgFjuFhgEQ KDfhLlyeF+Oo+vTTH6B+do30gl6Ew4Lf93ozbn30k630QVzMsjvdJg33qY1vyxVNjKwl M/rs2IY3GPludfHXfENPpGIaiTPSKM4GvZtNh7yfAmAMeQwYsxk/+EqzWG5IWgjHDeD8 4lKQ== 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=+x+Zu0bD4s8tgxj1HXY7PdBGpSI2pp9EnGU1yfwdBsg=; b=XVIUEuoyxjx+67lnK+wqttY0LJ0Nv9W8bpUs+0LZTzKAeHkH01lO02MEbAiXdgsp9x 4WCaDJHPr5DbXouJtVG/vCmXx7fWS5Z6IQF0QMtgmuK7GfYx/Od6NMErCZCQEai4q6pT j0qjV8qACdg48JW7+doAhQDdjI7aiI2LYnkpIIPf7gBeeCgpZC5KFrIqRB5s3JGmE1Tf xnPE8n+Dnq1H1P3tkuFyFRR4MaQo+uFTtvciNDsh3bK0QQzfSiVOC11DnJbz8D8S/X9/ 9ZkDY4UYNP3YOc7TGu3tVJD3xk9pFTNMwEYhQyaFt8jZ/2cfA8F5wMEPenpBLmB1cGTa POXQ== 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 lk9-20020a17090b33c900b001c9b7f08a94si16397885pjb.139.2022.04.12.01.25.21; Tue, 12 Apr 2022 01:25:39 -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 S1349783AbiDKUVN (ORCPT + 99 others); Mon, 11 Apr 2022 16:21:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59390 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230050AbiDKUVM (ORCPT ); Mon, 11 Apr 2022 16:21:12 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id A126B3464D; Mon, 11 Apr 2022 13:18:55 -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 0DCE71570; Mon, 11 Apr 2022 13:18:55 -0700 (PDT) Received: from airbuntu (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 4A0D13F70D; Mon, 11 Apr 2022 13:18:52 -0700 (PDT) Date: Mon, 11 Apr 2022 21:18:42 +0100 From: Qais Yousef To: Greg KH Cc: stable@vger.kernel.org, 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: <20220411201842.ugrsiuzywddqyx3j@airbuntu> 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=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: 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 On 04/11/22 15:20, Greg KH wrote: > 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. Okay. Maybe I was trying to chew too much. I care about patch 1 only. I'll make sure it builds and works against 5.10 and post it separately. Please ignore this one. Sorry for the noise. Thanks -- Qais Yousef