Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp330227ybi; Thu, 11 Jul 2019 20:18:15 -0700 (PDT) X-Google-Smtp-Source: APXvYqwayHAX73x6qG6Cagbr7rabVHwvECTPWXaqQPcw9Y/9I4mM4YFCvMmNU7ug4GJZJvseQH09 X-Received: by 2002:a63:1046:: with SMTP id 6mr8302715pgq.111.1562901495596; Thu, 11 Jul 2019 20:18:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562901495; cv=none; d=google.com; s=arc-20160816; b=UdyeHuXxjk/635qwZH5Y9b5gCxFZi+ZHfJYlGCkvrn6ZfqIW7quKwy956nRySQjVFa z6hPJzY/LE6YZq1BH3GblsU7m9VGYDA+2w79vG3ecH/gEmxPXVv13nrI7NeWDO5PwMAQ 7DYyt0+C3QKgRDHxf/rwGx4BDtrV9c5zxyQyk6uOQ4g/MuKmhBAzKJRhAVpWBHLaWu7h O6xiDda4dTdg9T04ehVdI3no0ww8GPfSJRLz1HuCZkCoNHNwW+EyiwHm2URMa0fpTkdX K8G/zQ+t4i26BtOmfv6pbbcdaq449Z4afrGxpjRHyQ4AIPx5P5Tv2WavdFNYCCLmllbO rXUg== 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; bh=jH+kc63oVu70cF5h/e4lW5SvQKYlS6ecu/Urk6oC5eM=; b=vzD5jn3cAGygqfE3gaUujhueIDWSA+b1inG0luytCe4Sj2hN2SAsbJShkMZBsOSWlK YeYun9AueoxvBYNqpP+o6i4jQeg5t5YL1i2VXskvPPOiGS0sYdPUGgPJ43Oc7K8rccCf 00bEHe199L79I5c28HAYyQxIxzBi7RTyjQ3DEiaXOY9sajlnZwLyL5OWOdWv9Vq718wy ilk75aPxZ2fgu2nbrnOorRUE2/lxCcouFBreeEGJKjSQrSG3MCsSpc2cbpGcFhr3s2Ou byK5x+n8M8II1jn+CC76LFJEMR1fYGa4xBvRKAI3O8rlqDmUJ/7lTtWcALQtiWVGBBVO vFrQ== 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 n9si6432510plk.166.2019.07.11.20.18.00; Thu, 11 Jul 2019 20:18:15 -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 S1729345AbfGLDRg (ORCPT + 99 others); Thu, 11 Jul 2019 23:17:36 -0400 Received: from out30-44.freemail.mail.aliyun.com ([115.124.30.44]:60155 "EHLO out30-44.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728899AbfGLDRg (ORCPT ); Thu, 11 Jul 2019 23:17:36 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R131e4;CH=green;DM=||false|;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04400;MF=yun.wang@linux.alibaba.com;NM=1;PH=DS;RN=13;SR=0;TI=SMTPD_---0TWfas.h_1562901451; Received: from testdeMacBook-Pro.local(mailfrom:yun.wang@linux.alibaba.com fp:SMTPD_---0TWfas.h_1562901451) by smtp.aliyun-inc.com(127.0.0.1); Fri, 12 Jul 2019 11:17:32 +0800 Subject: Re: [PATCH 2/4] numa: append per-node execution info in memory.numa_stat To: Peter Zijlstra Cc: hannes@cmpxchg.org, mhocko@kernel.org, vdavydov.dev@gmail.com, Ingo Molnar , linux-kernel@vger.kernel.org, linux-mm@kvack.org, mcgrof@kernel.org, keescook@chromium.org, linux-fsdevel@vger.kernel.org, cgroups@vger.kernel.org, Mel Gorman , riel@surriel.com References: <209d247e-c1b2-3235-2722-dd7c1f896483@linux.alibaba.com> <60b59306-5e36-e587-9145-e90657daec41@linux.alibaba.com> <825ebaf0-9f71-bbe1-f054-7fa585d61af1@linux.alibaba.com> <20190711134527.GC3402@hirez.programming.kicks-ass.net> From: =?UTF-8?B?546L6LSH?= Message-ID: Date: Fri, 12 Jul 2019 11:17:31 +0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:60.0) Gecko/20100101 Thunderbird/60.7.0 MIME-Version: 1.0 In-Reply-To: <20190711134527.GC3402@hirez.programming.kicks-ass.net> Content-Type: text/plain; charset=utf-8 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 2019/7/11 δΈ‹εˆ9:45, Peter Zijlstra wrote: > On Wed, Jul 03, 2019 at 11:29:15AM +0800, ηŽ‹θ΄‡ wrote: > >> +++ b/include/linux/memcontrol.h >> @@ -190,6 +190,7 @@ enum memcg_numa_locality_interval { >> >> struct memcg_stat_numa { >> u64 locality[NR_NL_INTERVAL]; >> + u64 exectime; > > Maybe call the field jiffies, because that's what it counts. Sure, will be in next version. Regards, Michael Wang > >> }; >> >> #endif >> diff --git a/mm/memcontrol.c b/mm/memcontrol.c >> index 2edf3f5ac4b9..d5f48365770f 100644 >> --- a/mm/memcontrol.c >> +++ b/mm/memcontrol.c >> @@ -3575,6 +3575,18 @@ static int memcg_numa_stat_show(struct seq_file *m, void *v) >> seq_printf(m, " %u", jiffies_to_msecs(sum)); >> } >> seq_putc(m, '\n'); >> + >> + seq_puts(m, "exectime"); >> + for_each_online_node(nr) { >> + int cpu; >> + u64 sum = 0; >> + >> + for_each_cpu(cpu, cpumask_of_node(nr)) >> + sum += per_cpu(memcg->stat_numa->exectime, cpu); >> + >> + seq_printf(m, " %llu", jiffies_to_msecs(sum)); >> + } >> + seq_putc(m, '\n'); >> #endif >> >> return 0;