Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp10527948ybi; Thu, 11 Jul 2019 06:46:34 -0700 (PDT) X-Google-Smtp-Source: APXvYqwxrGnsFs2u68w/iLNzlFPM7sIlxLoQYvpzJvUjAbq1pTOe2yvuJiTKXzrP9UQjZkXk0tfK X-Received: by 2002:a65:5c0a:: with SMTP id u10mr4596599pgr.410.1562852793827; Thu, 11 Jul 2019 06:46:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562852793; cv=none; d=google.com; s=arc-20160816; b=nE6eYOnj4EHme7sQYgV5EFahlu7LqxTHf6lGDVxHwBUuoPqTQuUoR0rRR3xdSXg3vY 7JV/xK38MtZadQL7trzubR6uqt/In/8jKDCjRp9gxG02JM5hlZ6oJf6CoUGKVkZvwoC+ mLrxFezk8ObRBZnnXpRF3PQGFXxF5cYylxBjrFch/vZE8O5ICsYO4GgxImpf/RdEaQdX XwlDbhna0Axdg82Dy9m7gQWEmEl1WFQZa2oef2vvT6cFU95w3DMLBEg6X/oSKZre4+iY PQFdv+QaB+3sND5Anzo+JcNbYKMvpD+cR/dQoeZBZBiA+I71WMztjnV6kAbme3x5UzEI rNUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=motTGlaLa78AkkT94ppPVZ2/Cr7h+cvS3zIYf8Ec2sw=; b=e08IDcYLf68zybA9SPaUGj2Hu9voIq0YUxBiSFN6J8+MtU0ALgDzBrp5yuG8nCXT2i a5Dyj5QNoAEay8G3s9nKEtw/1OLLJd2JMbM8ojfHN7LKYl9EdvPgBWR8HNvnHzAhRDM1 BJ2iFak9uay8AVbxD3c6GXaT0L9dA90QiLHAcyDceECccFCUA9rHbdBoSlsGfdL+u3gu Jc2UFdjZDzMiqBFJmWubcMXZM/tHe6TO2Sn5oVGzrzPKzVpKQnBM+Iur2Tl39Q9/xL1t OIZIe4IPT4eM5HGnRWFc5sShfbvJXLwlphfRiam11VuI9K6vb0X0ri5pzyQm8hDHE9S2 XwuA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=YrXbIX5q; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t11si5414071pgn.369.2019.07.11.06.46.16; Thu, 11 Jul 2019 06:46:33 -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; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=YrXbIX5q; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728463AbfGKNpm (ORCPT + 99 others); Thu, 11 Jul 2019 09:45:42 -0400 Received: from merlin.infradead.org ([205.233.59.134]:55348 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726012AbfGKNpm (ORCPT ); Thu, 11 Jul 2019 09:45:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=In-Reply-To:Content-Transfer-Encoding: Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date: Sender:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=motTGlaLa78AkkT94ppPVZ2/Cr7h+cvS3zIYf8Ec2sw=; b=YrXbIX5qnEOqZJQGogVWSKOxdl nGFNn6+c0qufC1VtyAe6+rL5HrRV67MuO+rpGnEO0OyUNgeIEPyNiSiZrfk6aZZrK5WNwcSr/8dyK A26SZPB2XsuHf+D4zUZlaMuqB+7kEyEb+ngAnNP6xe5ohRPxdletoBrzIZXJ31TWB1dFGaguDRjL6 GRsekT6kNLxlJ7kZwHIlito+ouKUCAR/I/CsOhElJJb1HCWsIfFsFnE2fFyvtCjGYfq8lmKOXoZik mAS0/IpGxoFZ8o1KHUmMwLXx5fGM8kctE7QQMdPbSolTQ9Qd+HRIStso/avMYCaTNCZnK6yy3EO1W VNCWBhCQ==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by merlin.infradead.org with esmtpsa (Exim 4.92 #3 (Red Hat Linux)) id 1hlZO4-0003nk-NU; Thu, 11 Jul 2019 13:45:32 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 7E86920B54EA8; Thu, 11 Jul 2019 15:45:27 +0200 (CEST) Date: Thu, 11 Jul 2019 15:45:27 +0200 From: Peter Zijlstra To: =?utf-8?B?546L6LSH?= 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 Subject: Re: [PATCH 2/4] numa: append per-node execution info in memory.numa_stat Message-ID: <20190711134527.GC3402@hirez.programming.kicks-ass.net> 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> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <825ebaf0-9f71-bbe1-f054-7fa585d61af1@linux.alibaba.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. > }; > > #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;