Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp3355555yba; Tue, 23 Apr 2019 02:16:21 -0700 (PDT) X-Google-Smtp-Source: APXvYqxfgqFZ0tPXFUajb+f5Sz7bgnW/YG2Z2lfHr3XUMhlayK8KXUWj0WtT/1JU4DZGwNA/zCvt X-Received: by 2002:a63:a55:: with SMTP id z21mr23618272pgk.440.1556010981489; Tue, 23 Apr 2019 02:16:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556010981; cv=none; d=google.com; s=arc-20160816; b=osLvHhf6dI0AkRJSbDAXmQMcWTL4/Xiyl8vJB6GPU50gbHS+TBjHKpyRgGKSa2g0hr rE//rOE3ZhcAXOzuUZLM0dNc+2kZVKzjODE5JjU4UXcKghmT+6Qhl4sLY1wGLatKykFO 4nwkl0YU/0IPCANN2lw1t1pV4TsLL53UaOehGidp5pU7kHy1o2YXQux+sQaS1F3hMME9 kUHTR14+vfc8u7ru4HnfNBVwCZNCt7T8KYsm5MsKTkp+td8wp+/DRf2HopIDH39i77EN GCSD6KBlYAZFhPKSS61ZjF3+ur9ir87viFQHhJph1NH/hTilpqArNRcRyAZRJ9LkiFpE K1CQ== 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=D/P+xqvNSA/F4wBM5RyP1OHDtLtEm1REdIf8KqjOVRI=; b=LOU/wbjIpfFXtz5Vzeegacva5tfY1OWynbGnUivC4Jgw3sllvb4pmE5J/K1bV0sIKd LcPTTS5LfZLew99dz78UsKQXMAB6bnGnafzYs8PY60rMPRacmaS+ABpIFgdxjdQauioE wFD2smxo/E5NzEAgROoJN9pCbYnNYj6MwF1CYVXtp2dX9K59iL1SjXi6EfW+N1cYC39/ fcpKVK9A7zB45loVg7f2jSDGvoqbczLaljVhiYudqhBcsnuyBq6av/a7ZH2nA35UDX0f LwrRbymbxKC8PPFS04mNrJBdb3NyvDqHrUoFfI/e/CjGjX+3uecBBHxdeqp+L+lgJlHZ EzLw== 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 z123si14490278pgb.199.2019.04.23.02.16.06; Tue, 23 Apr 2019 02:16:21 -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 S1726608AbfDWJO5 (ORCPT + 99 others); Tue, 23 Apr 2019 05:14:57 -0400 Received: from out30-44.freemail.mail.aliyun.com ([115.124.30.44]:40015 "EHLO out30-44.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725888AbfDWJO5 (ORCPT ); Tue, 23 Apr 2019 05:14:57 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R821e4;CH=green;DM=||false|;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01f04446;MF=yun.wang@linux.alibaba.com;NM=1;PH=DS;RN=7;SR=0;TI=SMTPD_---0TQ1rXBG_1556010893; Received: from testdeMacBook-Pro.local(mailfrom:yun.wang@linux.alibaba.com fp:SMTPD_---0TQ1rXBG_1556010893) by smtp.aliyun-inc.com(127.0.0.1); Tue, 23 Apr 2019 17:14:53 +0800 Subject: Re: [RFC PATCH 1/5] numa: introduce per-cgroup numa balancing locality, statistic 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 References: <209d247e-c1b2-3235-2722-dd7c1f896483@linux.alibaba.com> <20190423084444.GB11158@hirez.programming.kicks-ass.net> From: =?UTF-8?B?546L6LSH?= Message-ID: Date: Tue, 23 Apr 2019 17:14:53 +0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <20190423084444.GB11158@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/4/23 δΈ‹εˆ4:44, Peter Zijlstra wrote: > On Mon, Apr 22, 2019 at 10:11:24AM +0800, ηŽ‹θ΄‡ wrote: >> +#ifdef CONFIG_NUMA_BALANCING >> + >> +enum memcg_numa_locality_interval { >> + PERCENT_0_9, >> + PERCENT_10_19, >> + PERCENT_20_29, >> + PERCENT_30_39, >> + PERCENT_40_49, >> + PERCENT_50_59, >> + PERCENT_60_69, >> + PERCENT_70_79, >> + PERCENT_80_89, >> + PERCENT_90_100, >> + NR_NL_INTERVAL, >> +}; >> + >> +struct memcg_stat_numa { >> + u64 locality[NR_NL_INTERVAL]; >> +}; > If you make that 8 it fits a single cacheline. Do you really need the > additional resolution? If so, then 16 would be the next logical amount > of buckets. 10 otoh makes no sense what so ever. Thanks for point out :-) not have to be 10, I think we can save first two and make it PERCENT_0_29, already wrong enough if it drops below 30% and it's helpless to know detail changes in this section. Regards, Michael Wang >