Received: by 2002:a05:6358:700f:b0:131:369:b2a3 with SMTP id 15csp2047828rwo; Thu, 3 Aug 2023 04:04:31 -0700 (PDT) X-Google-Smtp-Source: APBJJlGS7uc8Wnhl0qyvZ+i1Ct48F3Dj/TrZjoNWLqO8pmPXPuT+IYRWWaMgjbS4RIW5UROoqdks X-Received: by 2002:a17:90a:fe94:b0:268:307a:c3cd with SMTP id co20-20020a17090afe9400b00268307ac3cdmr22593041pjb.21.1691060670828; Thu, 03 Aug 2023 04:04:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691060670; cv=none; d=google.com; s=arc-20160816; b=sm3ShaUEomE13V85hl/L8KCh8wRytP+dGT0+VyyYg7cet/MuzR1lRmHma/pm8EdD64 N2yQkmwv3qUzguwORSbH/q6Nz/Y2fyFXT/3RG738OPfAHoA0HDFWs3NjcDcUMkslS0L6 l/kvDl0Pvxr/T8usKhXi2nCRdxzHhKIHYu8QtPDIi8YhkBOe7iqF2zMTELU5d78fwjlc ixiZgED6e5MMIqZ3ysCeZYMngvFG8aY1Wzm9dlqbJX3viC6mKmeESjj14Tk5lKZHAdR/ 5JXDLY5uluYAl7YWiULTE+sVnbxN3BvFSPbOpXMX+4upQiWobxG4n5oFZ7zKc5mSMNPs WyZw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=dTlmcd43qbIXERE60q1VWysVQrKYnBzrZlYkYheSCMY=; fh=UpFtFCzii5ykkGoXq8QCM+IXKNgpf9xKHjNRjBS9wMU=; b=W5xqRMf4KYjTmhEWY5SKCqIYNsfAyYaN5tRsr7heX8rHSpeYmuo7bEridRGkdpUZ4V ek5dLKfZdPF2K+pIFpUqFplS/xDjE7l+Hilf6YFV/3NIe8pl6lsSWO7zaaZOnpFGlWDU dl+H60f63NzYcsKDOH83leMEHRoVIVH9OuNWLzYRW71gEuTVW/SR3ciEsRt/23i253At rsE8T+t8K4Eo8vzxQRSuu15Efo4N1KB7qmciqaSr4oAldB8YKSUmgihsVInkZopFDmk6 ydD0ROr/ftztBENouNVakBA9Qh2bBck6KwYSYhtA1NsOquOAay85cFAhS04JapAsf3kf wOSQ== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i36-20020a17090a3da700b00267fc4793cfsi2869303pjc.110.2023.08.03.04.04.17; Thu, 03 Aug 2023 04:04:30 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234993AbjHCJJK (ORCPT + 99 others); Thu, 3 Aug 2023 05:09:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49202 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234981AbjHCJJJ (ORCPT ); Thu, 3 Aug 2023 05:09:09 -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 0E0F1E7; Thu, 3 Aug 2023 02:09:07 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 9627E61CFF; Thu, 3 Aug 2023 09:09:06 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7C4D9C433C7; Thu, 3 Aug 2023 09:09:04 +0000 (UTC) Date: Thu, 3 Aug 2023 05:09:00 -0400 From: Steven Rostedt To: Ze Gao Cc: Adrian Hunter , Alexander Shishkin , Arnaldo Carvalho de Melo , Ian Rogers , Ingo Molnar , Jiri Olsa , Mark Rutland , Masami Hiramatsu , Namhyung Kim , Peter Zijlstra , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, linux-trace-kernel@vger.kernel.org, Ze Gao Subject: Re: [RFC PATCH v6 1/5] perf sched: sync state char array with the kernel Message-ID: <20230803050900.5007d2f5@gandalf.local.home> In-Reply-To: <20230803083352.1585-2-zegao@tencent.com> References: <20230803083352.1585-1-zegao@tencent.com> <20230803083352.1585-2-zegao@tencent.com> X-Mailer: Claws Mail 3.19.1 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no 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 Thu, 3 Aug 2023 04:33:48 -0400 Ze Gao wrote: Hi Ze, > Update state char array and then remove unused and stale > macros, which are kernel internal representations and not > encouraged to use anymore. > A couple of things. First, the change logs of every commit need to specify the "why". The subject can say "what", but the change log really needs to explain why this patch is important. For example, this patch is really two changes (and thus should actually be two patches). (I'll also comment on the other patches) 1. The update of the state char array. You should explain why it's being updated. If it was wrong, it needs to state the commit that changed to make that happen. 2. For the removing the stale macros, the change log can simply state that the macros are unused in the code and are being removed. Finally, I know you're eager to get this patch set in, but please hold off sending a new version immediately after a comment or two. Some maintainers prefer submitters to wait a week or so, otherwise you will tend to "spam" their inboxes. There's more than one maintainer Cc'd on this series, and you need to be courteous not to send too many emails in a short period of time. -- Steve > Signed-off-by: Ze Gao > --- > tools/perf/builtin-sched.c | 13 +------------ > 1 file changed, 1 insertion(+), 12 deletions(-) > > diff --git a/tools/perf/builtin-sched.c b/tools/perf/builtin-sched.c > index 9ab300b6f131..8dc8f071721c 100644 > --- a/tools/perf/builtin-sched.c > +++ b/tools/perf/builtin-sched.c > @@ -92,23 +92,12 @@ struct sched_atom { > struct task_desc *wakee; > }; > > -#define TASK_STATE_TO_CHAR_STR "RSDTtZXxKWP" > +#define TASK_STATE_TO_CHAR_STR "RSDTtXZPI" > > /* task state bitmask, copied from include/linux/sched.h */ > #define TASK_RUNNING 0 > #define TASK_INTERRUPTIBLE 1 > #define TASK_UNINTERRUPTIBLE 2 > -#define __TASK_STOPPED 4 > -#define __TASK_TRACED 8 > -/* in tsk->exit_state */ > -#define EXIT_DEAD 16 > -#define EXIT_ZOMBIE 32 > -#define EXIT_TRACE (EXIT_ZOMBIE | EXIT_DEAD) > -/* in tsk->state again */ > -#define TASK_DEAD 64 > -#define TASK_WAKEKILL 128 > -#define TASK_WAKING 256 > -#define TASK_PARKED 512 > > enum thread_state { > THREAD_SLEEPING = 0,