Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp5750933imm; Mon, 23 Jul 2018 05:33:47 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdy6DM4106PIq6QK2WlgkC38rW0DNVXCuOvAfSxSTB8PsjN6UN3te8VXpjY3LyokwbKXhWl X-Received: by 2002:a17:902:aa4b:: with SMTP id c11-v6mr733638plr.344.1532349227918; Mon, 23 Jul 2018 05:33:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532349227; cv=none; d=google.com; s=arc-20160816; b=06h4WLl8OiCfr65DC1NFL5dtT98k3RO4GUpK24856oErA9fXGjGQtTDCv9DgIUb9C6 h58N82JXzilGmwZI4w5gBA+gPHsiXzh9yipLI0gOyQWjg4WZwUlt0RzrVWD4DqjnUh1e mNubxJ876TIVgzM6AVCRO7NL9pESL3BlCWLjnPnxz9Ro0p17sFq8lUT/7VHme/PedWMe MNlM8aw9ESyytGFdQ74gb17bFwBxAb/nu0BHTkoncgRo95AEbM5kxLnEgpRgjvAFzhCh gi2Aobr4DVX1rn/2RR5soyjT23W8Mgc1tCDjRNOoHukDLw4u8sSimjsvLZjc21vNDKrh aghQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:arc-authentication-results; bh=Wzh6PQ3FjEE4sODC9hyyoP+WI7+W2XFtc7wr+9SQ3iM=; b=l4b/uzjwIC3RwI4Aqth557HhSOM9buoDadVszwWjVceCFpLb5obVb74IWkVyjZ/5Eq iDknm4BP+NyvtBL7qCkRqPgkpSvfVz4YQwA+tDI7W3mg92xvM0uqqf+lNu1YSR0EkEjM zlV6rVc1q12V5e9e2er1kq9SN6q78Y4Gj/ftkNuKMWCYuBOj982YQNGKH+GfjVP7VdSv VbOyvohBwqSG9nuT1CE+BuGre3LuMJ8yYwFKNpnC6QS910Iv+mYmVFymwAZquZyGLV71 EyyK44tDcmIDI7F81lRsxHS2IKN+6EosGaT+xEHoOsDIdy5jRhg5Gm7cZQgIWh9wrE3E OO5g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g11-v6si8144753plb.100.2018.07.23.05.33.33; Mon, 23 Jul 2018 05:33:47 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389188AbeGWNdU (ORCPT + 99 others); Mon, 23 Jul 2018 09:33:20 -0400 Received: from out30-133.freemail.mail.aliyun.com ([115.124.30.133]:36287 "EHLO out30-133.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388283AbeGWNdT (ORCPT ); Mon, 23 Jul 2018 09:33:19 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R101e4;CH=green;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e07488;MF=yun.wang@linux.alibaba.com;NM=1;PH=DS;RN=3;SR=0;TI=SMTPD_---0T5AXqzf_1532349134; Received: from testdeMacBook-Pro.local(mailfrom:yun.wang@linux.alibaba.com fp:SMTPD_---0T5AXqzf_1532349134) by smtp.aliyun-inc.com(127.0.0.1); Mon, 23 Jul 2018 20:32:14 +0800 Subject: Re: [PATCH v2] tg: show the sum wait time of an task group To: Peter Zijlstra Cc: Ingo Molnar , linux-kernel@vger.kernel.org References: <5c4c978d-e8fb-4bcb-b942-3c6d3dcfc13e@linux.alibaba.com> <20180723093121.GA2494@hirez.programming.kicks-ass.net> From: =?UTF-8?B?546L6LSH?= Message-ID: Date: Mon, 23 Jul 2018 20:32:14 +0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: <20180723093121.GA2494@hirez.programming.kicks-ass.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2018/7/23 δΈ‹εˆ5:31, Peter Zijlstra wrote: > On Wed, Jul 04, 2018 at 11:27:27AM +0800, ηŽ‹θ΄‡ wrote: > >> @@ -6788,6 +6790,12 @@ static int cpu_cfs_stat_show(struct seq_file *sf, void *v) >> seq_printf(sf, "nr_throttled %d\n", cfs_b->nr_throttled); >> seq_printf(sf, "throttled_time %llu\n", cfs_b->throttled_time); >> >> + if (schedstat_enabled() && tg != &root_task_group) { > > I put the variables here. Will do that in next version :-) > >> + for_each_possible_cpu(i) >> + ws += schedstat_val(tg->se[i]->statistics.wait_sum); > > This doesn't quite work on 32bit archs, but I'm not sure I care enough > to be bothered about that. Could easily overflow then... hope they won't really care about the group conflicts. Regards, Michael Wang > >> + seq_printf(sf, "wait_sum %llu\n", ws); >> + }